Bug report? (XSLT): java.lang.String.replace(char, char) not supported)
Hi,
The following XSLT should call the java.lang.String.replace method to replace dollars in a text() node.
INPUT:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="dollar.xsl"?>
<element>$test $</element>
STYLESHEET:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:jstring="http://www.oracle.com/XSL/Transform/java/java.lang.String">
<xsl:template match="/element">
<xsl:variable name="str" select="jstring:new(text())"/>
<xsl:value-of select="jstring:replace($str,'$','$$')"/>
</xsl:template>
</xsl:stylesheet>
Output:
XSL-1043 Extension function error: method not found 'replace'
However if I call any other method of java.lang.String it works fine. replace is a non-static method, so according to http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/appdev.817/a86030/adx17p12.htm the additional argument to replace(char, char) should be the String instance I want to apply replace on.
I'm using XDK 9.2.0.4.0 and JDK 1.3.1
Any help much appreciated!
Cheers,
Kevin