Re: [xsl] Strange error: Unknown collation

Subject: Re: [xsl] Strange error: Unknown collation
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 09 Jan 2009 15:17:06 +0100
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.

But if I remove the Max and change this to something else, it works fine!

                <xsl:variable name="errorProducingLine"
select="sum(for $a in $notImportant return number(1+1))"/>

What's wrong with that first second line?

Well the error about the collation goes away as only max compares values and needs a collation.
Why the warning goes away I don't know.


	Martin Honnen

Current Thread