The Rise and Fall of the Style Language
Throughout the history of SGML there have been various attempts to define a style language as a means of rendering marked up text on paper or on a screen.
The first style specification language was FOSI (Formatting Output Specification Instance, pronounced fosey), which met with some limited success in American defense circles, but never had much mass impact due to its complexity. (ArborText was the only software company I know of that came close to having a commercially available working implementation.) In parallel with the FOSI initiative came DSSSL, the Document Style Semantics and Specification Language, which provides a full-scale programming language for specifying the style of an SGML document. DSSSL can also be applied to XML documents and on Day 19, "Converting XML with DSSSL," you'll learn a lot more about it.
DSSSL is extremely powerful and complex, and for use on the Web it was perhaps a little too much. A stripped down version called DSSSL-Lite was therefore proposed. DSSSL-Lite was refined into an Internet variation called DSSSL-o (short for DSSSL-online). DSSSL-o was published in December 1995 and reissued in August 1996 to include a few corrections resulting from changes in the final version of the DSSSL standard. DSSSL-o became the basis for the first version of XSL (called XS, short for xml-style).
In May 1997, Jon Bosak, the co-editor of the XML language specification, made a personal draft of a projected style section for the XML specification publicly available on the Internet. (At the time the XML specification was split into three parts, one for the language-what has now become the XML Language Recommendation-one for linking, and one for style.) The thought-provoking title of this document, "XML Part 3: Style [NOT YET]," was intended to warn that the contents should be viewed with suspicion because they were very likely to change. This didn't deter some courageous souls, and it wasn't long before the first software appeared.
In August 1997, a radically improved version of XS, now called XSL (extensible style language), appeared. This was the first version of XSL. I call this version XSL1 to distinguish it from its previous version. XSL1 incorporated all of DSSSL-o, but added new objects and characteristics to support all of the functionality of CSS.
One major difference between DSSSL-o to XSL1 was the complete change in syntax. DSSSL-o was clearly a LISP derivative; recognizable by the rows of brackets that are so familiar to LISP programmers. XSL1, on the other hand, had the same syntax as XML. The implications of this change were quite exciting. For example, it made the style language part of XML as accessible to computer processing (or even generation) as the XML language itself.
While the syntax of the style language changed, a lot of the original DSSSL concepts survived (things like flow objects) almost intact. This incarnation of the XML style language was, however, quite short-lived (less than a year), even though a lot of the software available still supports this version of the language.
On August 18, 1998, a new version of XSL was submitted to the W3C (World Wide Web Consortium). This was actually the first working draft document to be submitted; the other documents were just notes, which didn't convey much official status. This version of XSL still isn't the definitive version of the XML style language, but it gives the development community a reasonable basis on which to move forward.
While development proceeds on a dedicated XML style language, it shouldn't be forgotten that HTML also has its own style language, CSS. CSS can also be applied to XML code and, because CSS is firmly directed toward the display of markup inside a Web browser, it is extremely useful for basic display purposes. In the rest of this chapter we'll examine how you can exploit Web browser support of CSS and HTML to display XML code with the minimum amount of effort.