W3C home > Mailing lists > Public > www-svg@w3.org > August 2005

Re: Resolving URIs in shadow trees

From: Jon Ferraiolo <jonf@adobe.com>
Date: Tue, 02 Aug 2005 07:23:12 -0700
To: Boris Zbarsky <bzbarsky@mit.edu>, Jon Ferraiolo <jonf@adobe.com>
Cc: Cameron McCormack <cam-www-svg@aka.mcc.id.au>, www-svg@w3.org
Message-id: <6.2.1.2.2.20050802071342.03fd62f8@mailsj-v1.corp.adobe.com>

At 06:35 AM 8/2/2005, Boris Zbarsky wrote:
>Jon Ferraiolo wrote:
>>Maybe the rules is that first you call getElementById() on the 
>><shadowTree> and then if no match is found then call it on ownerDocument. 
>>What do you think?
>
>Hmm... Under what circumstances would these two calls ever give different 
>results, given the uniqueness requirements on IDs?

Here is the interesting case. Suppose your <xbl:template> includes an 
<svg:linearGradient id="foo"> element which is referenced by another 
element within the template, such as <rect fill="url(#foo)".../>. When the 
binding occurs, the template gets cloned. If there are two bound elements 
using this binding, then the template will be cloned twice, and the two 
shadow trees will have the same ownerDocument.

What do we want to do about this possibility? Do we want to say it is an 
error? If it is an error, do we want to require user agents to go into 
error mode in some sort of spectacular manner? Or treat it as an error, but 
require user agents to how to handle this error condition in a standard manner?

 From a developer convenience perspective, why not loosen the rules and say 
that ID uniqueness is only necessary within each individual document tree 
and each individual shadow tree? That's what makes sense to me.

Jon


>-Boris
Received on Tuesday, 2 August 2005 14:23:31 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:31 GMT