Extensible Stylesheet Language Transformations (XSLT) allows you to describe transforms from an input XML document to an output tree, such as XML, HTML, or text. You can use it for sophisticated presentation of XML documents or for transforms from one XML format to another. Delve further into this successful language and discover what it, as well what EXSLT, can do for you.
Extensible Stylesheet Language Transformations (XSLT) Version 1.0 [W3C Recommendation] is a language for describing transforms from an input XML document to an output tree. The output tree can, for example, take the form of an HTML document or another XML format, and as such, XSLT can be a language for rendering XML into legacy browser display form or for scripted operations on XML files. The transform is itself defined as an XML document in a special vocabulary. XML Path Language (XPath) is used for accessing the source document and general expression processing, and there are special instructions for setting up processing rules (XSLT is a declarative language) and directing the creation of the output tree.
XSLT 1.0 is an extraordinarily successful language, and it covers most common XML processing tasks. If you're familiar with XML, it is easy to learn the basics of XSLT, though mastering the language takes some effort. It has a well-designed extensibility mechanism, and its declarative processing model allows for maintainable and reusable code. The standard way to link an XML document to its XSLT stylesheet document is defined in Associating Style Sheets with XML documents Version 1.0 [W3C Recommendation]. The XSLT specification has been widely translated.
EXSLT and XSLT 2.0
As mentioned, XSLT has a nice extension mechanism with which you can define additional capabilities using the language of your choice. But it's even nicer when you don't have to write extensions because someone else has done so for you. EXSLT [community specification] is a standard set of such extensions defined in an implementation-agnostic way. EXSLT attempts to cover the most commonly needed extensions, such as date processing, regular expressions, and mathematical operations. Many XSLT implementations implement one or more EXSLT modules.
XSLT Version 2.0 offers some key improvements based on collective experience with XSLT 1.0, but it is closely tied to XPath 2.0, which is somewhat controversial.
- What kind of language is XSLT? (Michael Kay, developerWorks, April 2005): Learn how to begin the journey from XSLT beginner to master.
- XSLT tutorial: ZVON offers an in-depth look at XSLT.
- What kind of language is XSLT? (developerWorks, April 2005): The best way to become an expert in XSLT is to understand the basic nature of the language.
- XSLT Reference: By ZVON.
- XSL FAQ by Dave Pawson covers XSLT and XPath as well as XSL- FO.
- XSL reference page: The World Wide Web Consortium (W3C) maintains this site.
- Read about other XML standards: Index of XML standards.
- Participate in any of several XML-centered forums: XML zone discussion forums.
- Get involved in the developerWorks community: developerWorks blogs
- See the developerWorks XML Zone for a wide range of technical articles and tips, tutorials, standards, and IBM Redbooks at XML technical library.
- Stay current with technology in these sessions: developerWorks technical events and webcasts.
- Build your next development project with trial software available for download directly from developerWorks: IBM trial software