January 2002
Intermediate to advanced
480 pages
11h 5m
English
Before talking about how you will create XSLT style sheets, it is important to know how to link your style sheet to an XML document instance.
There are two ways you can link your style sheet to the document instance:
Statically
Dynamically
The first method, linking your style sheet statically, is the easiest. All you do is place a reference in your XML document to the style sheet. The reference is created using the <?xml-stylesheet> directive. The following XML document fragment shows how to create the link:
<?xml version=”1.0” ?> <?xml-stylesheet type=”text/xsl” href=”invoice.xsl”?> <invoice num=”2317” invoiceDate=”07-09-01”> <!-- style sheet markup goes here --> </invoice>
When the XML processor sees the style sheet ...