l3 content model

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
or
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
http://www.iter.co.il

Received on Wednesday, 15 November 2000 23:06:01 UTC