Re: [xsl] Strange error: Unknown collation

Subject: Re: [xsl] Strange error: Unknown collation
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 09 Jan 2009 09:55:17 -0500

One subtlety is that max(1,2) has two arguments, and the sequence from which the maximum is returned needs to be given in a single argument (the first). So max((1,2)) would return "2".

It's extra subtle since a second argument may be given to max() to provide a collation. 2 doesn't appear to be a known collation. :->

(The warning could be spurious, disappearing when the first thing is fixed, or it could be real; it depends on stuff we haven't seen.)


At 09:17 AM 1/9/2009, you wrote:
peter verhaar wrote:

The following 2 lines:
                <xsl:variable name="notImportant" select="(1,2)"/>
                <xsl:variable name="errorProducingLine"
select="sum(for $a in $notImportant return number(max(1,2)))"/>
Are producing an error/warning on the closing bracket of the second line:
Error: FOCH0002: Unknown collation
Warning: SXWN9001: A variable with no following sibling instructions
has no effect

Can you tell us which version of which XSLT processor you use?
I think the error means that the XSLT processor does not support the collation needed for the max comparison.
The warning seems to indicate that the template has the xsl:variable but no instruction following that could use the variable.

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread