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

Henri Sivonen hsivonen at iki.fi
Sat Mar 10 09:30:25 PST 2007


On Mar 10, 2007, at 15:43, Elliotte Harold wrote:

> Alexey Feldgendler wrote:
>
>> The tutorials will just say "Use <!DOCTYPE html>".
>
> What are those of us who wish to use XML tools on our documents  
> supposed to use?

<!DOCTYPE html> if you are using XML tools with an HTML5 parser.

No doctype if you are using XHTML5 and targeting an XML parser.

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

Straight UTF-8 should be used for interchange on the XML side.

> <!DOCTYPE html PUBLIC "-//WhatWG//DTD XHTML 5.0//EN"
>         "/DTD/xhtml5.dtd">

Browsers won't read arbitrary DTDs by system ID. OTOH, if you want to  
activate the hacks for enabling XHTML 1.0 entities, you need to use  
an XHTML 1.0 public ID. A new previously unknown public ID won't work.

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

For Web content, browsers matter and the reality is that DTDs don't  
work.

> We will create and use them, even if there's no normative DTD in  
> the spec.

The spec doesn't need to say anything normative about private (non- 
Web) use. If it is between you and your own entity resolver, using a  
DTD with an identifier of your choice is fine. However, before  
serving documents on the Web, you'd need to parse and reserialize so  
that the serialization that is sent to the public network does not  
have DTD dependencies.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the whatwg mailing list