Re: XML:ID extension spec proposal to HTML5 documents

On 04/02/2014 18:44, Leif Halvard Silli wrote:
> 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/


I updated a much bigger one this week:

http://lists.w3.org/Archives/Public/www-math/2014Feb/0000.html


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

I've been called worse...

>
>> 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”?

That is not automatic, it is up to the designer of any specific
vocabulary whether to include xml:id. (It isn't valid MathML for example
as we chose not to add it to the MathML Schema/DTD). So if xml:id is to
be considered valid in XHTML then the HTML spec has to say so.

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

XHTML is less of an issue. Your draft extension would make xml:id valid
in text/html parsing which would be an unfortunate change. That was what
I was referring to above.

>
> 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.
>
If it is a validating  parser it is (or could be) a fatal error.


David

Received on Tuesday, 4 February 2014 21:11:29 UTC