|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Sorting Index alphabetically
Look up xsl:sort. However, the spec doesn't define the collating sequences that are available, and these may vary by product. Most products will probably sort "Acdes" after "abc" by default (just as a dictionary would). In XSLT 2.0 you can explicitly say collation="http://www.w3.org/2005/xpath-functions/collation/codepoint" in which case characters are sorted according to their Unicode codepoints. This seems to be what you are looking for. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: shailesh [mailto:shailesh@xxxxxxxxxxxx] > Sent: 24 November 2005 13:39 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Sorting Index alphabetically > > Hi All, > > How do I sort index alphabetically using xsl. > > I have xml file like: > > <Keyword>abc</keyword> > <Keyword>abcd</keyword> > <Keyword>abcde</keyword> > <Keyword>abcef</keyword> > <Keyword>bcdes</keyword> > <Keyword>Acdex</keyword> > <Keyword>Bcdes</keyword> > <Keyword>ccdes</keyword> > <Keyword>Ccdes</keyword> > > I have to sort this as > > <h2>A</h2> > Acdes > Acdex > abc > abcd > > <h2>B</h2> > Bcdes > Bcdes > > Thanks, > Shailesh
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








