Hi,

(Elena Litani posted this question of mine to xerces-j-dev a few weeks
ago - under the subject "Design of a validating configuration server" -
but there was no reply.)

I'm looking for a way to speed up the revalidation of a continuously
modified DOM document.

I'm maintaining a CORBA server application (written in Java) responsible
for managing the configuration of a telecom traffic measurement system.
This Config server uses the Xerces's experimental DOM Level 3
implementation (version 2.5.0) and maintains the configuration data in a
DOM document. The structure of the document is defined with an XML
schema (containing e.g. identity constraints).

When a client requests a modification of the document, the Config server
in the current design performs the modification on the DOM document and
invokes Document.normalizeDocument() (and if the normalization fails, it
undoes the changes).

This design worked OK at the beginning of the project but now, as the
configuration document gets bigger, the revalidation is unacceptably
slow.
We were looking for a way to improve this and we considered the
following possibilities of normalizing "selectively":

- To extract "relevant parts" from the document copy into an empty
document (using Document.adoptNode()) and normalize it against a
"partial schema". This has the problem that you must parse the full
schema to create the partial one and that it's not easy to figure out
what the "relevant parts" are (especially in presence of identity
constraints).
- To normalize using a modification of
org.apache.xerces.dom.DOMNormalizer that would lead the schema validator
through "relevant branches" only (as suggested by Elena Litani in
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
ache.org&msgNo=3073). This has the disadvantage that we start to depend
on Xerces's internals and again, it's not easy to find the "relevant"
branches.

But maybe the best solution of the problem would be to use a completely
different design. There exists a DOM Level 3 Validation specification,
but I don't know if there is an implementation available today. I will
be grateful for your suggestions.

Regards,
Petr Lindovsky / CN Resources International, Prague, Czech Republic





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to