You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by malcolm cooke <ma...@firstlightassociates.co.uk> on 2002/10/04 12:32:43 UTC
Bug in implementation of exslt math:max??
Hi,
We've encountered a problem trying to use the math:max extension function
which looks as if it may be a bug, but it could always be us missing
something obvious.... our observations can be found at the end of the message.
*******************************************
Our test.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<values>
<value>0</value>
<value>-1</value>
</values>
*******************************************
Our tester.xsl file :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:exmath="http://exslt.org/math"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:redirect="http://org.apache.xalan.lib.Redirect"
extension-element-prefixes="xalan exmath
redirect"
>
<xsl:template match="values">
<xsl:message> about to do max </xsl:message>
<xsl:value-of select="exmath:max(value)"/>
</xsl:template>
</xsl:stylesheet>
*******************************************
Our results :
run-xalan test.xml tester.xsl dummy.xml
---------------------------------------------------------
Running the XSL Processor, xalan, with the following specifications:
- XML File: test.xml
- XSL File: tester.xsl
- Output File: dummy.xml
---------------------------------------------------------
>>>>>>> Xalan Version Xalan Java 2.4.0, <<<<<<<
file:///I:/FLA/testarea/tester.xsl; Line #11; Column #17; about to do max
(Location of error unknown)XSLT Error
(javax.xml.transform.TransformerException)
: java.lang.IllegalArgumentException: Node must be non-null for
getDTMHandleFrom
Node
*******************************************
Our observations:
This error seems to only occur if the maximum value is not > 0.
Comments, suggestions about where we may be making wrong assumptions etc
would be very helpful.
Thanks
Malcolm Cooke
http://www.firstlightassociates.co.uk