xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Kormann <tkorm...@ilog.fr>
Subject Re: org.apache.batik.bridge.BridgeException
Date Mon, 28 Jan 2002 14:21:16 GMT
On Wednesday 12 December 2001 20:23, B Wood wrote:
> I am getting different results when trying to display the same svg document
> using JSVGCanvas.setSVGDocument() and JSVGCanvas.setURI().
>
> I am using Xalan to apply a stylesheet to an xml file which results in an
> SVGDocument object:
>
> 		SVGDOMImplementation impl = (SVGDOMImplementation)    
> 				SVGDOMImplementation.getDOMImplementation(); String svgNS =
> SVGDOMImplementation.SVG_NAMESPACE_URI;
> 		SVGDocument doc = (SVGDocument) impl.createDocument(svgNS, "svg", null);
>
> 			Source xmlSrc = new StreamSource(xmlURI);
> 			Source xslSrc = new StreamSource(stylesheetURI);
> 			DOMResult svgResult = new DOMResult(doc.getDocumentElement());
>
> 			Transformer transformer = tFac.newTransformer(xslSrc);
> 			transformer.transform(xmlSrc,svgResult);
>
> Then sending the SVGDocument object (doc) to the JSVGCanvas, equivalent to:
> 			JSVGCanvas canvas = new JSVGCanvas();
> 			canvas.setSVGDocument((SVGDocument) doc);
>
> I consistently get this result (even with different svg data):
>
> org.apache.batik.bridge.BridgeException: null:-1
> The attribute 'd' of the element <path> is required
> 	at org.apache.batik.bridge.SVGPathElementBridge.buildShape(Unknown Source)
> 	at
> org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown
> Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
> 	at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)
>
> For debugging purposes I took that SVGDocument and used Xalan's default
> copying behavior to send it to a file.  Then I used canvas.setURI() to view
> the SVG from that file, and it rendered without any errors.
>
> Why am I getting different results?
>
> Attached is that svg file: output.svg
>
> I am using batik 1.1, xalan 2.1.0, and crimson 1.1.3 on jdk 1.3.0.

I have no idea :( Do you still have the bug in batik1.1.1 ?


Thierry.

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


Mime
View raw message