[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] How to define a custom collation for Saxon8-8J


Subject: [xsl] How to define a custom collation for Saxon8-8J
From: "Wolfgang Schindler" <w.schindler@xxxxxxx>
Date: Tue, 07 Nov 2006 12:22:00 +0100

Hi,

I defined a rudimentary German collation in a basicGerman.java file:

String simpleRule ="a < C$ < A < C < b < c < d < e < f < g < h < i < j < k <
l < m < n < o < p < q < r < s < t < u < v < w < x < y < z";
RuleBasedCollator basicGerman = new RuleBasedCollator (simpleRule);

(Please note: It's far from perfect and doesn't cover everything needed for
German)

Then I wanted to use that collation for sorting in XSLT:

<xsl:template match="myroot">
  <myroot>
	<xsl:apply-templates>
		<xsl:sort select="stich" collation="file://D:/saxonsa8-8j/basicGerman"/>
                </xsl:apply-templates>
  </myroot>
</xsl:template>

When I execute that XSLT I get the following error:

Error at xsl:sort on line 10 of file:/D:/saxonsa8-8j/sort.xsl:
  XTDE1035: Collation file://D:/saxonsa8-8j/basicGerman has not been defined
Failed to compile stylesheet. 1 error detected.

How is a collation "defined" for XSLT sorting?

Many thanks in advance!

Wolfgang


Current Thread
Keywords