Here's what you can do.
###xmlor
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="@* | text()" mode="copy">
<xsl:copy />
</xsl:template>
<xsl:template match="*" mode="copy">
<xsl:copy>
<xsl:apply-templates select="@*" mode="copy" />
<xsl:apply-templates mode="copy" />
</xsl:copy>
</xsl:template>
###xml
<xsl:template match="*" mode="copy">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:copy-of select="*|text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="a">
<xsl:copy-of select="."/> <!-- copy a text -->
... enqueue manually...
</xsl:template>
'IT > XSL' 카테고리의 다른 글
xsl에서 노드를 카피하면서 attribute의 값을 바꾸기 (0) | 2011.11.23 |
---|---|
xpath to filter a specific 'value' of the node (0) | 2011.11.23 |