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 "Rauh, Michael" <Mi...@NDSatcom.com> on 2004/02/09 18:31:41 UTC

Problems with Saxon -> FOP?

Hi,

are there known problems with the interoperability of specific XSLT processors and FOP? 

I'm running XSLT transformations from within Java and put the result DOM into FOP's AWTRenderer. My source documents are mainly DocBook instances, but also other ones. 

That's all working fine with Xalan (from the JDK) and jd.xslt. But with Saxon 6.5.3 and Saxon 7.8, FOP throws NullPointerExceptions. Here's the ouput when using Saxon-6.5.3: 


[INFO] setting up fonts
[ERROR] Unsupported element encountered: null (Namespace: null). Source context: unavailable
[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.) or elements from another supported language.
java.lang.NullPointerException
        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:327)
        at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:495)
        at org.apache.fop.apps.Driver.render(Driver.java:498)


When I serialize the FO Document the XSLT processors built, they're looking exactly the same for all processors though. 

Considering FOP, I tried both 0.20.5 and the 0.20.2-maintain branch.

Any hints appreciated.


Greets
Michael Rauh

ND Satcom AG
88039 Friedrichshafen
Phone  +49 7545 939 8387
 

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


Re: Problems with Saxon -> FOP?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Rauh, Michael wrote:
> I'm running XSLT transformations from within Java and put the result DOM into
> FOP's AWTRenderer. ... That's all working fine with Xalan (from the JDK) and
 > jd.xslt. But with Saxon 6.5.3 and Saxon 7.8, FOP throws NullPointerExceptions.
 > Here's the ouput when using Saxon-6.5.3:
...
> [ERROR] Unsupported element encountered: null (Namespace: null). Source
> context: unavailable

I use Saxon with FOP all the time. However, I use SAX to pipe
the transformation result to the FOP driver (see
  http://xml.apache.org/fop/embedding.html#ExampleXML2PDF)

I guess there is a problem with the DOM or the DOM walker
implementation, or perhaps you screwed the DOM while
postprocessing. If you dont process the transformation result,
I recommend using SAX, it's more ressource friendly anyway
(less memory).

J.Pietschmann

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


RE: Problems with Saxon -> FOP?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Rauh, Michael [mailto:Michael.Rauh@NDSatcom.com]
>
>
> are there known problems with the interoperability of specific
> XSLT processors and FOP?
>

Phew! What a question... I've certainly thought lots of times about using
Saxon with FOP instead of Xalan, but haven't really tried. If you feel like
documenting your findings and posting them here, any input gladly
appreciated!

> I'm running XSLT transformations from within Java and put the
> result DOM into FOP's AWTRenderer. My source documents are mainly
> DocBook instances, but also other ones.
>

Hmm, and do all these documents render properly when you run them
standalone?

> That's all working fine with Xalan (from the JDK) and jd.xslt.
> But with Saxon 6.5.3 and Saxon 7.8, FOP throws
> NullPointerExceptions. Here's the ouput when using Saxon-6.5.3:
>
>
> [INFO] setting up fonts
> [ERROR] Unsupported element encountered: null (Namespace: null).
> Source context: unavailable
<snip />
> When I serialize the FO Document the XSLT processors built,
> they're looking exactly the same for all processors though.
>
> Considering FOP, I tried both 0.20.5 and the 0.20.2-maintain branch.
>
> Any hints appreciated.

Could you try the following:

- run the XSLT (try both processors)
- run the resulting FOs through FOP via the command-line with -d for
debugging, and see what comes out (if this gives no problems, someone's
going to have to check out the specifics of Saxon's DOM Output --particular
diffs with Xalan that could explain this? )


Cheers,

Andreas


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