xsl-list
[Top] [All Lists]

RE: Sorting Index alphabetically

2005-11-24 06:52:06
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(_at_)quagnito(_dot_)net] 
Sent: 24 November 2005 13:39
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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



--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>