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

Consolidating xpath expressions....

Subject: Consolidating xpath expressions....
From: Oliver Lord <ol@xxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2003 10:47:55 +0000
oliver lord
Hi.

Can someone give me some advice as to how I can change these three lines of code into a single line??

<xsl:for-each select="//client[not($clientid) or @ID=$clientid]">
<xsl:for-each select="descendant-or-self::client">
<xsl:for-each select="usage[@TOTALSENT > 0]">
..... do something here....
<xsl:for-each>
<xsl:for-each>
<xsl:for-each>


It would be really great if I could just do..... <xsl:for-each select="### super select that does all that! ###"> ..... do something here.... </xsl:for-each>

... but I just can't figure it out.

The transformation is on an Xml document that's a little bit like this...

<client ID=1>
  <client ID=2>
    <client ID=3>
      <usage @TOTALSENT=5/>
      <client ID=5>
        <usage @TOTALSENT=10/>
      </client>
    </client>
  <client>
  <usage @TOTALSENT=9/>
  <client ID=4>
  </client>
</client>

... and I would like to loop through all the clients at a depth of 'n' in the tree.


Any help would be really great.
Thanks.
Ollie Lord.



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



Current Thread

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.