logo       

Re: Using Saxon 7.9 with Cocoon?: msg#00149

Subject: Re: Using Saxon 7.9 with Cocoon?
Sylvain:

X-posted to the Saxon list as well.....

> I remember having such problems with older versions of Saxon, and the 
> culprit was the AElfred parser that comes bundled with Saxon which is 
> limited to saxon's needs (hence why it's read-only).

The latest version of Saxon (7.9) does not include AElfred any more.  AElfred 
is now a separate download, which I am not using, so that part is not an 
issue.

> Two trick solve the problem:
> - remove the META-INF/services/java.xml.parsers.* files in the saxon jar

With AElfred not included, this entry is no longer in the jar file.  However, 
there is a java.xml.transform.TransformerFactory entry in META-INF/services 
with the value of "net.sf.saxon.TransformerFactoryImpl".  I think this entry 
is the one that causes the Saxon dom to be used.

> - rename saxon.jar to zsaxon.jar so that it comes after xerces in the 
> classpath (highly servlet engine dependent though).

Already did that, but with the latest versions (and Tomcat), it still seems 
that you need the Xalan jar file ahead of the Saxon one, or the Saxon read-
only DOM still gets selected.

It looks to me that it's the java.xml.transform.TransformerFactory entry in 
META-INF/services that controls this.  With the Xalan jar first the value 
points to the Xalan implementation of the TransformerFactory implementation, 
which in turn grabs the Apache DOM implementation instead of the troublesome 
Saxon one.  The issue with doing this (even though it works...yay!) is that 
I'm not sure how much of Xalan versus Saxon is being used for XSL 
transformations when you use the Xalan transformer factory reference.

Any insight?

Thanks!


Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe