v64/i18n : default string ordering ( collation )

Post Reply
jmk
Posts: 137
Joined: 31 May 2012, 12:08
Location: France

Hi,
it seems that no default collation is defined in the open source viewer. In this case saxon uses the "http://www.w3.org/2005/xpath-functions/ ... /codepoint" collation.

In this collation the sequence

Code: Select all

 
 ('e','A','f',  'b', 'c', 'E','a')
  
is sorted as

Code: Select all

A E a b c e f
thus separating upper and lower case letters.
jmk
Posts: 137
Joined: 31 May 2012, 12:08
Location: France

Saxon allows to set a default collation before applying a tranbsformation : with the java API one must set the 'DEFAULT_COLLATION' feature in
order to do so....

As an example with the cli :

Code: Select all

java -jar WEB-INF/lib/saxon9he.jar --defaultCollation:'http://saxon.sf.net/collation?lang=en-gb;case-order=upper-first' ./reportXML.xml  ./testcollation2.xsl
sorts the sequence

Code: Select all

('e','A','f',  'b', 'c', 'E','a')
as

Code: Select all

A a b c E e f
thus not separating upper/lower letters.


Note that this imperial :) collation (en-gb) gives also a better result than the "unicode codepoint" with French diacritics : sequence

Code: Select all

('e','A','f', 'é', 'b', 'É', 'c', 'E','a')
is sorted as

Code: Select all

A a b c E e É é f
See the attached file for tests ...

J.-M.
You do not have the required permissions to view the files attached to this post.
Post Reply