xsl-list
[Top] [All Lists]

muliple level sorting using xsl:sort

2005-09-05 02:19:01
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 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>