WebRef Update: Featured Review: XML: A Primer | WebReference

WebRef Update: Featured Review: XML: A Primer

Book Review: XML: A Primer

"XML: A Primer" is a fine book that gracefully brings the uninitiated into the world of XML (eXtensible Markup Language). While few of us as Web developers are sure of where XML fits into our lives today, we can all be relatively certain that XML is going to be important - if not essential - in the none too distant future. If this describes your take on XML, then this book is for you.

Author Simon St. Laurent begins the book with a highly effective presentation of how XML has evolved out of current Web standards, and why its future is so promising. St. Laurent accomplishes this by taking the reader through the origins of the Web and of HTML, and then through a discussion of Cascading Style Sheets (CSS). An understanding of CSS allows the user to grasp the value of being able to separate content from formatting, in that CSS emphasizes the structure and rendering of Web documents. Since this is familiar turf for most Web developers, it proves an effective launching pad for gaining an understanding of XML. The author also points to the common origins for XML and HTML in Standardized Generalized Markup Language, or SGML, but an understanding of SGML is not required for reading this book or for understanding XML.

In St. Laurent's view, XML starts where CSS leaves off. While CSS brings the nettlesome job of formatting Web content into a controlled environment, it also ends there. XML brings structures for managing data to the table (no pun intended), and just as CSS eases the job of giving content a particular look and feel, XML makes it easier to give Web content "meaning." For instance, while CSS makes it easy to specify that the text "blue" inside a given element will appear rendered in the color blue, XML allows us to say that the same text "blue" is the value for the color attribute of a pair of pants. XML helps us turn what is otherwise a stream of information - the Web page - into structured, manageable and meaningful data.

Going further, St. Laurent introduces XSL, or Extensible Style Sheets, before returning to the job of providing the reader with a basic understanding of how XML works and of how to work with it. If we already have a powerful formatting vehicle in CSS, then what does XSL bring the table? As the author says, "[CSS] ...work by annotating existing document structures...(XSL) takes a much more dramatic approach, transforming the document...." The XSL standard, for instance, includes a mini programming language, and doesn't even have to be used for "formatting" an XML document at all. For instance, the combination of an XML document and one XSL stylesheet could result in an HTML document, while replacing the XSL stylesheet with another could transform the same XML file into a Revisable Text Format (RTF) document. The author also fully addresses XLinks and XPointers. Just as XSL stylesheets go beyond their CSS cousins, XLinks and XPointers provide more functionality than HTML's comparable anchor elements.

I especially liked the chapter on "Re-creating Web and Paper Documents with XML." Most books provide relatively small-scale examples to illuminate discussions of XML and related technologies. As we know, the demo always makes it look easy, and readers of such books could come to expect that XML in practice will largely be small data islands in Web pages and translated tabular data on a server. But here's where St. Laurent's roots in SGML allow him to go one better, and present a much larger picture. "XML: A Primer" presents an involved case study in which a large and complicated document, an entire chapter of a book, is taken from the typewriter to the world of XML. Readers of this chapter will definitely appreciate the broader role XML can play in managing many different kinds of data as they get to sweat a little with St. Laurent over how to make an effective transition from a complicated text to a valid, well-formed XML document.

Next: Where XML: A Primer falls short

This article originally appeared in the April 6, 2000 edition of the WebReference Update Newsletter.


Comments are welcome
Written by Gordon Rose and

Revised: May 9, 2000

URL: http://webreference.com/new/xml.html