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

RE: Sort problem

Subject: RE: Sort problem
From: "Eyal Shneider" <Eyal@xxxxxxxxxxxx>
Date: Fri, 26 Jan 2001 13:43:38 +0200
RE:  Sort problem
mmm... Great.

I tried these sorting lines and it worked:

<xsl:sort
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz
')" order="ascending"/>
<xsl:sort select="pageID" order="ascending"/>
<xsl:sort select="lineID" order="ascending"/>
<xsl:sort select="wordID" order="ascending"/>

Note that the translate() function is not a complete solution for case
convertion (For example - for other languages other than English)
But this is the only solution for now, according to -
http://www.w3.org/TR/xpath#section-String-Functions
I hope this helped...

Eyal.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mick
Sent: Friday, January 26, 2001 1:25 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Sort problem


The sorting order should be:

word (alphabetical order), pageID, lineID, wordID

but ignoring the fact whether a word start with an upper-case letter or not.
Another example - if I have the following (in the order the words should
appear):

cat, 1, 1, 1
Cat, 1, 1, 2
cat, 1, 1, 3
Dog, 1, 2, 1
dog, 1, 2, 2

the list is ordered by <word> first, and then by <pageID>, <lineID> and
<wordID>. Sorting with <xsl:sort select="."/> on the <word> element gives
me:

cat, 1, 1, 1
cat, 1, 1, 3
Cat, 1, 1, 2
dog, 1, 2, 2
Dog, 1, 2, 1

and puts lower-case letters before upper-case, which is not what I want. Any
ideas again?

-mick




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


Current Thread
  • RE: Sort problem, (continued)
    • Eyal Shneider - Fri, 26 Jan 2001 05:24:16 -0500 (EST)
      • Mick - Fri, 26 Jan 2001 05:45:03 -0500 (EST)
    • Eyal Shneider - Fri, 26 Jan 2001 06:10:05 -0500 (EST)
      • Mick - Fri, 26 Jan 2001 06:25:32 -0500 (EST)
    • Eyal Shneider - Fri, 26 Jan 2001 06:50:27 -0500 (EST) <=

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.