CSTUG

Stylesheet

<xsl:stylesheet version="1.0">

<!-- This is a generic stylesheet for handling the <xi:include> elements. It is assumed to be imported into other stylesheets. The templates are applied in the 'xinclude' mode so that the root nodes of the included elements are not processed as the root of the main document. Usually you will define template for this mode as: <xsl:template match='/' mode='xinclude'> <xsl:apply-templates/> </xsl:template> Without this the whole included document will be processed in the 'xinclude' mode which is probably not what you wish. -->
<xsl:template match="xi:include"> <xsl:apply-templates select="document(@href)" mode="xinclude"/> </xsl:template> </xsl:stylesheet>

xinclude.xsl