Subject: Re: [xsl] returning nodes which have a specific child From: Michael Ludwig <mlu@xxxxxxxxxxxxx> Date: Fri, 03 Jul 2009 19:07:18 +0200 |
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:
attribute:node()
To further clarify or mystify or nodify all this node salad, here's an alternative, more symmetrical syntax for our beloved identity template:
<xsl:template match="@node()|node()"> <xsl:copy> <xsl:apply-templates select="@node()|node()"/> </xsl:copy> </xsl:template>
Interestingly (and regrettably), LibXSLT 1.1.24 will compile this in the path expression (@select), but not in the match pattern.
node() matches attributes in other contexts too, such as the xpath2 expression
@foo instance of node()
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] returning nodes which hav, Mukul Gandhi | Thread | Re: [xsl] returning nodes which hav, David Carlisle |
Re: [xsl] Is it possible to rewrite, David Carlisle | Date | Re: [xsl] Is it possible to rewrite, Hermann Stamm-Wilbra |
Month |