I hope this is the right forum.
I am trying to modify an XSLT transformation, using JDK 1.5. I have an extension function that I should use for localization. When I try to run the transformation I get the following error:
ERROR: 'Error checking type of the expression 'com.sun.org.apache.xalan.internal.xsltc.compiler.ApplyTemplates@16c006e'.'
FATAL ERROR: 'Could not compile stylesheet'
Apparently it's a bug in the JDK:
http://hatatap.pingdynasty.com/usage.html
However, this is what I found:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6409233
I'm not sure if this is exactly the same bug, but I tried also with function-available, without success. I still get the same error.
Of the several versions of my xsl file I tried, this is the last one:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:localizer="Localizer" version="1.0">
<xsl:choose>
<xsl:when test="function-available('localizer:localize')">
<xsl:apply-templates select="localizer:localize('test')"/>
available
</xsl:when>
<xsl:otherwise>
not available
</xsl:otherwise>
</xsl:choose>
</xsl:stylesheet>
I'm not sure I made everything correctly. Hopefully I didn't: if it's a bug in the JDK at the moment it's not a good option for me to use xalan.
Maybe there is another solution?