You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "David E. Mabe" <dm...@asciences.com> on 2002/03/29 17:09:31 UTC

XML > XSL > SVG disconnect

I have a problem and it seems like several other people have too but I
haven't seen a good answer and in fact I've seen some assumptions made that
were incorrect.
 
I have a servlet that outputs either SVG or JPG
 
It transforms an XML input (via Xalan) into SVG and streams it to the client
if SVG is requested. This much works correctly.
 
It also transforms the XML into an DOM Object and passes it to batik if JPG
is requested. 
Failure occurs because the DOM object is not an SVGDom Object.
 
If I create an SVGDom object and hand that to Xalan to process it fails
because there is already an <svg> element.
If I create an SVGDom object and hand SVGDomObject.getDocumentElement() to
Xalan it works but the svg now has <svg><svg></svg></svg> which produces a
blank JPG since my XSL transformation.
 
I should be allowed to create an SVGDom object that doesn't come pre-packed
with SVG tags much in the same way I can create an empty DOM object.
 
Thanks
David Mabe (dave@yotk.com)