XSLTC cannot compile a stylesheet. Bug or not bug?

A

Andrea Desole

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 would also like to know what's wrong with the Sun's search engine, by
the way: I searched for "Error checking type of the expression", with
quotes, and I got more than 212000 results, of which the second didn't
have the phrase already)

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:eek:therwise>
not available
</xsl:eek:therwise>
</xsl:choose>
</xsl:stylesheet>

I am definitely not an xml expert, so it's possible that I made a
mistake, but if it's a bug in the JDK 1.5 maybe someone knows something

Thanks
 
M

Moiristo

Andrea said:
I am definitely not an xml expert, so it's possible that I made a
mistake, but if it's a bug in the JDK 1.5 maybe someone knows something

I am no expert either, but you could try the workaround given in the
first URL you gave; it says that you could try to use another
transformer. I guess the latest xalan library doesn't have this bug.
 
A

Andrea Desole

Moiristo said:
I am no expert either, but you could try the workaround given in the
first URL you gave; it says that you could try to use another
transformer. I guess the latest xalan library doesn't have this bug.

xalan is what we are trying to get rid of. Apparently it causes some
conflicts when running ant (which I would like to resolve in a different
way, but that's another story :-()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top