Next / Previous / Contents / TCC Help System / NM Tech homepage

8.4. <xsl:include>: Insert another stylesheet

Another tool for modular XSLT programming is the <xsl:include> tag, which effectively means “insert another stylesheet here.” There is one attribute:


To include another stylesheet, give its URI as the value of this attribute.

There is a difference between importing and including a stylesheet. The <xsl:import> element lets you use templates from another stylesheet, but those templates have a lower priority and can be overridden by your templates. If you use <xsl:include>, though, any templates in the included stylesheet have the same priority as your other templates; it's as if that stylesheet were copied into the middle of your stylesheet.