Thanks for the comments Murray!  I do have a question on your suggestion:

> In my application I simply keep an XML validator (set up for
> well-formedness checking) hanging around and reuse it as
> necessary.

I am confused as to what this means.  Does it mean:

a. Keep a mirror copy of the XML document local, do the insert into the mirror 
copy,
and then check validation.  If it's valid, only then update to the database.

      [What's the point in having a database if it's being stored locally?]

b. Code into the application the data's business rules (i.e., what constitutes 
valid
data) and thus it is able to check the data that is to be inserted.

     [What's the point in having a DTD/schema if all the business  rules have 
been
stored into
      the application?]

Could you elaborate upon what you mean when you say that the application checks 
the
data?  Thanks!

Isn't  integrity checking a built in feature of all modern day (relational)
databases?  /Roger


Murray Altheim wrote:

> Roger L. Costello wrote:
>
> > 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
>
> Why would you want a database to do XML validation when it's
> simple enough to pre-validate content before putting it in?
> Constraint checking to that extent really isn't the province
> of a database, IMO, it's the kind of thing done at the application
> level.
>
> In my application I simply keep an XML validator (set up for
> well-formedness checking) hanging around and reuse it as
> necessary.
>
> Murray
>
> ......................................................................
> Murray Altheim                  <http://kmi.open.ac.uk/people/murray/>
> Knowledge Media Institute
> The Open University, Milton Keynes, Bucks, MK7 6AA, UK
>
>             If you're the first person in a new territory,
>             you're likely to get shot at.
>                                                      -- ma


Reply via email to