[whatwg] [html5] tags, elements and generated DOM

Ian Hickson ian at hixie.ch
Fri Feb 24 15:16:19 PST 2006


On Wed, 6 Apr 2005, Lachlan Hunt wrote:
> > 
> > What is the benefit of having HTML defined as an application of SGML ?
> 
> So that it may be processed with SGML tools

...but it isn't. People don't use SGML tools with HTML.


> and validated with an SGML based validator

...but this would be inadequate anyway, as it wouldn't catch more than a 
fraction of conformance errors in HTML5, even if we used SGML syntax.


> and possibly even generated using XSLT.

You can generate HTML5 and XHTML5 using XSLT, as far as I can tell.


> Even if it is decided that HTML 5 is not formally an application of 
> SGML, it must at least remain fully compatible with SGML

HTML today isn't compatible with SGML, why would HTML5 be compatible?

I have an issue with the word "remain" in your sentence.


> XHTML variants of HTML 5 must be a conformant XML document instead, 
> though I noticed that is not the case with square brackets in ID 
> attributes in section 3.7.2 of WF2 (are there no other character(s) than 
> can be used instead?).

They have to be well-formed. The square brackets thing is not a 
well-formedness error.


> However, I would like to request that any defined error handling 
> behaviour designed to cope with malformed documents that directly 
> violates SGML, be made optional (but recommended) so that a user agent 
> with a conforming SGML parser may still be conform to HTML 5.

They will not be optional. They have to be required so that we get 
interoperability.


On Thu, 7 Apr 2005, Lachlan Hunt wrote:
> > 
> > What OpenSP-based UAs are there besides validators?
> 
> None that I know of yet, which is why I said current *or future* UAs. 
> There's no reason why a full conformance checker couldn't be based on 
> OpenSP.  Infact, it would probably be a good idea for them to do so, 
> since then they'll also be real validators too, which is part of the 
> conformance requirements.

Being a validator isn't part of the conformance requirements.

In any case, I think the real world use case of the billions of existing 
documents trump the hypothetical use case of OpenSP-based incomplete 
conformance checkers.


On Fri, 8 Apr 2005, Lachlan Hunt wrote:
> 
> Personally, I probably wouldn't make use of a full conformance checker 
> too often during my normal publishing process, as I understand semantic 
> documents and most likely wouldn't end up writing non-conformant 
> documents in that regard anyway.  However, I do make mistakes and forget 
> to close elements, misspell attributes and tag-names or whatever, in 
> which case an SGML validator catches most of those mistakes for me. Yes, 
> I know there are some things like conditionally required attributes that 
> cannot be expressed by a DTD, but that doesn't make _true SGML or XML_ 
> validation any less of a *very useful conformance tool*.

Most people are not at your level, sadly.


> | Conformance checkers *must* verify that a document conforms to the
> | applicable conformance criteria described in this specification...
> |
> | The term "validation" specifically refers to a subset of conformance
> | checking...
> |
> | 1. Criteria that can be expressed in a DTD.
> 
> validation is a critical part of conformance checking.

The second part you quote is a note, which is non-normative.


> > I thought Hixie has specifically said he doesn't bother with DTDs.
> 
> Just because his authoring practices may not involve their use, doesn't 
> mean many other authors don't make use of them.

People using XHTML5 are of course welcome to use any DTD or Schema that 
they wish to use.


> As real usecase for DTD validation, consider this.  There are increasing 
> calls for CMSs to produce strictly conformant markup.  There have been 
> many complaints that such conformance is not enforced, which results in 
> many invalid and non-conformant websites.  Users should not be required 
> to check all of these conformance criteria manually before submitting 
> content through a CMS, as experience shows that simply doesn't happen.
> 
> If CMSs are ever going to enforce strinctly conformant code, then DTD 
> validation will be a core component of that process.  Why re-invent the 
> wheel when it comes to that, when a perfectly suitable and proven method 
> already exists?  Experience has shown, with all the lints available, 
> that validation/conformance checking without a DTD is often incorrect, 
> which makes them very useless conformance tools.

I don't understand why you think DTDs are so critical. You could just 
implement an HTML5 parser (with its defined error reporting rules) and 
catch a much wider range of practical syntax errors than DTDs would catch.


> This is why HTML must remain an application of SGML, the XHTML version 
> *must* be a *valid* application of XML, and why DTDs are so important. 
> The only thing we are waiting for in this field is CMSs that actually do 
> enforce conformance, which we won't have a chance with if DTDs (or 
> Schemas for XML) are not retained.

I don't see any reason to use DTDs. They suck. Most schemas aren't much 
better. For the kind of detailed conformance checking HTML5 requires, 
you'll be wanting to use your own explicit hard-coded implementation, not 
one or more schemas. IMHO.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list