W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: The DOM HTML model

From: Mike Champion <mcc@arbortext.com>
Date: Mon, 25 May 1998 11:33:55 -0400
Message-Id: <98May25.113112edt.26886@thicket.arbortext.com>
To: www-dom@w3.org
At 09:11 AM 5/25/98 -0400, Heikki Vesalainen wrote:
> I just read the DOM Specification through and a question came to my
> If I have understood correctly the documents being altered with
>the DOM model are being parsed and put into a tree-like structure so that

>Now to the question... How would the following HTML be parsed?
><P>How would <B>This</B> be parsed?</P>
>is it 
>P: "How would", B, "be parsed?"
>B: "This"
>P: "How would <B> this </B> be parsed?"

I'm not sure I understand; is the issue that the "B" tag is "really" for
procedural markup rather than being structural?  
In any event, the DOM doesn't get into this; HTML tags should parse into a
DOM element object.  The representation of text in the DOM is a subject of
dispute, but as it stands now,a DOM-aware parser should produce a tree
something like:
              /  |  \
"How would"      B  " be parsed?"
In words, since my ASCII drawing may get reformattted ... there is 
an HTMLDocument object that contains one P element.  The P element has 3
children, a TextNode with the string "How would ", a B element, and another
text node containing the string " be parsed?".  The B element has one
child, a TextNode containing the string "this".

Does this answer the question?

Mike Champion
Received on Monday, 25 May 1998 11:34:45 UTC

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