W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: TBodies ...

From: Don Park <donpark@quake.net>
Date: Thu, 8 Oct 1998 14:46:39 -0700
Message-ID: <007001bdf305$23cc4ea0$2ee044c6@arcot-main>
To: "'DOM list'" <www-dom@w3.org>
>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...


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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC