You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Willy Reinhardt <wr...@novell.com> on 2005/12/02 12:17:30 UTC

Rép. : xsltc trax transformer problems

Hi,

Maybe your problem is aound xalan and not FOP. But we had similar issues
when we switch from xslt to xsltc. xsltc is a bit more sensitive but
often the issue is a "bug" into xsl. 
My advice is:
- Test and migrate your xsl using Xalan xsltc only and then use fop.

Concerning Weblogic, I noted it become unstable when a
NullPointerException occur and we also need to restart instance.

Willy




-----------------------------------  
Cambridge Technology and Partners
Willy Reinhardt
Air Center
Ch. des coquelicots 16
CH-1214 Vernier
Phone: +41 22 306 47 24
Fax: +41 22 306 47 47
http://www.ctp.com
http://www.novell.com/open
>>> Johan.Elmstrom@edb.com  >>>
Hi All

 

I'm getting a really confusing error when trying to generate a standard
PDF file.

 

When I'm using the exact same XML and XSL:FO with two different
transformers I get what I want with one (standard xalan transformer) but
with the other (xalan xsltc.trax transformer) FOP just hangs and kills
the appserver (BEA Weblogic 8.1.4 SP4) .

 

I've tried setting the logging to the finest I can ( ConsoleLogger log =
new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);  ) , but once 'Setting Up
Fonts' is displayed FOP breaks down

 

### Log message ###

 

[INFO] building formatting object tree

[WARNING] Screen logger not set - Using ConsoleLogger.

[INFO] setting up fonts

 

### END LOG ###

- At this point I have to kill the server by stopping the process.
(sounds like an endless loop to me)

 

I have got an in-memory XML dom4j document (the trax parser could not
parse my w3c document, because the value of a TextNode was null, and
threw a NullPointerException @ DOM2SAX.java:308 in xalan ver 2.7.0 !?!?)
and an xsl packaged in my .war file.

 

Has anyone encountered this problem when using the xalan
trax.xsltc.TransformerImpl????

 

 

However I found the TraxInputHandler, and figured that might help,
however, that only prints my static content. (As in all my xsl:value-of
.. statements are ignored completely). 

I read in the documentation that it takes xml and xsl input (it says
nothing about xsl:fo  :  "XSLTInputHandler basically takes an xml source
and transforms it with an xslt source")

This is how I set it up..

InputSource xslSrc = new InputSource(xslStreamSource.getInputStream());
// from xsl:fo                                                   

                             InputSource xmlSrc = new InputSource(new
DocumentSource(xmlDoc).getInputSource().getByteStream()); // From dom4j
Document object

                             TraxInputHandler handler =  new
TraxInputHandler(xmlSrc, xslSrc);

                             handler.run(driver); 

 

 

Am I doing it wrong?? 

Has anyone got an example of how to use the TraxInputhandler? (I can't
find any useful examples by googling it, probably the first time ever
that's happened)

 

Appreciate any help..

 

Regards

 

/Johan 

 

 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org