I have heard that you can use the correspondingElement attribute in ASV6 to
do this. But I myself have not tried it.
"ctl271"
<[EMAIL PROTECTED]> To:
[email protected]
Sent by: cc:
[EMAIL PROTECTED] Subject: [svg-developers] Re:
DOM restrictions in <use> tag?
ogroups.com
04/19/2005 11:42 AM
Please respond to
svg-developers
> <use id="r1-c1" xlink:href="#tableCell" x="100" y="20"/>
>
> I then want to alter the style class of the rect and text elements,
> and alter the actual text of the "text" tag using JavaScript. I
> don't seem able to do that because of a restriction in the DOM
> model - as I understand it, the rect and text elements associated
> with my "r1-c1" object is not exposed. Is this correct? Anyone
> found any workarounds for this? Is what I want to do possible?
I believe you are correct that the r1-c1 object is not exposed and is
rendered from a seperate, inaccessible tree. I believe that sXBL
will make this accessible in SVG 1.2, but for now...
You can use script to replace the use element with the actual
content. It's not great, but it'll work.
Something like this called on startup might do the trick for you:
App.replaceUseElements = function (evt) {
var doc = evt.getTarget().getOwnerDocument();
var clone = doc.getElementById("tableCell").cloneNode(true);
var use = doc.getElementById("r1-c1");
use.parentNode.replaceChild (clone, use);
}
Of course this is hard coded just to do the one cell, but...
I haven't tested this, but it's modified from working code, so best
of luck...
cheers,
Chris
-----
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/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
-----
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/
<*> 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/