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

RE: Sorting across Multiple branches of XML

Subject: RE: Sorting across Multiple branches of XML
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 9 Jun 2000 14:49:15 +0100
xsl sorting across nodes
> I'm wondering if it's possible to use the <xsl:sort> tag to 
> sort elements
> that lie across multiple branches of my XML file. For 
> instance, my XML might
> look as follows:
> 
> <node_list>
>    <hp>
>       <hp_node>
>         <node_name>aaa</node_name>
>         <type>hp</type>
>       </hp_node>
>       <hp_node>
>         <node_name>ccc</node_name>
>         <type>hp</type>
>       </hp_node>
>    </hp>
>    <sun>
>       <sun_node>
>         <node_name>bbb</node_name>
>         <type>sun</type>
>       </sun_node>
>    </sun>
> </node_list>
> 
> Is there any way to make it appear like this?:
> 
> aaa
> hp
> bbb
> sun
> ccc
> hp
> 
<xsl:for-each select="//node-name">
<xsl:sort select=".">
<xsl:value-of select="."/>
<xsl:value-of select="../type"/>
</xsl:for-each>

Mike Kay


 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.