Next / Previous / Contents / Shipman's homepage

7.4. xsl:import: Use templates from another stylesheet

The purpose of this tag is to allow modularity in the design of stylesheets. After using the xsl:import element to refers to another XSLT stylesheet, you can use any of the templates in that other stylesheet.

When your stylesheet and the other stylesheet have templates for the same situation, your stylesheet takes precedence. Every template is assigned a priority, and the priority of an imported stylesheet is lower than that of the importing stylesheet.

Even in the case that some template T1 from your stylesheet overrides another template T2 from an imported stylesheet, template T1 can use T2 in its processing. See the xsl:apply-imports tag, below.


href (required)

This attribute defines the URI of the stylesheet you are importing.

Example (note that this tag is always empty):

    <xsl:import href=""/>