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 Ni...@sercel.fr on 2002/08/21 16:01:32 UTC
Réf. : RE: How to extract information fromvalidation error codes
Yes but what I need is to get precise information about the error such as the name of the violated constraint, its value, the name
of the tag/attribute which has incorrect value, ... without extracting them from the error message string (that's not very clean to
do that !).
"Tony Chen"
<Tony.Chen@LA Pour : "'xerces-j-user@xml.apache.org'" <xe...@xml.apache.org>, "'Gopal Sharma'"
BONE.com> <Go...@Sun.COM>
cc :
08/21/2002 Objet : RE: How to extract information from validation error codes
03:14 PM
Veuillez
répondre à
xerces-j-user
If you create an ErrorHandler as in one of the sample, you could use method
of SAXParseException. There are a few methods like getLineNumber,
getColumnNumber, getMessage. They are not that precise, but quite helpful.
-----Original Message-----
From: Gopal Sharma [mailto:Gopal.Sharma@Sun.COM]
Sent: Wednesday, August 21, 2002 7:26 AM
To: xerces-j-user@xml.apache.org
Subject: Re: How to extract information from validation error codes
Nicolas.GOLOUBENKO@sercel.fr wrote:-
|
| I use xerces DOM parser for validation against XML schema. The validation
works correctly but it is quite hard to get information
| about errors. Does anybody know if it is possible to use the error codes
to
extract infromation about the error without having to
| decode the message string (to get the type of schema constraint violated
for
example) ?
|
| Ex. : Validation error : '[error] :1:269: cvc-complex-type.2.2 ...'
| What does the '2.2' error code mean ??
|
Please visit http://www.w3.org/TR/xmlschema-1/#outcomes . XML Schema Spec
defines these unique names for all the constraints.
Thanks
- Gopal
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or
entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to
the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding,
printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately
notify LabOne at (800)388-4675.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Réf. : RE: How to extract information from validation error codes
Posted by Andy Clark <an...@apache.org>.
Nicolas.GOLOUBENKO@sercel.fr wrote:
> Yes but what I need is to get precise information about the error such as the name of the violated constraint, its value, the name
> of the tag/attribute which has incorrect value, ... without extracting them from the error message string (that's not very clean to
> do that !).
Please search the archive. I posted a rather lengthy
solution to this problem about a month ago.
--
Andy Clark * andyc@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
SAX event order: XML Schema errors
Posted by Jan Dvorak <ja...@mathan.cz>.
Hello all,
I'm experimenting with XML Schema validation and error reporting thru SAX.
I can see that some schema violations are reported before the startElement()
call for the element that caused them (typically errors in connection with
attributes), while some schema violations get reported after the endElement()
event (element model mismatch, typically). Some errors are reported pretty
much anywhere.
Is there a rule of thumb as to when I could expect which cvc-* message?
I'm building a custom DocumentBuilder that also records the errors that are
connected with a node.
Jan Dvorak
MathAn Praha
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org