The <?xsl:stylesheet?> Processing Instruction

When you have an XSL stylesheet you want to apply to an XML document, you need some way of connecting that stylesheet to the document, and that’s often done with the <?xsl:stylesheet?> processing instruction. This instruction has several possible attributes:

  • href (mandatory). The URI of the stylesheet. May be a full URI, or may be of the fragment form #new_style. Set to a URI.

  • type (mandatory). The MIME type of the stylesheet. Typically “text/xml” or “application/xml”. For the Internet Explorer, use “text/xsl”. Set to a valid MIME type.

  • title (optional). Use a title to distinguish between several <?xsl:stylesheet?> elements. Some XML parsers enable you to specify which one to use. Set to a string ...

Get Inside XSLT 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.