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

Re: SVG12: A.7.15 id attribute

From: Robin Berjon <robin.berjon@expway.fr>
Date: Fri, 10 Mar 2006 11:42:48 +0100
Message-Id: <DD68BCC5-4513-4C44-8B69-55AEB8CB46C0@expway.fr>
Cc: www-svg@w3.org
To: Bjoern Hoehrmann <derhoermi@gmx.net>

Hi Björn,

On Jan 23, 2006, at 17:36, Bjoern Hoehrmann wrote:
>> I posit that:
>>   a) handling a transition from legacy id attributes that cause
>> problems with scripts in the absence of a DTD
>>   b) the fact that there is no DTD in 1.2
>>   c) the constraint that the two ID attributes are on the same  
>> element
>> constitute good reasons for go against that "should". The alternative
>> is to make 'id' not be of type ID in SVG 1.2. That would be okay by
>> me but I'm not convinced it's the best approach. I much prefer the
>> former. Your feedback is welcome as to which approach you prefer.
> This might be an option should the XML Core Working Group refuse to  
> make
> the changes needed for a saner solution, assuming this would go along
> with a requirement to add xml:id attributes for any id attribute,  
> since
> otherwise viewers are unlikely to implement this as it breaks too much
> content.

I went to talk to XML Core at the TP. They are considering whether to  
make an erratum or if they would rather make some form of best  
practice note indicating how a language is supposed to transition  
from a native id to xml:id. I think that they prefer the latter, but  
I do not want to speak in their name.

In the meantime we reached agreement on a lesser evil that, while it  
is perhaps not perfect, is in my opinion satisfactory as a transition  
approach. It is perhaps best expressed using the RelaxNG to which it  

         <attribute name='xml:id'>
           <ref name='ID.datatype'/>
           <attribute name='id'>
             <ref name='NCName'/>
         <attribute name='id'>
           <ref name='ID.datatype'/>

Basically, at the formal validation level (and keeping in mind that  
there is no DTD in SVG Tiny 1.2) whenever there is an xml:id  
attribute, the id attribute is not of type ID. Otherwise, it is.

This has minor issues, but ones that I think we can (and should) live  
with. It does not cause xml:id errors. It doesn't break existing  
content since SVG viewers recognise the id attribute anyway.

What do you think?

>>> I don't really understand what this means, e.g., which behavior is
>>> referred to here or what giving precedence to the xml:id attribute
>>> would mean. The intent might be to say that the SVGElement::id
>>> attribute must return either the value of the id or the xml:id
>>> attribute and should return the value of the xml:id attribute.
>> That is the intent, and the text has been clarified by indicating
>> that this is indeed what is being referred to.
> What is the new text exactly?

"when both 'id' and 'xml:id' are specified on the same element but  
with different values, the SVGElement::id field must return either of  
the values but should give precedence to the 'xml:id' attribute."

Thank you for your excellent comments, please let us know shortly if  
these do not address your concerns.

Robin Berjon
    Senior Research Scientist
    Expway, http://expway.com/
Received on Friday, 10 March 2006 12:49:11 UTC

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