XSL1
The first version of XSL (released as an unofficial committee draft in October 1997) was a strange mixture of the conceptual models and flow objects from DSSSL-o and a new set of flow objects that mapped the suite of HTML elements, all formulated in XML syntax.
| In earlier chapters, I have used the terms displaying and formatting fairly indiscriminately. Throughout this chapter, when discussing rendering text for display on a screen and formatting text for printing, I will keep to the more neutral term of rendering. |
Once you got used to the power of DSSSL (and fought your way around learning its strange syntax), the trade-down to this first version of XSL felt like an acceptable compromise. Compare Listing 20.1, which shows a fragment of XSL1 code, with Listing 20.2, which shows the equivalent code in DSSSL-o.
Listing 20.1 A Fragment of XSL1 Code
1: <rule> 2: <target-element type="DOC"/> 3: <scroll> 4: <children/> 5: </scroll> 6: </rule>
Listing 20.2 The Equivalent of Listing 20.1 in DSSSL-o Code
1: (element DOC 2: (make scroll 3: (process-children) 4: ) 5: )
| The code fragments shown in Listing 20.1 and 20.2 do exactly the same thing; they simply select the DOC element, create a scroll flow object, and then process the elements that are children of the DOC element. As far as features are concerned, XSL1 was a small step in the right direction. It managed to combine a lot of the DSSSL-o flow objects (though a few useful ones were omitted) with HTML flow objects, which gave it a certain degree of backward compatibility with CSS. The important advance was that instead of forcing you to learn a completely separate syntax, XSL1 was formulated in standard XML syntax. This opened up all sorts of possibilities in that it now became feasible to consider creating not just XML code automatically but also its style code as well. |
I'm not going to go into any further detail about XML1 because it no longer really exists. With the appearance of XSL2, the older version of XSL is completely obsolete.