XML technologies / XML / Python & XML / Transforming XML with XSLT / XSLT specification
(Excerpt from "Python & XML" by Christopher A. Jones & Fred L. Drake, Jr.)
The XSLT specification is available on the W3C website. Reading this specification is the perfect cure for insomnia. To keep you awake, we summarize the main aspects of XSLT as they relate to Python.
A working XSLT environment uses three different files and at least one piece of software. The first file is the source XML document. The second is the XSL stylesheet containing the transformation rules, itself an XML-conformant document. The third and final file is the transformation’s result document, most likely either HTML or XML. The essential software that performs the transformation is the XSLT processor. It loads the original XML document, applies the transformation rules and outputs the result. The following figure illustrates this arrangement.
Figure: the XSLT transformation process
The XSLT language is based on XML. It is defined as a set of elements and attributes with carefully specified semantics. As you will see, XSLT is very simple.
Copyright © 2002 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from the book "Python & XML" is subject to the same conditions as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top