[Bug 11910] @id values in polyglot markup should be XML-valid (or not?)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11910

Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xn--mlform-iua@xn--mlform-i
                   |                            |ua.no

--- Comment #2 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> 2011-01-28 16:28:33 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> 
> > However, in XML, the value of an @id, has the validity constrataints that it
> > must meet XML's name production, which amongst other things means that the
> > first character cannot be a number. 
> 
> This is only the case if the id attribute is of type ID.  Since (most) of the
> polyglot valid doctype usage would not point to a resolvable DTD at all I think
> that it would make sense to assume all attributes are CDATA for the purposes of
> this document, and also, if ever a dtd for html5 were to be produced that tried
> to approximate the polyglot  rules it should define id to be CDATA. However I
> don't think that the polyglot spec should depend on dtd at all since there is
> unlikely to be a normative html dtd.
> 
> So I don't think that this spec need say anything about id attributes other
> than the general comments about attributes (white space and other character
> normalization/quoting issues)

Right. Thus I think that Polyglot Markup should *point out* that there are, in
fact, no restrictions from the XML-side on the @id in a (typical) polyglot. May
be it could simply point out that the @id in a (typical) polyglot is CDATA.
Because, otherwise, many are used to the fact that there has been restrictions
on the content of @id.

That said, Polyglot Markup does not (at this point) forbid the legacy DOCTYPEs
that are permitted in HTML5. 
See http://www.w3.org/TR/html-polyglot/#doctype
And http://www.w3.org/TR/html5/syntax#the-doctype

Quoting HTML5: "A DOCTYPE containing an obsolete permitted DOCTYPE string is an
obsolete permitted DOCTYPE. Authors should not use obsolete permitted DOCTYPEs,
as they are unnecessarily long."

So, for example, if an author was using XHTML 1.0 doctype, what then? Perhaps
Polyglot Markup should say that, *if* authors use a DTD, then they SHOULD
(MUST?) *also* (A) comply wiht the general validity constraints of XML (such as
the name productionof @ID) as well as (B) with all the other  syntax rules (for
attributes and elements) of that particular DTD? ( Even if one uses a DTD, it
is not usually a problem - in a normal browser - to break e.g. the validity
rules of the name production, as long as one doesn't use a validating parser
etc. Hence I said "should" instead of "must".)

Polyglot Markup have been compared to Appendix C of XHTML 1.0. - which have
been said to be too inaccurate. Perhaps we don't need to make up for that
inaccuracy. But Polyglot Markup actually becomes something completely different
from Appendix C if it simply ignores the issues of having a DTD in the DOCTYPE.

There are, as I see it, very few problems with Appendix C - except that it does
not talk about the DOM.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 28 January 2011 16:28:35 UTC