In the previous chapter we have explained how XSLT can be used to transform
a document from XML to XHTML. We did this by adding an XSL style sheet to the
XML file and let the browser do the transformations.
A D V E R T I S E M E N T
Even if this works fine, it is not always desirable to include a style sheet
reference in an XML file
A more versatile solution would be to use a JavaScript to do the transformations.
By using a JavaScript, we can:
do the browser-specific testing
use different style sheets according to the browser and user needs
That is the beauty of XSLT! One of the design goals for the XSLT was to make it
possible to transform data from one format to another, supporting different
browsers and different user needs.
XSLT transformation on the client side is bound to be a major part of the
browsers work task in the future, as we will see a growth in the specialized
browser market (Braille, aural browsers, Web printers, handheld devices, etc.)
|