Combining Stylesheets

[Example 64] <C>

Other stylesheets can be imported (xsl:import) or included (xsl:include) into a stylesheet.. Importing a stylesheet is the same as including it except that definitions and template rules in the importing stylesheet take precedence over template rules and definitions in the imported stylesheet.This stylesheet and This stylesheet are imported or included into remaining xtylesheets. (NOTE: did XT right job with This stylesheet? SPEC: The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children. When xsl:include is used to include a stylesheet, any xsl:import elements in the included document are moved up in the including document to after any existing xsl:import elements in the including document.)

[Example 65] <C>

This stylesheet imports This stylesheet and This stylesheet imports This stylesheet.

[Example 66] <C>

Results of stylesheet combining depends on the position of xsl:include or xsl:import.

[Example 67] <C>

You can use xsl:apply-imports element to get information from an imported template, whose behaviour you are changing. This stylesheet imports This stylesheet and overrides its template. This stylesheet imports This stylesheet and changes its template. xsl-apply-imports works only for templates imported with xsl:import, not for templates included with xsl:include.(This stylesheet

[Example 70] <C>

Import precedence is more important than priority precedence. Look at This stylesheet.