[whatwg] Create my own DTD and specify in DOCTYPE? Re: Validation

Tab Atkins Jr. jackalmage at gmail.com
Tue Jul 21 13:55:45 PDT 2009


On Tue, Jul 21, 2009 at 3:02 PM, <Darxus at chaosreigns.com> wrote:
> On 07/21, Tab Atkins Jr. wrote:
>> HTML5 is not an SGML or XML language.  It does not use a DOCTYPE in
>
> I thought HTML5 conformed to XML?

Nope.  HTML5 offers an XML serialization, but it is not an XML language.

>> any way.  The "<!DOCTYPE HTML>" incantation required at the top of
>> HTML5 pages serves the sole purpose of tricking older browsers into
>> rendering the document as well as possible.  No checking is made
>> against a DTD, official or otherwise.
>
> I understand that, but the spec says an HTML5 document must include
> <!DOCTYPE html>.  And I would like, for my own purposes, to be able to
> instead use <!DOCTYPE html SYSTEM
> "http://www.chaosreigns.com/DTD/html5.dtd"> without violating HTML5.

And again, that is only there to trick as many old browsers as
possible into using their most standards-based rendering mode.  If it
were possible to do so without that incantation, it would be dropped
entirely.

If you absolutely need to embed extra information (such as a
validation schema that you will use for your own purposes to validate
your own documents), there are a multitude of ways to do so.  You
could use a data-* attribute on the <html> element.  You could use
Microdata to encode the information onto the document.  You could use
a <link> element to point to the schema.

~TJ



More information about the whatwg mailing list