## Re: [saxon] Problem with xsl:sort and German

 Re: [saxon] Problem with xsl:sort and German From: - 2009-08-17 18:32:17 ```Hi again: So I've been playing around with feeding the collator rules that Dr. Kay posted below but a number of strange errors keep cropping up. My code looks like this: My output (just the A's) looks like this: A -a- Achenbach, Bern Achtelstetter, Karin Acquistapace, Eva Adler, Max Adolph, R Adrion, Irma Ahlers-Hestermann, Friedrich Ahlers, Jens Ahner, Alf Albrecht, Dietmar Albrecht, Dietmar Albrecht, Günter, Kurt Böttcher, Herbert Greimer-Mai, Paul Günter Krohn, eds Albrecht, Herbert Albus, Günther Albus, Günther Albus, Günther Alfred Kerr Alker, Ernst Altorfer, Max Amoretti, Giovanni Vittorio and Anderson, Bernard R Anderson, Lisa Marie Anders, Dorothea Andrews, D.J Anger, Jenny Anon Anz, Thomas Appuhn, H Arbiter Arndt, Karl Arnim, Gabriele von Arnold, Armin Arnold, Arnim Arntz, Wilhelm F Ashizu, Takeo Asriel, Andre Asvarišč, B Augat, Susanne Augat, Susanne, Hrsg. Andrea Rudolph and Volker Probst Augustin, Elisabeth Ayre, Robert A, von A, W My question is why have A, von and A, W been sorted to the bottom of the list? It seems to weight longer strings more heavily? As Ahlers-Hestermann, Friedrich also sorts before Ahlers, Jens. Have I made an error in the text rules? Note that when I try the rule set in the example below then I get a "string inddx out of range: #" error. Thanks once again for all of your advice. Regards, Jacob >---- Original message ---- >>Date: Thu, 13 Aug 2009 12:53:23 +0100 >>From: Michael Kay >>Subject: Re: [saxon] Problem with xsl:sort and German >>To: "'Mailing list for the SAXON XSLT and XQuery processor'" >> >>> >>> For the time being, until I get this working, I would suggest >>> either (a) creating a Java RuleBasedCollator that contains >>> the required rules, or (b) using the new configuration file >>> in Saxon 9.2 to define the collation. >>> >> >>I have committed a patch to 9.1 and 9.2 to make this work. The bug entry is >> >>https://sourceforge.net/tracker/?func=browse&group_id=29872&atid=397617 >> >>Here's a test stylesheet that works after applying this patch. Note the need >>to call encode-for-uri(). >> >> >>>version="2.0"> >> >> >> >> >> >> >> > ' ' , ':' , ';' , '<' , '=' , '>' , '?' , '@', '!', >> '[' , '\' , ']' , '^' , '_' , '`', >> '{' , '|' , '}' , '~' >> '!' , '"' , '#' , '\$' , '%' , '&', ''' , '(' , ')' , '*' , '+' , >>',' , '-' , '.' , '/' >> >>< A,a < B,b < C,c < D,d < E,e < F,f < G,g >>< H,h < I,i < J,j < K,k < L,l < N,n < M,m >>< O,o < P,p < Q,q < R,r < S,s < T,t >>< U,u < ü < V,v < W,w < X,x < Y,y < Z,z >> >>< 0 < 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 >>]]> >> >> >> >> >> >collation="http://saxon.sf.net/collation?rules={encode-for-uri(\$rules)}"/>; >> >> >> >> >> >> >> >> >> >>------------------------------------------------------------------------------ >>Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>trial. Simplify your report design, integration and deployment - and focus on >>what you do best, core application coding. Discover what's new with >>Crystal Reports now. http://p.sf.net/sfu/bobj-july >>_______________________________________________ >>saxon-help mailing list archived at http://saxon.markmail.org/ >>saxon-help@... >>https://lists.sourceforge.net/lists/listinfo/saxon-help > >------------------------------------------------------------------------------ >Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >trial. Simplify your report design, integration and deployment - and focus on >what you do best, core application coding. Discover what's new with >Crystal Reports now. http://p.sf.net/sfu/bobj-july >_______________________________________________ >saxon-help mailing list archived at http://saxon.markmail.org/ >saxon-help@... >https://lists.sourceforge.net/lists/listinfo/saxon-help ```