Skip to Content
Special Edition Using XSLT
book

Special Edition Using XSLT

by Michael Floyd
January 2002
Intermediate to advanced
480 pages
11h 5m
English
Que
Content preview from Special Edition Using XSLT

Linking Your Style Sheet

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Special Edition Using XML, Second Edition

Special Edition Using XML, Second Edition

- et al. David Gulbransen
XML for Publishers

XML for Publishers

Keith Fahlgren

Publisher Resources

ISBN: 0789725053Purchase book