Chapter 7. Using Multiple Stylesheets

  • <xsl:include>

  • <xsl:import>

  • <xsl:apply-imports>

  • Conflict resolution for template rules

Up to this point in our discussion of XSLT stylesheets, we have talked about the stylesheet as the only file that contains all the templates that are being processed. XSLT also allows you to work with more than one stylesheet at a time.

The possibility of using multiple stylesheets and accessing their content selectively provides a means of grouping related template rules, packaging them together according to their function. For example, you may want to have a separate stylesheet that only handles tables, or one that handles list formatting. These separate stylesheets do not need to be physically incorporated into the main ...

Get XSLT and XPATH: A Guide to XML Transformations 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.