Hi Urs,

   The problem is that the document you are creating doesn't have
a url base associated with it (there isn't any in DOM core).
There are two solutions to this.

   The easiest is to simply add an 'xml:base' attribute to the
root node of the document.  This will set the base URL for
resolution of relative URLS.

The _slightly_ harder (but much better) way to fix this would
be to construct an instance of our SVG DOM (batik.dom.svg.SVGDOMImplementation). This will result in a
batik.dom.svg.SVGOMDocument object being used, this has a public
method 'setURLObject(URL)' that you can then use to associate your
base URL with the document. The real advantage of this is that
it avoids an extra copy that is currently happening (when
you call setDocument with a generic Document we have to clone
the tree so it is using our SVG enabled DOM - with CSS and SVG DOM
support).


Urs Reupke wrote:

up to now I used LoadSVGDocument(URL) to load files to display, and it was good - but when today, for various reasons, I tried to convert the program to use SetDocument,
things failed miserably:


Using JDOM 1.0, I wrote a method to read the SVG-File as a JDOM Document, afterwards convert it to a w3c.dom Document, and finally pass this w3c.dom Document
to the setDocument(w3c.dom.Document)-Method of my JSVGCanvas.
I didn't expect trouble at this stage, but it came: Instead of displaying everything, only
"direct content" is displayed, images embedded via the <symbol>-Tag aren't shown.
Which is bad, because my images are of quite repetitive content and rely on
<symbol>/<use>.


Can you point me to a solution for the problem?
Thank you
-Urs

---------------------------------------------------------------------
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