xsl-list
[Top] [All Lists]

RE: Multi-level sorting.

2003-06-03 00:31:31
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



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