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

RE: Sorting Index alphabetically

Subject: RE: Sorting Index alphabetically
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 24 Nov 2005 13:52:06 -0000
sorting index
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

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.