4 ms·
DTD != DOCTYPE. More clearly, you are conflating two things: a Document Type Definition, which HTML5 does not have (since it is not an SGML application) and a
by ubernostrum 17y ago
DTD != DOCTYPE.
More clearly, you are conflating two things: a Document Type Definition, which HTML5 does not have (since it is not an SGML application) and a Document Type Declaration, which HTML5 does have.
The former is (glossing over a lot here) an SGML document outlining the grammar and vocabulary of a particular markup language. The latter is a statement that a document uses a particular markup language. And such a statement does not require or imply the existence of a corresponding formal SGML definition of the language.
- prodigal_erik 17y agoRight, they removed the public and system identifiers from the declaration because there will be no SGML DTD to point at. But as far as I can tell, the current draft fails to provide an official schema of any kind to take the place of a DTD.
- ubernostrum 17y agoThat's because the specification instead defines the manner in which HTML5 documents should be parsed. In theory someone can provide an XML schema which defines the rules for the XML serialization of HTML5, but parsing HTML5 as HTML isn't something which (so far as I know) can be expressed in a standard machine-readable schema format. The downside is you don't have "drop this file into an SGML parser and it works". But since that never worked with real-world SGML-based HTML anyway, the upside is that you get a parsing mechanism which actually handles the sorts of things you'll encounter in the wild.