xsl-list
[Top] [All Lists]

Multi-level sorting.

2003-06-02 09:00:18
Hi,

I am having a problem with sorting nodes.  Below is the XML structure that I
have. 

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 
viral(_dot_)patel(_at_)countryfinancial(_dot_)com
Thanks

<root>
        <topnav>
                <level1 name="rrr">
                        <level2 name="uuu">
                                <level3 name="www">some content</level3>
                                <level3 name="bbb">some content</level3>
                        </level2>
                        <level2 name="ooo">
                                <level3 name="ccc">some content</level3>
                                <level3 name="qqq">some content</level3>
                        </level2>
                </level1>
                <level1 name="mmm">
                        <level2 name="ddd">
                                <level3 name="aaa">some content</level3>
                        </level2>
                </level1>
        </topnav>
        
        <bottomnav>
                <level1 name="ttt">
                        <level2 name="vvv">
                                <level3 name="eee">some content</level3>
                                <level3 name="sss">some content</level3>
                        </level2>
                        <level2 name="ppp">
                                <level3 name="fff">some content</level3>
                                <level3 name="nnn">some content</level3>
                        </level2>
                </level1>
                <level1 name="ggg">
                        <level2 name="kkk">
                                <level3 name="iii">some content</level3>
                        </level2>
                </level1>
        </bottomnav>
        
        <staticnav>
                <level1 name="hhh">
                        <level2 name="jjj">
                                <level3 name="lll">some content</level3>
                        </level2>
                </level1>
        </staticnav>
</root>
























Viral Patel
Web Development
mailto:viral(_dot_)patel(_at_)countryfinancial(_dot_)com
Ph: (309) 821-6605

COUNTRY Insurance & Financial Services
http://www.countryfinancial.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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