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 bu...@apache.org on 2002/04/18 19:09:57 UTC
DO NOT REPLY [Bug 8267] New: -
parsers (sax or dom) fail to validate schema correctly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8267>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8267
parsers (sax or dom) fail to validate schema correctly
Summary: parsers (sax or dom) fail to validate schema correctly
Product: Xerces2-J
Version: 2.0.1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Critical
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: jcoughlin@veridicom.com
CC: jcoughlin@veridicom.com
XercesJ2 version 2.01
Attachment files:
abc.xsd.xml - schema file
_t1.xml - instance document; should fail validation
_t2.xml - instance document; should fail validation
_t3.xml - instance document; should pass validation
_t4.xml - instance document; should pass validation
zzValidate.bsh - bash script to invoke java sax.Writer
Steps to reproduce:
Using either the sax.Writer or dom.Writer examples with command line options:
-v -s -f
1. run zzValidate.bsh (we use Cygwin) with the appropiate CLASSPATH
with each of the instance documents supplied.
Why _t1.xml should fail validation.
The abc.xsd.xml schema file only has only two top level elements ABC and
ListOf.
element ABC is of type (complexType) ctypeABC, which has a choice of
minOccurs=1. Therefore _t1.xml with an empty <ABC /> element tag should fail
but does not.
Why _t2.xml should fail validation.
The abc.xsd.xml schema file only has only two top level elements ABC and
ListOf.
element SET is not an "exposed" element (only referred to in a model group).
SET is not a top level element like either ABC or ListOf.
According to the W3C schema, http://www.w3.org/TR/xmlschema-1/ ,
"XML Schema Part1: Structures", "3.7.1 The Model Group Definition Schema
Component", the following is qouted:
"Model group definitions per se do not participate in 'validation', bthe the
{term} of a particle may correspond in whole or in part to a model group from a
model group definition".
The operative phrase is "do not participate in validation".
I belive that the current schema implementation should not recognize anything
but elements exposed at the first level under <schema> for the target of
possible validation.
Files: _t3.xml and _t4.xml are examples of error free instance documents
currently pass validation are supplied as examples of such for your testing.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org