You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Tizard, James (IEPO)" <ti...@saugov.sa.gov.au> on 2000/08/01 09:42:53 UTC

Xerces validation error reporting bug?

I am running Xerces 1.1.3 w/ JDK 1.3 - but I'm running one of the sample
apps (dom.DOMCount) - not compiling at this stage - just learning about XML
Schema. I've found what appears to be a anomaly in the way the parser
handles schema validation errors.  I've read the FAQ, and this list seems to
be the right place to report bugs. 

Please let me know if I'm wrong, and apologies.

I've attached below a schema 'docschema.dtd' and a sample doc 'ds_test.xml'.

ds_test.xml has an error on line 4 - an extra '>' enclosing the 2nd-last
attribute. However, when I run dom.DOMCount against this file, it gives the
following error:

[Error] ds_test.xml:25:14: The content of element type "docschema" must
match "(document,content+)".

This is quite misleading, as (a) this isn't the problem, and (b) the real
error is at ds_test.xml:4:46.  Took me *ages* to spot the real error in my
document.

The error is easily repeatable, and neither the schema or the doc are very
big, so it should be fairly simple to track down if you know where to look,
which I don't. 

James Tizard
Adelaide, South Australia

 <<docschema.xsd>>  <<ds_test.xml>>