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

Re: muliple level sorting using xsl:sort

Subject: Re: muliple level sorting using xsl:sort
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 6 Sep 2005 06:50:20 +1000
xsl sort data by desc
You never showed what the result should be.

I simply don't understand what problem you have...

And I don't want to assume something not stated, like the other
people, answering this post do.

Cheers,
Dimitre Novatchev.

On 9/5/05, Aravind J <aravindjp@xxxxxxxxx> wrote:
> Hi ,
> I am trying to sort an xml data like
> <AAAA>
> <desc>SampleXML</desc>
> <Part>
> <code>
>  <name>1</name>
> </code>
> </Part>
> <Part>
>  <code>
>  <name>5</name>
>  </code>
>  <child type="child">
>  <Part>
>   <code><name>5-4</name></code>
>     <child type="child">
>     <Part>
>        <code><name>abc</name></code>
>     </Part>
>    <Part>
>     <code><name>def</name></code>
>     </Part>
>   </child>
>   </Part>
>  <Part>
>  <code><name>5-3</name></code>
>  </Part>
>  </child>
> </Part>
> <Part>
> <code>
>  <name>2</name>
> </code>
> </Part>
> </AAAA>
>
>
> when i tried to sort the data using
>  <xsl:for-each select="Part">
> <xsl:sort data-type="number"
> select="descendant-or-self::code/name"/> it is doing e
> first level sorting correctly, ie data is sorted in
> 1,2,5 order (code/name) . but sub parts of <part> 5 ie
> 5-3 and 5-4 are not getting sorted , similarly for
> children of 5-4 also.
>
> Any idea how we can sort sub parts ie (child <Part> )
> also in this case .
>
> Thanks & Regards
> Aravind
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>


--
Cheers,
Dimitre Novatchev
---------------------------------------
Harry did not ask how Dumbledore knew; ...but Harry had long since
learned that bangs and smoke were more often the marks of ineptitude
than expertise.

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.