What else can XSL do?

You'd be surprised at the power of XSL. What you have seen here really is only the beginning. For example, many sites make their news content available in XML format so that sites can syndicate their news. In the XSL stylesheets above, I have included a specific xmlns attribute in the xsl:stylesheet tag that will allow you to parse the RSS and RDF formats used by many syndicating news sites. Experiment!

There are also a variety of other XSL processing tags for you to make use of, conditional statements ("if foo = bar") for example. The W3C has a very large collection of freely-available information online about XML and XSLT, which is a rich mine for ideas; be sure to check it out!

 

Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: XSLT Conclusion >>

Previous chapter: Making XSL work for its money

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.