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

RE: Multi-level sorting.

Subject: RE: Multi-level sorting.
From: Jarno.Elovirta@xxxxxxxxx
Date: Tue, 3 Jun 2003 10:31:31 +0300
multi level sorting in xml
Hi,


> I have 3 separate nodes (topnav, bottomnav, & staticnav) 
> within my root
> node.  When all is said and done I want the information to be 
> displayed in
> alphabetical order. I want it sorted by the "name" attribute 
> regardless of
> the level of the node in the tree.  The desirable output would look
> something like this:
> 
> aaa
> bbb
> ccc
> ddd
> eee
> fff
> ...
> ...
> www
> 
> Any help would be appreciated.  My email is 

  <xsl:output method="text"/>
  <xsl:template match="root">
    <xsl:for-each select="descendant::*/@name">
      <xsl:sort select="."/>
      <xsl:value-of select="."/>
      <xsl:text>&#xA;</xsl:text>
    </xsl:for-each>
  </xsl:template>

Cheers,

Jarno - Hocico: Final Resource

 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.