I am using Saxon 9, and I really wonder why this go wrong.
2009/1/9 Martin Honnen <Martin(_dot_)Honnen(_at_)gmx(_dot_)de>:
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 http://www.w3.org/TR/xpath-functions/#ERRFOCH0002 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
http://JavaScript.FAQTs.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--