Hi Ruben,
[EMAIL PROTECTED] wrote on 09/15/2006 05:34:08 AM:
> i have now looked into my old problem again, the one where changes in
> the dom tree are not reflected in a saved jpeg. now, it seems that using
> createElementNS instead of createElement did resolve parts of the
> problem (although the resulting svg looks exactly the same).
Yes, you must use createElementNS with the SVG Namespace or else
your created elements are not SVG Elements.
> however, if i use document.importNode(), to which there is no
> alternative other than cloning the entire thing by hand, the
> tree is again not updated.
The document you are importing from must also have used
createElementNS when it was populated and/or the source document
must be properly marked for namespaces, and/or read by a namespace
aware XML reader/DOM implementation.
> Now, if importNode() doesn't update the GVT tree, i have to
> serialize the thing and create a new svgdocument from the
> serialized from, which i obviously want to avoid.
If this "fixes" the document it is _very_ likely that your
problem is namespaces.
> any way around this?
Use namespaces correctly? Note your code below does not
use namespaces correctly, nor does it appear to use importNode
anywhere???
Also is there any reason you don't use:
Element.setAttribute(String attr, String val)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]