This discussion is archived
2 Replies Latest reply: Feb 13, 2012 2:07 AM by 898304 RSS

Xml Validation & XQuery Update

898304 Newbie
Currently Being Moderated
Hello,
I have a question on xml validation in Berkeley DB XML (2.5.16).
I read in documentation that an xml can be validated against an xml DTD or Schema when is loaded into a container. However, when an XQuery Update is to be executed is there any configuration that allows checking if the XQuery Update leads to an xml that does not conform with the DTD/Schema? If so, how this case is managed? The XQuery is executed, or not? Is there any exception thrown?
I made a test over this: I wrote an xml (and a related DTD) where an element contains an id attribute and another element a referencing attribute to the aforementioned id. Then, an XQuery Update 'delete' expression deletes the element with the id attribute. The element is indeed deleted, the xml is left in an inconsistent state and I am allowed of making more update operations to this document...
I was wondering if there is any way of handling this case, except from being careful with what updates you choose, so that the xml is kept in a valid state. Is there something I am missing?

thank you in advance,
theo

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points