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 ji...@apache.org on 2004/04/12 23:21:55 UTC

[jira] Updated: (XERCERJ-281) parsers (sax or dom) fail to validate schema correctly

The following issue has been updated:

    Updater: Serge Knystautas (mailto:sergek@lokitech.com)
       Date: Mon, 12 Apr 2004 2:20 PM
    Changes:
             Attachment changed from abc.xsd.xml
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XERCERJ-281?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCERJ-281

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCERJ-281
    Summary: parsers (sax or dom) fail to validate schema correctly
       Type: Bug

     Status: Resolved
 Resolution: INCOMPLETE

    Project: Xerces2-J

   Assignee: Xerces-J Developers Mailing List
   Reporter: James Coughlin

    Created: Thu, 18 Apr 2002 5:09 PM
    Updated: Mon, 12 Apr 2004 2:20 PM
Environment: Operating System: Windows NT/2K
Platform: PC

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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