Re: If we have versioning, it should be in an attribute, not the doctype

On Apr 17, 2007, at 3:00 PM, Chris Wilson wrote:

> Maciej Stachowiak wrote:
>> If we require a version marker (and I don't necessarily agree we
>> should), it should be in an attribute on the root element...
>> <!DOCTYPE html PUBLIC "-//W3C//HTML 5.0//EN">
> Or, as I've suggested:
>  <!DOCTYPE html PUBLIC "html5">

That doesn't seem especially prettier or uglier - I'll leave it to  
others to note whether this is an appropriate string to use as a  
doctype in SGML or XML.

>> 2) In XML, a DOCTYPE declaration is not required, and in fact is not
>> recommended for languages that do not have a DTD (either because they
>
> Bah.  Recommendations.  (oh, wait, that was just for SGML, was it?)

There would be little point to having an XML serialization that  
doesn't follow XML requirements and best practices. We already have a  
serialization that is a custom language.

>> 3) Other modern XML-based languages use a version attribute, not
>> versioning in a DTD declaration. Examples include XSLT and SVG. We
>> wouldn't want the XML serialization of HTML5 to diverge from this.
>
> I don't want the version attribute left off, then.  If required,  
> then I think it's morally equivalent to the above <!DOCTYPE> I  
> gave, but just not as pretty.  If you feel that strongly, I could  
> probably be beaten in to submission.

You shouldn't assume you will get a spec-condoned version talisman at  
all.

>> 4) In a compound document by inclusion (CDI) scenario, there is no
>> place to put the doctype. If HTML behavior is to be versioned, then
>
> You could (in the xmlns URI) identify the version.

It's contrary to good practices for XML languages to change the  
namespace URI compatible changes. Furthermore, if we used a DTD for  
versioning the HTML serialization and a namespace URI for versioning  
the XML serialization, the two would have completely separate ways of  
indicating version, whereas an attribute can work for both.

Regards,
Maciej

Received on Tuesday, 17 April 2007 22:09:14 UTC