[whatwg] Using the HTML5 DOCTYPE as a new quirksmode switch

On Sat, 10 Mar 2007 14:43:44 +0100, Elliotte Harold  
<elharo at metalab.unc.edu> wrote:

> What are those of us who wish to use XML tools on our documents supposed  
> to use?

Set the 'xml_tool.ignore_doctype' property to 'true'. I'm sure most XML  
libraries have this (or a similar) option. At least most of the ones I've  
worked with has had them, and not having a DTD does not mean that you  
can't be strict about what you consume. There will be HTML5 XSD and RNG  
schemas available (I would actually think they exist already) for you to  
use in your application once that day comes. DTD is dead. Deal with it.

> We will need a real DTD at some point, to declare the entities if
> nothing else.

Then define your own internal subset. You don't need a full DTD for the  
entities. Just use XHTML 1.1's if you must:

<http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_xhtml_character_entities>

> We will not be able to use <!DOCTYPE html>.

If you can get your parser to ignore it, sure you can.

> Possibly this could be two-fold. E.g there could be both
>
> <!DOCTYPE html>
>
> and something like
>
> <!DOCTYPE html PUBLIC "-//WhatWG//DTD XHTML 5.0//EN"
>          "/DTD/xhtml5.dtd">

That's an option too, but it would be confusing for authors.

> I know some browser-centric folks here just hate DTDs and schemas of any  
> kind; but we will need them, even if the browsers don't. We will create  
> and use them, even if there's no normative DTD in the spec.

I don't hate schemas. I work with them almost every day. I also consume  
XHTML in various forms without ever having to touch a DTD. I'll say it  
again; DTD is dead.

> One thing that's struck me in working with the spec over the last few  
> days is just how hard it is to follow the various content models, and  
> how much simpler most of them would be to read if they were described in  
> a RELAX NG schema or a DTD.

That I can agree with. A compact Relax NG schema would definately be  
useful to codify (and thus clarify for many of us) the lengthy text that  
describes the conformance requirements. The schema should only be  
informative, of course, but it could even prove to be useful in the  
normative part of the spec, since having to think in RNG terms often makes  
you find bugs in the langauge you wouldn't see otherwise.

The Atom Syndication Format specification uses RNG in this style and I  
think it works amazingly well:

<http://atompub.org/rfc4287.html#schema>

-- 
Asbj?rn Ulsberg     -=|=-    http://virtuelvis.com/quark/
?He's a loathsome offensive brute, yet I can't look away?

Received on Tuesday, 13 March 2007 12:29:25 UTC