[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xpath question

Subject: Re: xpath question
From: Mike Brown <mike@xxxxxxxx>
Date: Sun, 22 Jun 2003 14:37:42 -0600 (MDT)
Re:  xpath question
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.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • xpath question
    • florian - Sun, 22 Jun 2003 14:49:14 -0400 (EDT)
      • Mike Brown - Sun, 22 Jun 2003 16:37:46 -0400 (EDT) <=
        • florian - Sun, 22 Jun 2003 17:02:18 -0400 (EDT)
          • Mike Brown - Sun, 22 Jun 2003 17:12:10 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.