xsl:include

Specifies an XSLT stylesheet that is included in and combined with the stylesheet that specifies xsl:include.

Format

<xsl:include href="stylesheet_path">
               

            

stylesheet_path specifies the stylesheet you want to import. Specify a URL, a relative path, or a DOS-style path.

Description

The xsl:include instruction must be a child of an xsl:stylesheet element. The XSLT processor effectively replaces the xsl:include instruction with the children of the root xsl:stylesheet element of the included stylesheet. If the root element of the included stylesheet is a literal result element, the XSLT processor effectively replaces the xsl:include instruction with the following new element whose only child is that literal result element:

<xsl:template match="/">

A stylesheet cannot include itself directly or indirectly.

 
Free Stylus Studio XML Training: