Manage Learn to apply best practices and optimize your operations.

Introducing a series of eight XSLT tutorials

In this article, Ed Tittel provides a sneak peek at his eight-part series of XML Style Sheet Language (XSLT) tutorials, which will run in his XML tip through September.

As a result of input from our readers, I'll be starting an eight-part series of tutorials on XSLT in my next XML tip running through September. The focus of these tutorials will be on the XML Style Sheet Language, XSLT, which provides mechanisms for ingesting and parsing XML documents as input, creates an internal document tree and provides all kinds of transformations to create output. XSLT is an outstanding XML technology and supports lots of useful applications, one of which permits programmers and content developers to take XML documents as input and create HTML documents as output.

The seven topics I plan to cover are as follows:

  1. "XSLT structure and syntax" will walk through XSLT structure and syntax and provide a guided tour of a simple XSLT stylesheet.
  2. "The XSLT Processing Model" will examine the role of the XSLT processor in handling and interpreting XML documents, look at popular processor choices worth considering, then walk through installing and working with Xalan and Saxon.
  3. "XSLT Elements" will be a whirlwind look at XSLT elements with brief discussions, short examples and pointers to many details.
  4. "Expressions" will explain how to understand, build and use expressions in XSLT stylesheets and will include examples and pointers to more details and illustrations.
  5. "Functions" will explain how to understand, build and use XSLT functions and will include examples and pointers to more details and illustrations.
  6. "Processing techniques" will review the fundamentals of XSLT processing techniques, including managing output, handling loops, iteration, conditionals, sorting and number content elements and more. I will use simple examples, but will provide links to more details, tutorials and complex examples.
  7. "Generating HTML" will cover how to construct a basic (X)HTML file skeleton using (X)HTML or XML as input, then populate that document with transformed content for output. Several simple examples, with links to additional details, tutorials and more complex examples are included.
  8. "Error and exception handling" will cover how to recognize and handle errors in document structure, syntax or navigation and recover gracefully (and informatively).

This should make for some interesting learning and provide a great opportunity to appreciate a close-up view of what XML can do for online content. Those who'd like to get a start learning about XSLT before the first tutorial goes live, or those who are simply looking for a good reference on XSLT, might want to acquire and start reading in one or more of the following excellent books:

  • Jeni Tennison: Beginning XSLT (APress reprint, 2004, ISBN: 1590592603) A great and comprehensive introduction to XSLT by a leading expert in the field, this book is useful and very approachable.
  • Richard Wagner: XSLT For Dummies (Wiley, 2002, ISBN: 0764536516) A short and focused introduction to XSLT terms, tools, concepts and simple implementations. If you can get past the series moniker, it's actually a very useful and informative book.
  • Michael Kay: XSLT Programmer's Reference, 2e (Wrox, 2001, ISBN: 076453814). Though Wrox is out of business, this title -- widely considered to be the best around on XSLT -- keeps going strong. My favorite reference and inspiration and likely to be yours, too.
  • Sal Mangano: XSLT Cookbook (O'Reilly & Associates, 2002, ISBN: 0596003722). Mangano's approach to XSLT provides a great "monkey-see, monkey-do" learning tool for XSLT that also serves as a repository of reusable templates for creating customized XSLT stylesheets. Definitely a practitioner's tool.

In the preceding list, the first two books aim at beginners and are recommended for those who have no background in XSLT. The second two books aim at more experienced programmers who may or may not know much about XML or XSLT, but who know about program design and creation. All of these books are worth owning, but either of the second two books (which also serve admirably as references) will probably be enough for interested programmers to come up to speed on this fascinating subject.

About the author
Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. E-mail Ed with comments, questions, or suggested topics or tools for review.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.