Jay Chiu wrote:
I got the same exception as what Swapan got. I think the
problem
is just what Thomas mentioned: "Is it possible that you are
mis-mapping the elements from FOP?  the batik:flowText element
needs to become a bati.extension.svg.FlowTextElement the others
need to be mapped likewise.  Just mapping them to generic
elements won't work."

My question is how to map the element to
batik.extension.svg.FlowTextElement. Once I set up the
BatikBridgeExtension and BatikDomExtension, getBridge() should
automatically map the DOM element to FlowTextElement. But
through debug, I saw the element is generic element not
FlowTextElement.  Can you please tell me what I am missing?

The one thing I did notice is that above in Batik it's the ExtensibleSVGDOMImplementation that maps namespaces and localNames into DOM nodes. It uses the Service Provider Interface to locate DOM extensions, so you might want to look at:

http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

  To understand what you need to do for it to know about the
batik extensions, the bridge does something similar but they
are different service classes so you need to provide two
of them.  Look at xml-batik/resources/META-INF/services to see
what serivce files Batik Provides.


Thank you very much.
Jay



--------------------------------------------------------------------------------


Subject: RE: Batik Extension/FOP problem From: Thomas E Deweese <[EMAIL PROTECTED]> Date: Fri, 7 Mar 2003 08:57:39 -0500 To: [EMAIL PROTECTED]

--------------------------------------------------------------------------------


"SG" == Swapan Golla <[EMAIL PROTECTED]> writes:


SG> I am trying to use batik extensions through FOP. I added
SG> BatikElementMapping and BatikObj objects into my FOP src and
then
SG> registered them in the driver class but I am still getting
some
SG> exceptions. Can anybody help me out ?


    I don't know, The error you are getting is indicative of
passing a
non Batik DOM node into Batik.  Is it possible that you are
mis-mapping the elements from FOP?  the batik:flowText element
needs
to become a bati.extension.svg.FlowTextElement the others need
to be
mapped likewise.  Just mapping them to generic elements won't
work.

SG> I am trying to embed the flowText.svg ( provided by batik
SG> distribution ) into a simple fo document and then trying to
SG> convert into a pdf.

SG> Swapan.


SG> [ERROR] svg graphic could not be built: null SG> java.lang.ClassCastException at SG> org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:96) SG> at SG> org.apache.batik.bridge.CSSUtilities.convertDisplay(CSSUtilities.java:509) SG> at SG> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176) SG> at SG> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148) SG> at SG> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:188) SG> at SG> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148) SG> at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76) at SG> org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.java:513) SG> at SG> org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(PDFRenderer.java:472) SG> at org.apache.fop.svg.SVGArea.render(SVGArea.java:58) at SG> org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(PDFRenderer.java:456) SG> at SG> org.apache.fop.layout.inline.ForeignObjectArea.render(ForeignObjectArea.java:46) SG> at SG> org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:408) SG> at org.apache.fop.layout.ColumnArea.render(ColumnArea.java:29) at SG> org.apache.fop.render.AbstractRenderer.renderSpanArea(AbstractRenderer.java:57).....................


________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to