Re: SVG12: A.7.15 id attribute

* Robin Berjon wrote:
>On Jan 02, 2006, at 10:24, Bjoern Hoehrmann wrote:
>> My reading of the xml:id Recommendation is that the attribute values
>> must be unique as opposed to uniquely identify an element, so keeping
>> them in sync would actually trigger xml:id errors.
>
>This constraint is a "should" in xml:id: "An xml:id processor should  
>assure that the following constraint holds:
>The values of all attributes of type “ID” (which includes all xml:id  
>attributes) within a document are unique."

This is nevertheless an xml:id error and a document is conformant to the
xml:id Recommendation if and only if it does not have xml:id errors. So
while checking for the constraint is a SHOULD, meeting it is a MUST. Not
that the Recommendation uses "MUST" or "iff", but the intent is clear.

>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.

>> The new text notes
>>
>>   when both 'id' and 'xml:id' are specified on the same element but
>>   with different values, the resulting behaviour is unspecified and
>>   implementation-dependent. It is however recommended that whenever
>>   possible, implementations should give precendence to the 'xml:id'
>>   attribute.
>>
>> 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?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 23 January 2006 16:35:52 UTC