<xsl:copy-of select = "transform(document($xml),document($xsl))" />Then it occurred to that you might be able to do the same thing like this (untested) :
<xsl:for-each select = "/xpath/to/some/xref[@style != '']"> <xsl:variable name = "style" select = "@style" /> <xsl:include href = "$style" /> </xsl:for-each> ... <!-- would really be a choose... --> <xsl:if test = "@style"> <xsl:apply-templates> <xsl:apply-templates select="document($uri)/$xpath"/> </xsl:apply-template> </xsl:if>So now I'm wondering if I really need to add an
include
element to the DTD...