- From: Robert J Burns <rob@robburns.com>
- Date: Wed, 28 May 2008 22:40:13 +0000
- To: Jirka Kosek <jirka@kosek.cz>
- Cc: HTML Issue Tracking WG <public-html@w3.org>
Hi Jirka, On May 28, 2008, at 8:41 PM, Jirka Kosek wrote: > Robert J Burns wrote: > >> Add a new IDENT data type for the id attribute and clearly specify >> the CSS selector and DOM method processing for xml:id of type ID >> and id of type IDENT (helps facilitate compound documents and >> current authoring practice).[1] > > Maybe I have missed some previous discussion, but what is the > benefit of using xml:id in XML serialization, given the problems > caused by incompatibility with HTML serialization which uses id > attribute? > > I'm in favor of using xml:id in newly created pure XML vocabularies, > but I think that for XML serialization of HTML5 it just adds > superfluous complexity. I appreciate the question. The issue you raise here is precisely one of the issues this proposal seeks to address. Authors want as much consistency between serializations that we can achieve. Permitting the xml:id attribute in both serializations helps with that. However, to accommodate the use of xml:id in the XML serialization the id attribute and the xml ID attribute cannot be used on the same element (technically I think they cannot even be allowed on the same element, but that might be overstating the case). Add to those issue the fact that many authors do not ensure that their id attributes are unique document wide and that's another use case this proposal seeks to address. It basically follows the design pattern already paved by the XML distinction. The xml:id can be reserved for authors wanting strict ID typing (with fatal errors for ID collisions in both serializations) while also allowing authors (including legacy content) to use the id attribute more leniently (with potentially many id collisions). Finally the proposal advocates for clear interoperable processing of documents that have duplicate IDENT and ID values. Sp the complexity you're concerned about is something already published through the web. This proposal is intended as a way to deal with that complexity. Take care, Rob
Received on Wednesday, 28 May 2008 22:40:57 UTC