RE: when to validate XML while being created programmatically..

> Let's say, the W3C schema has key/keyref constraints.

When you validate incrementally, violations of key/keyref constraints will
typically be detected and reported when processing the endElement event of
the element that defines the key. You don't need to tell the validator when
this happens, it can tell. It is true, however, that if the error is that
the value in some keyref has been misspelled, then it might be reported some
time after the error actually occurred.

Michael Kay
http://www.saxonica.com/

Received on Friday, 21 December 2007 09:11:51 UTC