XSLT Tutorials


XPath is a specialized language for addressing parts of an XML document. XPath started off as part of the XSLT spec, but when the XSL Working Group realized how useful it could be to other W3C specifications—for example, an XLink link can use an XPath expression as part of an XPointer expression to identify one resource in a link—they split XPath out into its own specification. Like the core of the SQL language used

Documents, trees, and transformations

Speaking technically, an XSLT transformation describes how to transform a source tree into a result tree. Informally, we talk about how XSLT lets you transform documents into other documents, but it’s really about turning one tree in memory into another one. Why? Most XSLT processors read a document into the source tree, perform the transformations expressed by the XSLT stylesheet to create a result tree, and write out the result tree as a file,

XSLT and alternatives

Other ways exist for transforming XML documents. These options fall into two categories: • XML-related libraries added to general purpose programming languages such as Java, Perl, Visual Basic, Python, and C++ • languages such as Omnimark and Balise designed specifically for manipulating XML (and, typically, SGML) documents So why use XSLT? For one thing, it’s a standard. This doesn’t necessarily make XSLT a good language, but it does mean that multiple vendors worked on


Extensible Stylesheet Language Transformations (XSLT) is a language that lets you convert XML documents into other XML documents, into HTML documents, or into almost anything you like. When you specify a series of XSLT instructions for converting a class of XML documents, you do so by creating a “stylesheet,” an XML document that uses specialized XML elements and attributes that describe the changes you want made. The definition of these specialized elements and attributes comes from