W3C home > Mailing lists > Public > www-svg@w3.org > February 2006

RE: SVGT 1.2: <use> and <foreignObject>

From: Jon Ferraiolo <jonf@adobe.com>
Date: Mon, 20 Feb 2006 20:56:00 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C8726879@namail3.corp.adobe.com>
To: "Eric Seidel" <eseidel@apple.com>
Cc: <www-svg@w3.org>

Thanks for your helpful comments.

I expect the SVG WG will agree with adding a line about <use> and <foreignObject>.

Regarding <svg:use> referencing <svg:audio> and <svg:video>, I am not sure if the latest draft addresses this directly (I will look later), but here is how I expect it to work. Let's assume we have a file m.multimedia (could be an audio, a video, or an SVG file with timed elements) and an svg file named a.svg. a.svg has a <defs>, inside of which is either an svg:audio, svg:video or svg:animation element that references m.multimedia. Let's assume this referencing element has id "r". This a.svg file also has two svg:use elements, each of which reference the "r" element. The result:

* The file m.multimedia is loaded only once (due to the "r" element). 
* The multimedia contents of m.multimedia are, in effect, "rendered" to an offscreen, where rendering consists of both audio and video
* The two svg:use elements do real-time duplication of the offscreen's audio and video streams. The video content renders visually at the location of each of the svg:use elements. The audio content is rendered twice (once for each svg:use), synchronized.

Unless people register disagreements, I will forward this to the SVG WG to discuss how to make sure the spec is clear on these scenarios.


From: Eric Seidel [mailto:eseidel@apple.com] 
Sent: Monday, February 20, 2006 6:39 PM
To: Jon Ferraiolo
Cc: www-svg@w3.org
Subject: Re: SVGT 1.2: <use> and <foreignObject>

As Maciej points out, this synchronization is not possible in certain cases such as plugin content inside an <html:object> tag in a <foreignObject> tag.

Given that, the spec should add a line about the behavior of <use> referencing a <foreignObject> tag as being undefined.

The current response is unsatisfactory w/o additional prose to cover the <foreignObject> case.

Maciej raised a second (related) issue in his responses about what the proper behavior should be for <use> referencing a <video> or <audio> element.

Thanks for your time.


On Feb 19, 2006, at 3:00 PM, Jon Ferraiolo wrote:

Hi Eric,
This email is the official Last Call response to your comment at:
which is repeated at the bottom of this email.
The processing model for svg:use is such that, when multiple svg:use elements reference the same original element, all of the svg:use instances reflect the state of the original object. Here is the quote from the spec (http://www.w3.org/TR/SVGMobile12/struct.html#UseElement):
The deeply-cloned tree, also refered to as the shadow tree, is then kept in synchronization with the contents of the referenced element, so that any animation or DOM manipulation occurring on the referenced element are also applied to the 'use' element's deeply-cloned tree.
If the referenced element is an svg:foreignObject or contains an svg:foreignObject as a subelement or within an XBL shadow tree, and the svg:foreignObject somehow contains interactive elements (e.g., an XForms UI control or an HTML forms control), then all svg:use instances will reflect the current interactive state of the referenced element and its descendant elements. For svg:use, it is *not* possible for two svg:use instances of the same referenced elements to have different interactive states (e.g., different text within text fields). Thus, svg:use has restricted flexibility. The long-term vision to provide more flexibility is XBL, where it will be possible to achieve re-usable interactive elements where each instance is allowed to have different interactive state.
Because there is a possibility in some cases that interactive state might not fall into the category of "DOM manipulation", we have added a couple of words to the description of the "use" element for more inclusive wording beyond just animation and DOM manipulation.
Please tell us within two weeks if this response is not satisfactory.

Jon Ferraiolo
From: Eric Seidel <eseidel@apple.com>
Date: Wed, 28 Dec 2005 15:44:38 -0600
Message-Id: <FD4D268B-D2FE-49A5-BA09-0E6F69251386@apple.com>
To: www-svg@w3.org
== This message seems to have died somewhere in transit, resending. ==
I understand that it is not the goal of the SVGT specification to 
cover all possible interactions between SVG and other languages.  
That said, I would still appreciate a comment from the working group 
as to the expected interaction between <use> <foreignObject> and tags 
in other languages (like html) such as forms (<input>, <textarea>, 
etc.) or plugins (<object>, <embed>, etc.)
Should for example 2 copies of a plugin be created for a <use> (the 
original, non-rendered version in <defs>, as well as the used 
instance?)  What happens when a user interacts with one used copy?  
Are all other copies expected to update (think of a flash game, 
instantiated multiple times on the page via <use> of a 
<foreignObject> containing an <embed>)?
And what about forms? If I type text into one used copy of a form 
(<use xlink:href="url(#myForeignObjectWithForms)" />) are all the 
others expected to update?
Received on Tuesday, 21 February 2006 04:56:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:07 UTC