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 en...@suma.es on 2007/12/11 11:29:46 UTC

Problem with SAXParser and gyear validation

Hi.

We're using Xerce's SAXParser for validating XML documents and detect
possible errors in the documents.

One of the documents that we try to validate has an element that is
defined in the schema as "xsd:gYear". If we put a value with two digits
(for example "07") in this element we should get an validation error as
gYear requires a four digits year ("2007"), but the parse() method ends
without reporting any warning or error. If I validate the same document
with Altova XMLSpy I get the validation error. Is there any way to
detect this kind of errors in the SAXParser?

Thanks,

Enrique


Re: Problem with SAXParser and gyear validation

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Enrique,

Looks like you found a bug. The current code in SVN still has that
behaviour. Can you open a JIRA issue here:
https://issues.apache.org/jira/browse/XERCESJ?

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

<en...@suma.es> wrote on 12/11/2007 05:29:46 AM:

> Hi.
> We?re using Xerce?s SAXParser for validating XML documents and
> detect possible errors in the documents.
> One of the documents that we try to validate has an element that is
> defined in the schema as ?xsd:gYear?. If we put a value with two
> digits (for example ?07?) in this element we should get an
> validation error as gYear requires a four digits year (?2007?), but
> the parse() method ends without reporting any warning or error. If I
> validate the same document with Altova XMLSpy I get the validation
> error. Is there any way to detect this kind of errors in the SAXParser?
> Thanks,
> Enrique


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org