Re: setting an element's value?

Gavin Stokes wrote:
> It seems that the only reason you can't just have the "value" text in
> between the element tags (before or after all the subnodes) is the
> perceived necessity to have multiple independent blocks of text
> interspersed with the subnodes.  But why should that be allowed anyway?  If
> you want a bunch of independent text nodes under an element, then yes, they
> should have to be added as subnodes.   An element should have only one
> value.  Wouldn't this work?

<p>This is a <b>bold</b> statement</p>

What's the value of p?  Is it "this is a", "statement", "This is a bold
statement", or "This is a <b>bold</b> statement"?  The answer, of course
depends on the type of application you're building, and should not be an
assumption made by the DOM.

-- 
Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
Relational XML support?  I liked it more when it was a CLOB.

Received on Monday, 9 July 2001 19:17:24 UTC