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

The DOM HTML model

From: Heikki Vesalainen <hvesalai@cc.hut.fi>
Date: Mon, 25 May 1998 16:11:21 +0300 (EET DST)
To: www-dom@w3.org
Message-ID: <Pine.OSF.3.96.980525155827.10102C-100000@alpha.hut.fi>
Hmm..

 I just read the DOM Specification through and a question came to my
head:

 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
e.g.

<DIV><H1>Heading</H1><P>Some text and a <IMG SRC="Image"></P><P>More
text</P></DIV> 

Would be a tree with the DIV-element as it's root
DIV: H1, P(1), IMG, P(2)
H: "Heading"
P(1): "Some text and a"
IMG: "Image"
P(2): "More text"


Now to the question... How would the following HTML be parsed?

<P>How would <B>This</B> be parsed?</P>

is it 
a) 
P: "How would", B, "be parsed?"
B: "This"

or 

b)
P: "How would <B> this </B> be parsed?"

...
Heikki Vesalainen * hvesalai@cc.hut.fi * http://www.clinet.fi/~wes
		 It's Not Here - Wisdom is Above!
Received on Monday, 25 May 1998 09:12:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT