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:19:59 UTC

[jira] Updated: (XERCERJ-236) parser does not validate the XML Schema Schema correctly

The following issue has been updated:

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

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

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCERJ-236
    Summary: parser does not validate the XML Schema Schema correctly
       Type: Bug

     Status: Resolved
 Resolution: FIXED

    Project: Xerces2-J

   Assignee: Xerces-J Developers Mailing List
   Reporter: david stephenson

    Created: Fri, 15 Mar 2002 11:20 PM
    Updated: Mon, 12 Apr 2004 2:19 PM
Environment: Operating System: Other
Platform: PC

Description:
When validating the XML Schema for Schemas (or equivilent) the validation fails 
with error found:Unknown base type 'xs:anySimpleType' for a type 'string' on 
line: 64
As the Schema Schema is normative this must be a bug.
I see lots of other errors from this schema but they are probably fallout from 
not finding the base type for all of the built in types!

Steps to Reproduce: 
cut the two parts of the XML Schema Schema out of the 
http://www.w3.org/TR/xmlschema-1 and http://www.w3.org/TR/xmlschema-2.
saved in files normModXMLSchema.xsd and normModDataType.xsd

file changes:

1) removed doctype DTD stuff from top of files (yuk!)
2) changed import statements to use new datatype file name.
3) changed target name space to "http://www.w3.org/2001/XMLSchema/mod" in both 
files.
4) defined new name space xmlns:modxs="http://www.w3.org/2001/XMLSchema/mod" in 
both files.
5) did a replace on all instances of "xs: to "modxs:
6) changed all instances of "modxs:anySimpleType" to "xs:anySimpleType"
7) changed name="schema" to name="mySchema" (so that my tools stopped 
complaining about schema not being in the right namespace)
8) modified a schema I had previously created to use <mySchema> and set the 
schema location to normModXMLSchema.xsd.
9) validate the modified schema instance against the modified schema schema.

Actual Results:  

the first few lines of bug output are:
main (15:02:55): error found:Unknown base type 'xs:anySimpleType' for a 
type 'string' on line: 64
main (15:02:55): error found:cos-applicable-facets: Facet 'whiteSpace' is not 
allowed by this type. on line: 64
main (15:02:55): error found:cos-applicable-facets: Facet 'whiteSpace' is not 
allowed by this type. on line: 537
main (15:02:55): error found:cos-applicable-facets: Facet 'whiteSpace' is not 
allowed by this type. on line: 548
main (15:02:55): error found:cos-applicable-facets: Facet 'pattern' is not 
allowed by this type. on line: 670
main (15:02:55): error found:cos-applicable-facets: Facet 'pattern' is not 
allowed by this type. on line: 687
main (15:02:55): error found:cos-applicable-facets: Facet 'pattern' is not 
allowed by this type. on line: 628
main (15:02:55): error found:cos-applicable-facets: Facet 'enumeration' is not 
allowed by this type. on line: 85
main (15:02:55): error found:cos-applicable-facets: Facet 'enumeration' is not 
allowed by this type. on line: 873
main (15:02:55): error found:cos-applicable-facets: Facet 'enumeration' is not 
allowed by this type. on line: 95
main (15:02:55): error found:cos-applicable-facets: Facet 'enumeration' is not 
allowed by this type. on line: 113

The schema schema spec clearly states that anySimpleType exists:

4.1.6 Simple Type Definition for anySimpleType
There is a simple type definition nearly equivalent to the simple version of 
the ur-type definition present in every schema by definition. It has the 
following properties

Have also seen this bug with Xerces version 1.4.4 and 2.0.0

I can send you the test files if you want them.


---------------------------------------------------------------------
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