Re: XML:ID extension spec proposal to HTML5 documents

Hi, Leif–

xml:id was well-intentioned, but poorly designed. It tries to solve the 
problem in the wrong layer.

Since you referenced SVG, I thought I'd chime in with some history I 
thought might help. We removed xml:id from SVG because it created 
identity conflicts, led to confusing authoring guidelines, and was 
generally disruptive to existing content formats like SVG and HTML. I 
researched this and wrote it up [1] for the SVG WG.

If XInclude UAs or other parts of the XML toolchain want to recognize 
the ID-ness of HTML, SVG, or MathML, those tools should simply be 
updated to use the same building blocks of the Web Stack that other 
tools are shifting to. There are far fewer of those tools than there are 
authoring tools or authors. Don't ask the dog to be wagged by the long tail.

(In my opinion, XML should simply have defined @id to be of type ID from 
the beginning, or done so later instead of working on xm:id; the only 
major XML language that didn't conform to the @id-uniqueness best 
practice was Chemical Markup Language (CML), and they should simply have 
chosen a different attribute name.)

[1] http://www.schepers.cc/xmlid/svgxmlid.html

Regards-
-Doug

On 1/31/14 5:48 PM, Leif Halvard Silli wrote:
> Jirka Kosek, Fri, 31 Jan 2014 22:19:34 +0100:
>> On 31.1.2014 8:09, Leif Halvard Silli wrote:
>>> The extension spec addresses the issue that the new doctype that was
>>> introduced by HTML5, removed (classic) XML ID-type assignment from HTML
>>> documents consumed as XML. As a result, XML tools relying on that kind
>>> of assignment are unable to locate resources of XML ID type in HTML5
>>> documents. XHTML1 documents do not have this issue (as long at their
>>> DOCTYPE is included).
>>
>> It seems that your motivation is solely based on making it possible to
>> use xpointer in XInclude for HTML content. Then I think right approach
>> is to define that when XInclude is evaluated on text/html content, then
>> id attribute is considered of ID type and you are done. There is no need
>> to clutter HTML5 with xml:id attribute.
>
> Of course, it would be very handy if it was as simple to use HTML5
> documents with XInclude as it is to use XHML1.x documents. And since
> the spec is about ”XML ID-type assignment“ for HTML5 documents (see the
> title), a future update could add the kind of mechanism that you
> suggest.
>
> But as of right now, I am unaware of tools that have taken that
> approach. It does not even seem to work for SVG (please correct me!) -
> and least not when it come XML tools. (And this despite the fact that
> SVG is a format for which the approach you recommend ha been talked
> about for a while.)
>
> Using HTML as format for all kinds of documents, is increasingly
> popular. Thus my attitude is that there is a need for a document that
> specifies what exists and works today.
>

Received on Wednesday, 5 February 2014 19:26:18 UTC