Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Error checking type of the expression" while running an XSLT transform

843834Aug 9 2006
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2006
Added on Aug 9 2006
0 comments
1,354 views