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

Re: XSLT sorting for index alphabetization

Subject: Re: XSLT sorting for index alphabetization
From: "Wolfgang Laun wolfgang.laun@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Jun 2014 10:18:48 -0000
Re:  XSLT sorting for index alphabetization
On 16/06/2014, Jirka Kosek jirka@xxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 13.6.2014 23:06, David Sewell dsewell@xxxxxxxxxxxx wrote:
>> I spent a bit of time trying to figure out how one might implement
>> the word-by-word system (described at the above URL) using
>> xsl:sort, but I'm not sure it's possible--it seems that
>> word-by-word would require a full-blown recursive sorting routine.
>> I'm happy to be proven wrong, though, by anyone who has tackled
>> this before or is cleverer than I am about such things.
>
> In XSLT 2.0 you can use user- or implementation-defined collations
> using collation="" attribute on xsl:sort.
>
> Using this feature and some effort you can implement any collation.

(I'm assuming that XSLT collations can be defined as in Saxon.)

I've researched several Java collations a few weeks ago, and they can be
pretty nasty. The word-by-word sort David describes is not something
the inventors of the Java Collation definition had in mind; that one
is inherently character based.

If someone comes up with a java.text.RuleBasedCollator implementation
for word-by-word, I'd be *very* much surprised. And, to boot, it ought
to be able
to handle other languages as well, and according to their locale.
(Canadian French sorting is different from French French sorting.
Swiss German... German German... Austrian German... And that's hardly
leaving the Roman alphabet.)

Of course: if the XSLT transformator would let you write a plugin for
the collation, the word-by-word would be manageable with "some
effort".

-W

>
> 				Jirka
>
>
> - --
> - ------------------------------------------------------------------
>   Jirka Kosek      e-mail: jirka@xxxxxxxx      http://xmlguru.cz
> - ------------------------------------------------------------------
>        Professional XML consulting and training services
>   DocBook customization, custom XSLT/XSL-FO document processing
> - ------------------------------------------------------------------
>  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
> - ------------------------------------------------------------------
>     Bringing you XML Prague conference    http://xmlprague.cz
> - ------------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (MingW32)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlOevasACgkQzwmSw7n0dR7MfQCgmIpBXB8oStwH+2k3bcPPuQnb
> 08cAnRq+qkqch4uhJKa0OJ4ytnKspWrd
> =CjZj
> -----END PGP SIGNATURE-----

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.