Multiple Stylesheets

XSLT provides two mechanisms for breaking an xsl:stylesheet into multiple documents. The simplest mechanism is the xsl:include directive. The xsl:include directive references an external xsl:stylesheet by its URI. When an xsl:include directive appears as a child of an xsl:stylesheet, the XSLT directives found in the referenced document will be inserted into the current document just as if they were defined inline. For example, consider the following two XSLT stylesheets:

 <?xml version='1.0' ?> <!-- stylesheeta.xsl --> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:template name='func-a' ><a/></xsl:template> </xsl:stylesheet> <?xml version='1.0' ?> <!-- stylesheetb.xsl --> <xsl:stylesheet ...

Get Essential XML: Beyond Markup 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.