You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mark Brucks <br...@j3s.us> on 2004/02/04 23:36:47 UTC
key/keyref and error reporting
We are using the key/keyref mechanism, but are experiencing some
difficulties dealing with validation errors. We are using the method
CoreDocumentImpl.normalizeDocument() to validate the document, and are
collecting the org.w3c.dom.DOMError instances that are passed to our
handleError() method (implementation of the org.w3c.dom.DOMErrorHandler
interface).
Our problem is that the DOMError instances seem to associate the error
with the element in the document containing the key/keyref constraint
and not the element that contains the illegal value. We are using
error.getLocation().getRelatedNode() to get the invalid node for the
error. The returned node is always the node containing the key/keyref
constraint (which in our case happens to be the root node). Is this the
expected association for this type of validation error? If so, then how
do we determine which element contains the invalid reference?
thanks - Mark Brucks
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org