Re: XML:ID extension spec proposal to HTML5 documents

David Carlisle, Tue, 04 Feb 2014 16:28:17 +0000:
> On 04/02/2014 16:03, Leif Halvard Silli wrote:
>> Jirka Kosek, Tue, 04 Feb 2014 15:26:28 +0100:
>>> On 4.2.2014 13:29, Leif Halvard Silli wrote:

>>>> I don’t follow this logic. For instance, DOCTYPE and DTD is
>>>> already specified. But that does not prevent us from coming up
>>>> with new DTDs - and add them to various new specs. I think it is
>>>> useful to have a document that explains ”the ways to Rome”.
>>> 
>>> No one reasonable is going to come up with new DTDs -- DTDs are
>>> dead.
>> 
>> I did not mean to imply anything about the utility of DTDs. I only
>> meant to derive some logics from how DTDs have been used in various
>> spec.
>> 
>> A clearer example of what I meant is that HTML5 defines how to use
>> xml:lang="foo". Why, when how to use xml:lang="" was defined in XML?
>>  Simply because there are some things to say about how it should be
>> used, when or if authors want/need to use it.
> 
> No 

David, you defined a DTD last year: http://www.w3.org/TR/xhtml-pubid/


According to Jirka, you are therefore not reasonable. :-D

> HTML5 has to say something about xml:lang as the XML definition isn't
> that relevant, the syntax xml:lang="foo" is defined by html to make an
> attribute with local name "xml:lang" and defined behaviour:
> 
>> The attribute in no namespace with no prefix and with the literal
>> localname "xml:lang" has no effect on language processing.

Actually, when describing xml:id, the spec proposal borrows heavily 
from how HTML5 describes xml:lang.

Given a logic which says that ”everything that applies to XML, also 
applies to XHTML”, then HTML5 clearly says things about xml:lang that 
it did not have to say. Or how about this: ”The lang attribute in the 
XML namespace may be used on HTML elements in XML documents”?

> The main aspect of the HTML5 definition of xml:lang (in text/html) is 
> that it is valid but ignored so long as it is used on an element with 
> a lang attribute with the same value.

Right. And the spec proposal suggests the same criteria for when the 
xml:id attribute should be permitted, namely when there is a 
corresponding id attribute.

>> The same way, it is not enough, in my view, to just start littering
>> HTML document with xml:id=*.
> 
> As specified that simply makes documents invalid, and it's best to leave
> it that way, ie not have an extension specification that makes it valid.

Actually, this is not true. Why not? Well, because the solution 
described in the spec will always result in (non-fatal) error messages 
provided the tool *does* implement ID assignment according to what 
HTML5 says.  This (and I see this clearer now) is the reason why the NU 
Validator, which do assign ID type for id, for XHTML document does emit 
error messages if one uses both xml:id and id on the same element.

The spec proposal already says that if both xml:id and id are assigned 
ID type, the XML tool will issue an (non-fatal) error message. But I 
will make bring the legacy aspect of the spec proposal much clearer in 
the next update.

>> One should be aware of what one is doing. Not least should one know
>> that there is actually defined a better way, which we are waiting for
>> the implementations of. And thank you very much for helping me to see
>> how HTML5 intends ID assignment to function - I will put that in the
>> spec proposal!
-- 
leif halvard silli

Received on Tuesday, 4 February 2014 18:45:26 UTC