Re: TBodies ...

>In other words, should the *implict* <TBODY> in the above
>HTML fragment tag be *explicitly* represented in the DOM?


I didn't answer this question earlier because there is no clear anwer.

The DOM spec is very vague in this area.  While it does specify parent-child
node type constraints (i.e. Comment node can't have child nodes), it does
not come out and say whether a DOM implementation should enforce DTD
constraints to the fullest.  Even the HTML portion of spec stops short of
spelling this out.

"The key differences between the core DOM and the HTML application of DOM is
that the HTML Document Object Model exposes a number of convenience methods
and properties that are consistent with the existing models and are more
appropriate to script writers. In many cases, these enhancements are not
applicable to a general DOM because they rely on the presence of a
predefined DTD. For DOM Level 1, the transitional and frameset DTDs for HTML
4.0 are assumed. Interoperability between implementations is only guaranteed
for elements and attributes that are specified in these DTDs."

Above paragraph seems to imply that the assumed presence of a predefined DTD
are there for the enhancements (convenience methods and properties) and not
for enforcing semantic constraints.

The problem is that sometimes you want the semantic constraints to be
enforced but sometimes you don't.  We can not just choose between
predictability and flexibility because decision depends on the situation.
Yes, I would like to assume that all table rows are inside table section
elements.  But then I would also like to be able to add some custom elements
or attributes into my document.

Perhaps what we need is a way to have two views of a Document.  A 'perfect
world' view of the document for predictability and a 'anything goes' view of
a document for flexibility.  Perhaps some of this can be addressed in Level
2.  Perhaps...

Best,

Don Park
Docuverse

Received on Thursday, 8 October 1998 17:47:38 UTC