W3C home > Mailing lists > Public > www-svg@w3.org > June 2003

Re: changes in USE elements

From: Chris Lilley <chris@w3.org>
Date: Thu, 26 Jun 2003 10:22:01 +0200
Message-ID: <64363703437.20030626102201@w3.org>
To: www-svg@w3.org, "Jim Ley" <jim@jibbering.com>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:56 UTC