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 stylesheet. They can be called into use with one of two top-level elements, <xsl:include> or <xsl:import>.

In this chapter, we will address the two top-level elements, <xsl:include> and <xsl:import>, along with the related instruction element, <xsl:apply-imports>. We will also discuss the multiple ways in which conflicts between template rules can be resolved.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.162.87