[Home] [By Thread] [By Date] [Recent Entries]
David Carlisle schrieb:
You can see that the node test node() is true for attribute nodes if you apply it to an axis that has such nodes, as in:
<xsl:template match="@node()|node()">
<xsl:copy>
<xsl:apply-templates select="@node()|node()"/>
</xsl:copy>
</xsl:template>This probably has been proposed before, but I haven't seen it yet. Interestingly (and regrettably), LibXSLT 1.1.24 will compile this in the path expression (@select), but not in the match pattern. xsltCompilePattern : failed to compile '@node()' (Yes, I'm going to notify Daniel.) node() matches attributes in other contexts too, such as the xpath2 expression Great test - I'd never have thought of that. Michael Ludwig
|

Cart



