<[EMAIL PROTECTED]> wrote on 10/28/2005 08:35:19 AM:

> Michael,
> 
> I alreay had planned to use the JAXP interface, so I changed my code and
> used the validator as you suggested.
> Indeed this solved both problems: 
> 1. I do get the MutationEvents
> 2. The attributes now have their OwnerElement set.
> 
> But I run into another problem. Using the old interface I retrieved the
> DOMConfiguration from the Document and registeresd a DOMErrorHandler. In
> this handler I got a DOMError which implemented the DOMLocator which
> made it possible to get the related Node. 
> In the jaxp interface I have a standard ErrorHandler which retrieves  a
> SAXParseException. It gives me only columnnumbers or linenumbers. But I
> can not get a DOMLocator from it to find the related Node.
> Am I missing something ?

You're right, there's currently no way to get this node. The validator 
keeps track of its position in the DOM so the information is already 
there. It just needs to be exposed with a property [1] which you can query 
from the validator when an error is reported. Sounds like a good candidate 
for the next release.

Thanks.

> Dick Deneer

[1] http://xml.apache.org/xerces2-j/properties.html#dom-node

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to