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: Problems with DOMUtilities / ImageTranscoder
Date Wed, 11 Jul 2001 14:01:17 GMT
On Tuesday 26 June 2001 14:34, Peter Becker wrote:
> Jon Bråtøymyr wrote:
> > Hi,
> >
> > I'm having problems with creating an image from a plain
> > org.w3c.dom.Document. I was told that I could use
> > DOMUtilities.deepCloneDocument to convert a w3c-Document to a
> > SVGDocument, but when I run the transcoding I get a ClassCastException.
> > Apparently when the ImageTranscoder tries to cast the root element to
> > org.apache.batik.dom.GenericElement.

I think you might have used the method with an appropriate argument.
You must give the original document and then the DOMImplementation you want 
to use.

The document is the one you have (that can be from xerces, generic DOM or 
whatever) then the DOMImplementation must be the SVGDOMImplementation.

DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();


BTW: We could not rely on a generic DOM implementation at least for building 
and rendering SVG documents because SVG is complex and needs special hooks. 
The best example is to implement external <use> element with the correct 
cascading algorithm for the CSS properties.

Hope this helps,
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