You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by ol...@invensys.com on 2002/11/12 07:37:38 UTC

Diagnostics for schema datatype errors

Hi folks,

apologies for spamming the list with userland questions...

I'm developing an editor for XML data, and I'd like to be able to present
the user with useful information about where errors occured, so they can go
back and change the data as appropriate.

The error messages received by the handler are pretty good, but I'd like to
know where in the document they occurred, at least the name of the element
containing the problematic data. What would be super sweet would be to get
the XPath of the element, but that might be asking a bit much.

Have any of you had experience with this sort of thing?

Do you have any code to share?

TIA,

Oli White


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


AW: Diagnostics for schema datatype errors

Posted by Ulrich Arnold <Ul...@t-online.de>.
Hi !

That is right, but keep in mind that the error-location is not always
what you might suspect. If you have  for example an element in your
instance, which is allowed, but not at this position, you will get the
end of next higher scope as error-location, not the position of the
offending element. I´ve filed a bug 6875 for version 1.7 in 2002-03-05,
but until now nothing has happend till version 2.1

Uli

-----Ursprüngliche Nachricht-----
Von: jh@web.de [mailto:jh@web.de] 
Gesendet: Dienstag, 12. November 2002 09:53
An: oliver.white@invensys.com; xerces-c-dev@xml.apache.org
Betreff: Re: Diagnostics for schema datatype errors


On Tue, 12 Nov 2002 17:37:38 +1100, oliver.white@invensys.com wrote:

>Have any of you had experience with this sort of thing?

(Parsing) exceptions carry a locator (line / column). Use that.


Ciao, Jürgen



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Diagnostics for schema datatype errors

Posted by Juergen Hermann <jh...@web.de>.
On Tue, 12 Nov 2002 17:37:38 +1100, oliver.white@invensys.com wrote:

>Have any of you had experience with this sort of thing?

(Parsing) exceptions carry a locator (line / column). Use that.


Ciao, Jürgen



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org