W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

l3 content model

From: K. Ari Krupnikov <ari@iln.net>
Date: Wed, 15 Nov 2000 21:05:37 -0800
Message-ID: <3A136B21.B0C4B4A9@iln.net>
To: www-dom@w3.org
It is my understanding that L3 CM is not going to continuously monitor
the validity of a DOM tree, but is instead going to perform checks when
explicitly asked to.

It seems to me that it could be advantageous to have an option for
continuos validation of the document, something like 

boolean		Document.continuosValidation
boolean		DOMImplementation.continuosValidation

It is true that in some implementations such continuos monitoring will
be expensive, and it is also true that those who need such continuos
monitoring could use

if ( canInsertBefore (newChild, refChild) ) then
    insertBefore (newChild, refchild )

However, in some implementations, continuos validation will be cheaper
than incremental. I am building a DOM wrapper on top of a relational
database. Every time a node is deleted, created, moved ot whatever, a
trigger is fired by the database engine, which effectively performs the
validation. If, before every insert, I were to ask if it can be
completed, the same validation code would be executed twice! Note that
some database engines fire implicit triggers even if no triggers have
been defined for a particular operation.

In the optional validating mode I'm talking about, insertBefore() could
throw something like a CM_HIERARCHY_REQUEST_ERR if the operation would
violate the CM.

Note that this does not create any additional strain on teams developing
traditional DOM implementations: the difference between normal and
continuos validation mode would be that insertBefore()'s first statement
will be canInsertBefore()

K. Ari Krupnikov

DBDOM - bridging XML and relational databases
Received on Wednesday, 15 November 2000 23:06:01 UTC

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