Re: HTML APIs

Building DOM nodes for elements that logically must exist in an HTML
document but may not actually exist as tags in the source text *is* the job
of a DOM implementation. I don't think it matters if these fixups are done
"eagerly" when the document is created or "lazily" when someone asks for
one of the elements that were implied. 

I don't follow the implication of "what if the user really wants frames?". 

Mike Champion

At 10:55 PM 12/30/98 -0600, Mike Olson wrote:
>
>
>John Cowan wrote:
>
>> Mike Champion wrote:
>>
>> <snip>
>
>> 2. All valid HTML documents contain HTML, HEAD, and BODY elements even
>> if no such tags are present, and therefore conforming DOM implementations
>> must represent them explicitly as nodes.  (TBODY, which is a container
>> for table rows, obeys the same rules: it appears implicitly in every
>> TABLE element.)
>>
>
>I've been following your thread with much intrest, and need a little
>clarification.
>
>Would the adding of these tags be the job of the builder or the DOM
>implementation?  If it is the job of the DOM implementation, when should
these
>be added?  In the example giving earlier, I imagine it would be the job of
the
>builder to make sure the DOM structure represents a valid 4.0 document
even if
>what it is parsing is not completely valid (missing the HTML tag or such).
>However, should
>
>d = someFactory.createHTMLDocument();
>d.setTitle('A New Title')
>
>add a HTML and a HEAD (and of course a TITLE) to the document?
>
>or should:
>
>d = someFactory.createHTMLDocument();
>d.getBody();
>
>create a BODY tag and then return it?  What if the user really wants frames??
>
>
>Much thanks
>
>
>>
>> --
>> John Cowan                                      cowan@ccil.org
>>                 e'osai ko sarji la lojban.
>
>--
>Mike Olson
>Member Consultant
>FourThought LLC
>http://www.fourthought.com http://opentechnology.org
>
>
>---
>
>"No program is interesting in itself to a programmer. It's only
interesting as
>long
>as there are new challenges and new ideas coming up." --- Linus Torvalds
>
>
>
>

Received on Thursday, 31 December 1998 09:49:05 UTC