Re: HTML Document Object Model

On Tue, 15 Feb 2000 09:06:39 +0100, Juan L. Lara wrote:

>I don't think both interpretations are so different, DOM is
>   (1) an object model of the HTML document,
>and assumingthis description in terms of object oriented description, it
>   (2) a model of the HTML document object.
>Anyway, any suggestion on the translation will be appreciated.

Thank you very much for your prompt response.  I agree that in
English, the distinction is unimportant; the phrase is clear without
any analysis.  However, I wish to translate the phrase correctly, so I
must examine such things.

Please allow me to include the following separate excerpts from the
DOM, which have been cut from different paragraphs:

>The Document Object Model provides a standard set of objects for
>representing HTML and XML documents, a standard model of how these
>objects can be combined, and a standard interface for accessing and
>manipulating them. 

>The name "Document Object Model" was chosen because it is an "object
>model" in the traditional object oriented design sense: documents are
>modeled using objects, and the model encompasses not only the
>structure of a document, but also the behavior of a document and the
>objects of which it is composed.

>The structure of SGML documents has traditionally been represented by
>an abstract data model, not by an object model. In an abstract data
>model, the model is centered around the data. In object oriented
>programming languages, the data itself is encapsulated in objects that
>hide the data, protecting it from direct external manipulation. The
>functions associated with these objects determine how the objects may
>be manipulated, and they are part of the object model.

In the first sentence of the second excerpt, we are told that the name
was chosen because DOM is an 'object model'.  In the last sentence of
the second excerpt, we are told that a document may be composed of
multiple objects described by the (object) model.  Because of these
two statements, it seems clear that we are not speaking of a 'document
object' at all, but an 'object model' describing possibly multiple
objects within a document.

We were discussing the following two possibilities:
   (1) an object model for an HTML document;
   (2) a model of the HTML document object.

Surely, these are different, because from the DOM, we have seen that
the second translation must be incorrect.  There is a third which we
were not discussing:
   (3) a Document Object Model for HTML.

I think that our remaining (1) and (3) are closer in meaning than (1)
and (2).  In the first excerpt, we are told that "the Document Object
Model provides a standard set of objects for representing HTML and XML
documents".  I can find nowhere in the specification where the DOM
refers to HTML or XML, only to HTML documents or XML documents.
Perhaps in an exercise of redundancy, one could say 'the HTML Document
DOM' or 'the XML Document DOM', but that would be silly.    Because of
our above discussion of the 'object model' and the pairing of 'HTML
documents' and 'XML documents', I believe that (1) is the correct
translation (or concept).

Your comments helped me immensely and I thank you for them.  If you
can see any flaws in my reasoning, please let me know!  Otherwise, I
will go with 'HTML-document object-model' or 'an object model for an
HTML document'.

Thank you,
   - Zeno

Received on Friday, 18 February 2000 22:13:12 UTC