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

Tab Atkins Jr. jackalmage at gmail.com
Tue Jul 21 12:43:50 PDT 2009


On Tue, Jul 21, 2009 at 2:21 PM, <Darxus at chaosreigns.com> wrote:
> Am I correct in concluding that my best option is to create my own
> HTML5 DTD, and use a DOCTYPE along the lines of:
>
> <!DOCTYPE html SYSTEM "http://www.chaosreigns.com/DTD/html5.dtd">
>
> ?
>
> Can the HTML5 spec be modified slightly to say that this sort of thing
> complies?
> ( http://dev.w3.org/html5/spec/Overview.html#the-doctype )
>
> It seems like if I do create a DTD, I should not permit copying, in order
> to increase the number of individually created DTDs to check against each
> other?
>
> I'm also open to the possibility of HTML5 specifying some sort of comment
> stating the HTML version number.
>
>
> Reasons for the above conclusion:
>
> An official HTML5 DTD is not desired because official schemas are buggy and
> people don't fix them, and having only non-official DTDs will improve
> quality, according to Ian Hixie, March 2009 -
> http://lists.whatwg.org/htdig.cgi/help-whatwg.org/2009-March/000192.html
>
> Also, there does not appear to be an XML 1.0 conformant way to specify more
> than <!DOCTYPE html> (which conforms) without specifying a url for a DTD.
> http://www.w3.org/TR/REC-xml/#dt-doctype
>
> The bit in quotes is a Public Identifier, which is the entire contents
> of RFC3151: http://www.ietf.org/rfc/rfc3151.txt
>
> And the full spec is in ISO 8879:1986 (SGML) which costs US$ 222.525,
> so I don't know what the Public Text Class ("NONE" above) could be
> replaced with, other than "ENTITIES".
> http://www.blooberry.com/indexdot/html/tagpages/d/doctype.htm
>
> Another use that occurred to me is the case where someone has thousands of
> html files, which they want to automatically validate at once, and some of
> them have been updated to a more recent standard (and they want to make
> sure they stay compliant with it), but others have not been dealt
> with yet.
>
> On 07/21, Philip Taylor wrote:
>> <!DOCTYPE html SYSTEM "6"> as the shortest string that provides a
>
> Violates XML 1.0 and RFC3151 (Public Identifier).
>
>> If you want to check that your pages are compatible with certain
>> browser releases, the language version number is a very bad
>> approximation - you'd want a tool that understands what features IE10
>> supports (maybe some (but not all) from HTML4, some (but not all) from
>
> Indeed.  Do you have that information?  If not, I would still like the
> option of noting a version type in my documents.
>
> Although the possibility of creating a DTD based on what conforms to
> standards *and* current browsers are capable of is a fun idea.
>
>> like <meta name="check-ua-compatibility" content="ie=10;fx=5"> seems a
>
> Cool.

HTML5 is not an SGML or XML language.  It does not use a DOCTYPE in
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.

Version numbers are explicitly left out of the the HTML5 doctype
incantation for several reasons; one such reason is to help prevent
people from assuming that the incantation has any significance.

~TJ



More information about the whatwg mailing list