Hi Jay,

   Well the problem you are having is because you haven't setup the
CSS engine for Batik.  This is normally done by the batik.bridge.BridgeContext
class in Batik.  However, it also appears that you are trying to map just the
flowText element - The SVG specification is pretty clear that
SVG elements must have a parent SVG element - of course you can
try and do it without this but I think it's a mistake.

   I think you really want to try and 'fix' the existing
SVG element mapping stuff in FOP rather than try and reproduce
this work.

Jay Chiu wrote:
I solved the element class mapping issue, but still get
exception at
org.apache.batik.bridge.CSSUtilities.convertDisplay() because
getComputedStyle(e, SVGCSSEngine.DISPLAY_INDEX) returns null on
flowTextElement. If I set the method to return true, then I get
exception at
org.apache.batik.bridge.CSSUtilities.convertVisibility() for the
same reason.

I have added the attached three files:
(1) BaticElement.java
(2) BatikElementMapping.java
(3) BatikObj.java
and registered BatikElementMapping class with fop.

Because flowTextElement needs its own document object for using
ExtensibleSVGDOMImplementation to create child elements, I have
to add addGraphic() into the BatikElement.java file.

Also org.apache.batik.dom.AbstractParentNode does not allow
adding child with different document object, I have to comment
out if (n.getOwnerDocument() != getCurrentDocument())
in checkAndRemove() method.


Pleae help me check what is wrong here. Probably you have add
the batik extension into next release of FOP.

Thanks.

Jay




---- On Fri, 5 Sep 2003, Andreas L. Delmelle
([EMAIL PROTECTED]) wrote:


From: Jay Chiu [mailto:[EMAIL PROTECTED]
I got the same exception as what Swapan got. I think the
problem

Difficult to tell... ( also because I haven't used Batik

directly )


Does this happen with other graphic formats too? What versions

(FOP & Batik)


are you using? Is FOP being run from the command-line - using

the supplied


shell script to set its classpath - or embedded?

Check http://xml.apache.org/fop/graphics.html#batik to find

out why I think


these questions are important.

Hope this helps ( you both )

Greetz,

Andreas Delmelle



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



Reply via email to