Re: changes in USE elements

On Thursday, June 26, 2003, 2:07:21 AM, Jim wrote:


JL> Hi,

JL> After an IRC discussion today on how USE elements should be handled if
JL> the referenced DOM changes, does the use element also change, it was
JL> decided it does.

Yes, it does. That is why the write up for the use element uses DOM
deepclone as an analogy rather than as a specificatio of what happens.
Its not a one-time copy, its a live reference so changes to the
referenced object are reflected in all the instances of it.

JL>  This led to a problem with external references, to
JL> included document, consider:

JL> <?xml version="1.0" standalone="no"?>
JL> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
JL>   "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
JL> <svg width="10cm" height="3cm" viewBox="0 0 100 30"
JL>      xmlns=http://www.w3.org/2000/svg
JL>  xmlns:xlink="http://www.w3.org/1999/xlink">
JL>   <desc>Simple USE demo</desc>
JL>   <rect x=".1" y=".1" width="99.8" height="29.8"
JL>         fill="none" stroke="blue" stroke-width=".2" />
JL>   <use x="20" y="10" xlink:href="foo.svg#MyRect" />
JL> <image xlink:href="foo.svg" id="one"/>
JL> <image xlink:href="foo.svg" id="two"/>
JL> </svg>

JL> If MyRect is changed in the image one, then does the referenced use
JL> change aswell? as it's not been changed in two, which instance takes
JL> precedence?

Can you provide the foo.svg and explain how myRect is being changed?
Is it a script running in foo.svg?

JL> Jim.




-- 
 Chris                            mailto:chris@w3.org

Received on Thursday, 26 June 2003 04:22:24 UTC