Stretching the Concept of the Document
XML: One Size Fits All
By Tim Bray
The first wave of XML fans was made up of people
who'd spent years working in the SGML community, mostly with a publishing
background. These people knew what a document was, what a style sheet was,
and how to publish information for human consumption. The second generation
of XML users is starting to crowd the conference hallways and Internet forums,
and they're a kettle of fish of a different color, so to speak. Mostly, they're
computer programmers trying to build stuff that works across the network,
and they're seizing on XML as a way to move structured data back and forth
between this application and that. Most of them go from day to day without
worrying about fonts or white space or image wrapping or table rendering.
It's reasonable to wonder what will become of the notion of a document in
general, and the culture of XML in particular, when the second wave becomes
(as it soon will) the majority.
Documents and XML Documents
What is a document, after all? In the XML context, we have a very precise
answer, which you can find specified in prose, as in the W3C Recommendation,
or check by running any one of a number of excellent XML processors (see "
\
Online").
An XML document has elements and attributes stacked up in a nice, orderly
tree with a single enclosing "root" element.