[Bug 20993] To facilitate migration, <!DOCTYPE html> should be recommended for the XHTML5 syntax.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20993

David Carlisle <davidc@nag.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davidc@nag.co.uk

--- Comment #4 from David Carlisle <davidc@nag.co.uk> ---
(In reply to comment #3)
> Robin, here is a concrete text proposal:
> 
> <INS>
> DOCTYPE declarations used with documents conforming to this specfication
> MUST be shaped according to the following rules:
> 
> 1. The name part MUST be an ASCII case-insensitive match for the
>    string 'html'.

There is a pre-existing requirement from XML that the name here must match
exactly the top level document element name, so any extra advice here
(and I'm not sure there should be any) should be phrased and positioned
as describing the document element, not the doctype declaration.
I'm not sure why you want to say case insensitive anyway as the element names
have to be lowercase in the xhtml syntax.

>      
> 2. It is OPTIONAL whether there is a DTD associated with the
>    DOCTYPE.

OK although saying that or not saying that adds nothing.
>    
> 3. When there is no associated DTD, the DOCTYPE MUST match
>    the DOCTYPE of the HTML syntax.

I think here you mean <!DOCTYPE html> but as for (1) this would be better
phrased by saying that the document element MUST be html (but I'm not sure we
want to say that, it isn't a strictly necessary requirement)
> 
> NOTE: A DOCTYPE declaration without an associated DTD does not
>       have any effect on XML parsers and is only allowed in order
>       to facilitate migration to and from HTML.

It could have some effect, in particular if the specified name is missing
or mal formed it is a fatal parse error.

>       
> 4. The associated DTD, if any, MUST define this specification’s
>    list of named character references. Other character references
>    MUST NOT be defined.

That requirement is incompatible with all the DTD currently listed in the
HTML spec.
> 
> NOTE: Thus there is no requirement that the DTD is a complete <a
>       href="http://www.w3.org/TR/xml/#dt-markupdecl">markup 
>       declaration</a> that defines other aspecs of the language
>       than the character references.
> </INS>


In your original comment you say

(yes, it could be <h:html xmlns:h="http://www.w3.org/1999/xhtml">, but in a
XHTML document, the root has to be the 'html' element!


But I don't see why that should be the case
<!DOCTYPE h:html>
<h:html xmlns:h=....

is valid xhtml 1.1 and works in common browsers, why say the root has to be
html>

The xhtml 1 dtd goes to extraordinary lengths to parametrise every element name
precisely so that this prefixed usage is allowed.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 21 February 2013 10:06:47 UTC