This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10196 - Relationship to xml:id
Summary: Relationship to xml:id
Status: CLOSED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.w3.org/TR/xml-id/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-18 11:56 UTC by Rouven We
Modified: 2010-10-04 14:31 UTC (History)
6 users (show)

See Also:


Attachments

Description Rouven We 2010-07-18 11:56:50 UTC
Currently the relationship to xml:id is not explicitly defined in the spec. Only implicitly it can be said that in the XHTML serialization it may be used because XHTML is an application of XML.

Since being explicit is better then being implicit I suggest adding a reference to xml:id 1.0 to the spec. More precisely xml:id should be listed in section 3.2.3 and either gets its own subsection or one shared with 3.2.3.1 the id attribute.

It should be made clear that only id or xml:id may be used on an element and not both. (I may be mistaken and it is allowed to specify both with the same content, if that's the case then this should be specified) Also a warning that xml:id is XML only.
Comment 1 Rouven We 2010-07-18 12:02:25 UTC
Forgot to mention that the sections 8.1.2.3 and 8.2.5.1 also may need updating when xml:id is added.
Comment 2 Ms2ger 2010-07-18 13:56:34 UTC
Why does it need to be mentioned? Also, why would xml:id and id be mutually exclusive? Is there any good reason to forbid <div id="foo" xml:id="bar"/>?
Comment 3 Rouven We 2010-07-18 14:42:27 UTC
I'm unsure whether two attributes that are an id could be allowed by XML/xml:id. If this is allowed both should be allowed on an element if they have the same value.

Other XML infrastructure attributes (xml:space, xml:base) are also mentioned. In my opinion it is better to mention the possible use cases. Also it may be a good idea to have a warning that xml:id is allowed but discouraged because of the incompatibility with the HTML serialization.

Also please note there is no gain in using xml:id instead of id except when processing a document with an XML parser that knows xml:id but not HTML5.
Comment 4 Henri Sivonen 2010-07-19 08:13:55 UTC
If xml:id is explicitly mentioned, it should be explicitly banned. xml:id has explicitly been rejected from WebKit and isn't in Gecko due to performance issues. (Also, the Gecko patch was very big, which suggests that xml:id implies excessive code complexity. It sure has implied way more code complexity than I initially expected in Validator.nu.)
Comment 5 Rouven We 2010-08-10 19:10:43 UTC
While I'm surprised that xml:id introduces a lot of code complexity, explicitly disallowing it is most certainly one possible way to go. However, especially since HTML5 lack a doctype reference, it may be helpful when parsed with a XML processor.

To my knowledge Opera is currently the only browser that supports xml:id.
Comment 6 Ian 'Hixie' Hickson 2010-09-10 23:19:31 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: xml:id isn't mentioned because it's not part of any of the specs that HTML is based on (it's not part of the XML spec, XML namespaces, XML Stylesheet PI, or XML Base), and there are no implications on user agents or authors with respect to xml:id. It's just like there's no mention of SOAP.
Comment 7 Rouven We 2010-09-11 10:29:11 UTC
I'm satisfied with the response.