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

Re: Some more suggestions and a DOM OM

From: Craig Brozefsky <craig@duomo.onshore.com>
Date: 03 May 1998 18:35:15 -0500
To: "Jeff" <jmackay@vtopia.com>
Cc: <www-dom@w3.org>
Message-ID: <874sz7udvw.fsf@duomo.onshore.com>
"Jeff" <jmackay@enteract.com> writes:

> That may be true, although most implementations will need a validation hook.
> I just wanted to get some discussion started on the topic...  There was a
> request for an InvalidChildException (or something to that effect) on
> insertChild().   I believe that would unnecessarily complicate the building
> and processing of simple documents. But since all conforming processors have
> to do validation at some level, it makes sense that validation should be
> available through the DOM--whether through the Node interface or the
> Document interface.

You would probably not want to do your validation on insertChild, but
rather either as a user callable third step, or a automagically called
mechanism when the document is written out or saved.  Putting it on
insertChild would be annoying if I was building a document thru an
iterative process and a required element could not be gotten from the
user until later in the process.  I think checking for validation
against the DTD should be postponed.

I find that the EOF from NeXT is full of interesting examples of how
to provide abstractions for writing interfaces to objects
derived/stored in a secondary storage mechanism.  In the case of EOF
it's Oracle or any data store.  In DOM it's an SGML/XML document.

Think about ways in which people are going to want to tie events from
the interface into the DOM hierarchy.  Having validation done at
insertChild and it's ilk makes me need to interrupt the user's
workflow immediatly if their change throws up some validation problem.
Whereas making validation a seperate step allows me to either validate
immediatly in some cases and notify the user, or save it all until
they hit the "SAVE" button.  Leave the choice for the developer.

A little mantra might be: "Provide the programmer with a set of
abstractions for building something within a well defined and
verifiable solution space, and do as little as possible to interfere
with the flow and process used to build it."

or the shortend version: "Sublime Objects." 8)
Received on Sunday, 3 May 1998 19:31:34 UTC

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