Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

XSLTC cannot compile a stylesheet. Bug or not bug?

Thread view: 
Andrea Desole - 08 Aug 2006 16:51 GMT
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:otherwise>
            not available
        </xsl:otherwise>
    </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
Moiristo - 08 Aug 2006 17:47 GMT
> 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.
Andrea Desole - 09 Aug 2006 09:03 GMT
> 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 :-()


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.