Two of the lines in example xq497.xml appear to be unnecessary.
<xsl:apply-templates select="$colorLookupDoc"/>
unnecessarily pulls the external file into the main document where it has to be pruned by the
second unnecessary line:
<xsl:template match="colors">
At least that is what I found when trying to perform a similar conversion with output method="xml".
On the other hand, since you didn't include these lines just before the output of the stylesheet:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
the reader will be very disappointed when they try to change the output method to xml and see what happens.
|