Hi,
We have strange error started coming recently for using java A=
PI to check file existence. Recently we moved to saxon and earlier we were
using Xalan but I dont think this caused the error. We were using this code
since years or so without any problem and this error =A0comes randomly. I
am not able to replicate this in dev environment. I would appreciate your
help on finding root cause of this problem.
XSL Code:
<xsl:template name="file-exists" xmlns:file="java.io.File">
<xsl:param name="filename"/>
<xsl:choose>
<xsl:when test="file:exists(file:new($filename)) =
'true'">true</xsl:when>
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:template>
Error:
ERROR: 'Cannot convert argument/return type in call to method
'java.io.File.new(reference)''
FATAL ERROR: 'Could not compile stylesheet'
java.lang.ClassCastException:
com.sun.org.apache.xalan.internal.xsltc.compiler.Variable cannot be cast to
com.sun.org.apache.xalan.internal.xsltc.compiler.Param
at
com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable.addParam(Unknown
Source)
--~------------------------------------------------------------------
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>
--~--