Hello,
I am looking for a method to draw output in a result (output) document in XSLT. I know the method in which xsl:result-documentnode is created so that a single transformation is applicable to multiple documents. Usually this method uses several passes, for example:
<xsl:template match="/">
<xsl:apply-templates select="*"/>
<xsl:result-document href="test.xml">
<xsl:apply-templates select="*"/>
</xsl:result-document>
</xsl:template>
I am looking for a way to do this inline so that I can create two output documents in one pass. The reason is because I have a temporary tree that is created when the conversion that I want to output to the file is performed.
<xsl:variable name="treeBase">
<Base/>
</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="these_elements">
<xsl:param name="temp" select="$treeBase"/>
</xsl:template>
<xsl:template match="not_these_elements">
<xsl:param name="temp" select="$treeBase"/>
<xsl:apply-templates select="@*|node()">
<xsl:with-param name="temp">
<Base>
<xsl:copy-of select="$temp/Base/*"/>
<Item>
<xsl:value-of select="ThisItem"/>
</Item>
</Base>
</xsl:with-param>
</xsl:template>
?
XSLT . , , , . .
XSLT , ?
.