Standard stylesheet references

To ensure interoperability between all applications that can detect a reference to a stylesheet from within an XML document, a standard mechanism has been devised by the W3C. Version 1.0 of the 'Associating Style Sheets with XML documents' standard was released in June 1999, and can be found at http://www.w3.org/TR/xml-stylesheet.

This approach uses a processing instruction with the target name 'xml-stylesheet'. This processing instruction must occur before the root element:

<?xml-stylesheet ... ?>

Name and type

A number of parameters can be included, and each one resembles the format of an attribute appearing in a start-tag. The 'attribute' names, and the values each may take, are the same as those defined in ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.