Re: Write-up about semantics in HTML5 from A List Apart

Thomas Broyer wrote:
>> All true.
>>
>> But in XML based languages you can extend the vocabulary,
> 
> Only when the vocabulary has been defined to be extensible, otherwise
> your document won't validate (DTDs do not allow plugging in attributes
> other than defined ones and only allow "foreign" child elements when
> the content model is ANY; it's almost the same with XML Schema except
> you can opt-in for foreign attributes --eventually constrained by
> namespace-- and allow foreign child elements while still
> validating/constraining other child elements; again almost the same
> with RelaxNG, with added expressiveness re. deterministic vs.
> ambiguous content models).

Understood.

So yes, in XML either the language needs to have the right attitude wrt 
extensibility, or you need to ignore validity. Still better than the 
situation with HTML.

> ...
> I don't know SGML much but it seems no more different than optional
> tags being defined in the DTD: if HTML5 were still SGML-based, when
> you'd add a new element (particularly a new "void element": EMPTY
> content model with optional end tag), you'd have to update the DTD,
> and because no one would download DTDs but use their local catalogs,
> you'd have the same deployment problem.
> ...

Right, and that IMHO was the key innovation: the parser is frozen, 
out-of-band metadata (DTD) is not needed, but the vocabularies can evolve.

 > ...> As already mentionned, one thing we could do is prohibiting
> introduction of void elements, but a) as Ian said it would make things
> harder to read (<command></command>) and b) it would not address all
> use cases, as you would also need to prohibit introduction of new
> scoping/formatting/phrasing elements, and that's probably not desired
> (we want <section> to auto-close any opened <p>, but for compatibility
> with non-HTML5 UAs, authors still have to explicitly close their <p>
> before opening a new <section>).
 > ...

I think if auto-closing <p> would be the one thing that kept us from 
reaching a sane parsing model, the winner should be clear...

 > ...

BR, Julian

Received on Wednesday, 7 January 2009 16:58:58 UTC