Folks, Validation appears to happen once the element closing tag has been recognized. However, some constraints (i.e. those applied to attributes) can be checked at the start of the element. When using SAX, you will process parts of the element before validation occurs, possibly processing an element which will fail validation.
For example, I have an attribute with a keyref constraint. If the constraint is met, then the attribute indeed refers to another element in the document. Otherwise, the attribute refers to nothing (an error). In this particular case, processing for this attribute causes a table lookup on the value. If the constraint isn't met I will get nothing back from the table. It's simple enough to check this in my code, of course. I would rather know before I begin processing, however, that this element will fail validation and should therefore be skipped. Of course, constraints on content (as opposed to attributes) can only be validated once the end tag has been recognized. Does it make sense to try to validate attribute constraints as soon as the start tag has been fully parsed, before control is handed to the application callback? Thanks! Brian Atkins -- Brian Atkins [EMAIL PROTECTED] (970) 288-2114 Agilent Technologies 4800 Wheaton Drive Ft. Collins, CO 80525 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
