Associating a Stylesheet

The xml-stylesheet processing instruction is used to associate an XML document with a CSS style sheet or with an XSLT stylesheet of the type you saw in earlier chapters.

Tip

Place the xml-stylesheet processing instruction in the prolog of the XML document, in the line immediately after the XML declaration, if you used one.

The general form of the necessary processing instruction is as follows:

<?xml-stylesheet href="CSSStyleSheet.css" type="text/css" ?> 

The second part of the xml-stylesheet processing instruction consists of two pseudoattributes (these aren’t true attributes because they aren’t associated with an element)—the ...

Get Sams Teach Yourself XML in 10 Minutes 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.