The Necessity of XSL
I wrote an article on Extended Markup Language (XML) for Netscape
Enterprise Developer (see resource section) that provided an overview
and working examples of XML. Among the examples presented was one
demonstrating that a potential problem with XML is that an application
can use the data exposed in the technology to create any form of
presentation. Some people would consider this to be acceptable, others
would not.
Unlike HTML, XML has no implied presentation associated with any of the
elements. An implied presentation is something such as our assumption
that a paragraph "<P>" tag denotes an element that encloses
content within a block, separated by a line break before and after the
content. However, an XML tag, such as the following, has no implicit
presentation:
<sidebar>This content is within a sidebar element</sidebar>
From the name of the element you could assume that the text or
graphics contained within the element would be output as a sidebar to
the existing content. However, the manner in which the sidebar is laid
out is uncertain. The element's contents could have a white background,
with black text, a font size of 14pt, and a width of 1 inch, all
aligned on the left. Or the sidebar could be specified as having a
yellow background, with a width of 100 pixels, a font size of 8pt, and
aligned on the right. If there were two user agents, such as browsers,
processing the element, chances are there will be two interpretations of
the presentation of the element. Two interpretations of presentation
usually results in a document looking considerably different based on
each interpretation.
So, while CSS1, and now CSS2, finally provide a standardized
presentation of HTML, along comes XML and, again, we are faced with the
potential of chaotic and incompatible presentation styles.
In 1997 the Microsoft, ArborText, and Inso corporations submitted a
proposal for XSL, or Extensible Style Language, in order to address the
potential problems with presentation that arose with the specification
of XML. The rest of this article provides a brief overview of
some features of XSL, including demonstrations of these features.
Add a little style to your XML document with XSL - a Working Example
Add a little style to your XML document with XSL - a Working Example
What is XSL?
|