Where’s the DTD?

Not finished yet. HTML5 is complex and this is a non profit project. I can’t spend much time on the DTD design. My first idea was to publish the DTD when it’s finished, but that would take to long. I decided to blog about the progress, publishing a series of “alpha releases”.

Will the DTD be official?

No. As long as it means “W3C official” or something like that. The project is NOT related to W3C or WHATWG. It’s related to me and my company. I design the DTD for my very own use, but publish it for anyone to use. Enjoy or ignore it.

There might be other DTDs out there. A Relax NG schema can be found here: https://bitbucket.org/validator/syntax/src

Will the DTD conform to the HTML5 spec?

No, in the following sense: You won’t be able to express everything that is HTML5 with the DTD. But every XML instance, that validates against the DTD will be correct HTML5. Thus, the DTD will be an HTML5 subset. Why?

Two answers:

  1. Not everything in the HTML5 spec can be expressed with XML. For example, the data-* attributes can’t.
  2. Some decisions for HTML5 seem really strange to me. Since I can’t write a DTD that matches the spec exactly, I can take the chance and write a DTD that is easier to understand than the HTML5 document model. (I.e. the sectioning stuff looks really weird to me.)

Will there be a Schema?

Probably. I promise a Schema on the frontpage of this site. At least, there will be a Schema generated from the DTD.


Since SGML has some features that I am missing in XML, I was tempted to write a SGML DTD (i.e. I miss the RCDATA, the & in content models and a few other things). But I joined the XML train early in 1997, and it took me a long way away from SGML. The XML spec is less than the SGML spec, but XML is more than the spec. It’s a whole ecosystems of standards, know how, open source tools and libraries making XML more powerful than SGML ever was. The decision is easy: My HTML5 DTD will be an XML DTD. If you want SGML, here’s the “how to”: Use my DTD and the SGML declaration for XML and you get a SGML application.

Why this project?

  1. I use Emacs+PSGML to write HTML. I can’t without a DTD.
  2. I have a lot of know how writing, using, programming XML. I want to use this on the Web.
  3. I certainly do not agree with some design decisions made for HTML5.
  4. I certainly do not agree with some arguments against a DTD for HTML5.
  5. I do agree with some of the critique of the current direction of HTML5, but prefer to build something that might help, instead of writing my own flames.

How can I join?

To be honest: In this very beginning of this project I can’t imagine that anybody would want to join. It feels pretty much like a project for my own, that nobody is interested in.

If I am wrong, you can contact me by leaving a comment on one of the blog posts.

Creative Commons License
HTML5 DTD by Stefan Mintert/Linkwerk GmbH is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.