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 2001/02/26 23:08:58 UTC

[Bug 720] New - Schema constraint voilation not reported by the parser

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=720

*** shadow/720	Mon Feb 26 14:08:58 2001
--- shadow/720.tmp.20302	Mon Feb 26 14:08:58 2001
***************
*** 0 ****
--- 1,58 ----
+ +============================================================================+
+ | Schema constraint voilation not reported by the parser                     |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 720                         Product: Xerces-J                |
+ |       Status: NEW                         Version: 1.3.0                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version:                         |
+ |     Priority:                           Component: Schema-Structures       |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: nddelima@ca.ibm.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Overview:
+ An error is not reported by the parser for a schema that violates the schema 
+ constraint 5.13 (item 2) of the W3C schema specification document entitled
+ XML Schema Part 1: Structures
+ W3C Candidate Recommendation 24 October 2000
+ 
+ Schema Constraint:
+ "Each of the {type definitions}, {element declarations}, {attribute group 
+ definitions}, {model group definitions} and {notation declarations} must not 
+ contain two or more schema components with the same {name} and {target 
+ namespace}"
+ 
+ An example case that goes through the parser without an error:
+ <?xml version="1.0"?>
+ <schema xmlns="http://www.w3.org/2000/10/XMLSchema"
+         targetNamespace="http://www.schemaTest.org/D3_2_3si01"
+         xmlns:si01="http://www.schemaTest.org/D3_2_3si01">
+ 
+ <simpleType name="myFloat">
+ 	<restriction base="float">
+ 		<minInclusive value="2"/>
+ 	</restriction>
+ </simpleType>
+ 
+ <simpleType name="myFloat">
+ 	<restriction base="float">
+ 		<minInclusive value="3"/>
+ 	</restriction>
+ </simpleType>
+ 
+ <element name="root">
+ 	<complexType>
+ 		<sequence>
+ 			<element name="myFloat_1" type="si01:myFloat"/>
+ 			<element name="myFloat_2" type="si01:myFloat"/>
+ 		</sequence>
+ 	</complexType>
+ </element>
+    
+ </schema>
+ 
+ IBM Test Cases: ibmd3_2_1si01, ibmd3_2_3si01, ibmd3_2_4si01, ibmd3_2_5si01