Chapter 2. The XSLT Processing Model
This chapter takes a bird's-eye view of what an XSLT processor does. We start by looking at a system overview: what are the inputs and outputs of the processor?
Then we look in some detail at the data model, in particular the structure of the tree representation of XML documents. An important message here is that XSLT transformations do not operate on XML documents as text; they operate on the abstract tree-like information structure represented by the markup.
Having established the data model, I will describe the processing sequence that occurs when a source document and a stylesheet are brought together. XSLT is not a conventional procedural language; it consists of a collection of template rules defining output that is produced when particular patterns are matched in the input. As seen in Chapter 1, this rule-based processing structure is one of the distinguishing features of the XSLT language.
Finally, we look at the way in which variables and expressions can be used in an XSLT stylesheet, and also look at the various data types available.
XSLT: A System Overview
This section looks at the nature of the transformation process performed by XSLT, concentrating on the inputs and outputs of a transformation.
A Simplified Overview
The core task of an XSLT processor is to apply a stylesheet to a source document and produce a result document. This is shown in Figure 2-1.
As a first approximation we can think of the source document, the stylesheet, and the ...
Get XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.