How to use adoptNode()

"jeremie.tauvel" <[email protected]>
Newsgroups gmane.text.xml.svg.devel
Message-ID <[email protected]>
Hello,

I would like to use org.apache.batik.dom.AbstractDocument::adoptNode() inst=
ead of importNode() to reduce cpu time and memory.
It works but in my program I dynamically update attributes in the DOM like =
color of stroke, rectangle... and if I use adoptNode() it doesn't work (wit=
h importNode() it is OK).
I have seen in the source that in adoptNode1() : attr.ownerElement is set t=
o null to be conform with the Document Object Model (DOM) Level 3 Core Spec=
ification.

But in org.apache.batik.dom.AbstractAttr, my elements cannot be updated bec=
ause it depends of ownerElement :
if(ownerElement !=3D null) {
ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent=
.MODIFICATION);
}

So my questions are : is it possible to use adoptNode() in my case ?
Or maybe I miss something to have ownerElement initilized with the good Ele=
ment after the adoptNode() ?

Thank you for your help.

Jeremie



------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.