xslt Installation or Setup


Example

XSLT is a special-purpose programming language; it is widely used for transforming XML documents either into a different XML format, into HTML, or into text-based formats.

There are two main versions of XSLT in use: XSLT 1.0 and XSLT 2.0. XSLT 1.0 is more widely implemented but has many restrictions and limitations compared with XSLT 2.0; you will need to decide which version to use. If an XSLT 2.0 processor is available for your chosen environment, then this is almost always the better choice.

(XSLT 1.0 came out in November 1999, and many implementations appeared within a year or two, both from mainstream vendors such as Microsoft, IBM, Sun, and Oracle, and from individual enthusiasts working in their spare time. XSLT 2.0 came out in January 2007, and many of the original 1.0 processors were never upgraded, because their developers had lost interest. The most widely used XSLT 2.0 processor is Saxon, but it does not have the field to itself: other free-standing products include RaptorXML (from Altova), XmlPrime (from CBCL) and Exselt, and 2.0 processors are also available embedded in IBM's WebLogic, in MarkLogic's XML database server, and in Intel's XML Accelerator.)

The specification of XSLT 3.0 is technically complete (Proposed Recommendation in April 2017) but is best regarded as bleeding-edge for the time being: only consider it if you have a pressing need for its new features, such as streaming, packages, JSON support, or try/catch. There are three known implementations: Saxon, Exselt, and RaptorXML.

To get started with XSLT you have several options:

  • Use an online XSLT tool. There are several available (search for "online XSLT tool"), a very reliable online IDE is http://xsltransform.net/. This is a good way of getting an initial feel for the language, but you won't want to carry on this way once you are doing real development.

  • Use the XSLT engine built into every browser. As with online tools, these have the advantage that you don't need to install anything; but the browsers only support XSLT 1.0, they only support XML-to-HTML conversion, and they have very weak debugging support. A very recent -- but still experimental -- development is Saxon-JS, which allows execution of XSLT 2.0 (and parts of XSLT 3.0) in the browser.

  • Install an XSLT processor (such as Saxon or xsltproc). Most of these products can be invoked using the operating system command line, or using an API for particular programming languages such as Java, C, C#, or Python.

  • Install an XML development environment such as Altova XML Spy, oXygen from SyncroSoft, or Stylus Studio. Although this is a more expensive option, it gives much richer development support and debugging capability.

Whichever option you choose, you should first decide whether you want to use XSLT 1.0 or XSLT 2.0.