Subject: Re: [xsl] xpath question From: florian <csshsh@xxxxxxxxxxxxxxx> Date: Sun, 22 Jun 2003 22:59:54 +0200 |
florian wrote:hi!
i unfortunately cant think of a xpath statement for this:
i want to get all the child nodes of my current node, which have an node with the name 'bar' and where the content of the node is 'apples'..
the tricky part now is that the name 'bar' and 'apples' is defined in another node somewhere in the document.
*[*[local-name() = /someNode/@theAttributeWithTheValueBar] = /fruits/roundOnes[1]]
doesnt really seem to work..
<xsl:variable name="barname" select="string(/someNode/@theAttributeWithTheValueBar)"/>
<xsl:variable name="fruitname" select="string(/fruits/roundOnes[1])"/>
then
*[local-name() = $barname and . = $fruitname]
You can do it without variables but this way it gives the processor an opportunity to optimize.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath question, Mike Brown | Thread | Re: [xsl] xpath question, Mike Brown |
Re: [xsl] xpath question, Mike Brown | Date | Re: [xsl] xpath question, Mike Brown |
Month |