Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.7
-
None
-
None
-
Windows XP SP2, JDK 1.4.2
-
fp2
Description
Using java extensions, if any java class method returns not String values say an int, we get an error "Cannot find external method xxx.xxx.xxx (must be public)" and also the xsl file is not compiling.
This seems to be working fine in xalan version 2.6.0, and when we upgraded to version 2.7.0, found it to be not working.
code snapshot:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xalan/java" xmlns:MyString="xalan://java.lang.String" exclude-result-prefixes="java MyString">
<xsl:variable name="creditClassThreshold">0</xsl:variable>
<xsl:variable name="cs" select="MyString:new('XALAN')"/>
<xsl:variable name="result"><xsl:value-of select="MyString:compareToIgnoreCase($cs, $creditClassThreshold)"/></xsl:variable>
<xsl:template match="/.">
<response>
"><xsl:value-of select="$result"/>
</response>
</xsl:template>
</xsl:stylesheet>