This is a good idea only if the validation is controllable by the user.
You could use XUpdate to change from
<a><b/></a>
to <a><c><d/></c></a>
where both were valid in the content model specified by the doctype. If you
did this with 3 XUpdates (delete b, add c to a, add d to c) the document
would only be valid at the beginning and end, not at the intermedidate
states. It would also be possible to change the root element and validate
against a different content model.
J
----- Original Message -----
From: "Roger L. Costello" <[EMAIL PROTECTED]>
To: <[email protected]>
Cc: "Costello,Roger L." <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 5:21 AM
Subject: XUpdate insert: any integrity checking?
> Hi Folks,
>
> I have noticed that, using XUpdate, I can insert bad data into a
collection XML
> document. That is, before the data is inserted the document is valid;
after the
> data is inserted the document is invalid . The document has a DOCTYPE
> declaration so it seems reasonable to expect that the database would flag
the
> bad data as an error. Is there some way to get the database to check the
data
> prior to inserting it into the document, and to report an error if it
would make
> the document invalid? /Roger
>
>
>