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/01/09 01:39:59 UTC

DO NOT REPLY [Bug 5757] New: - Parser cannot handle circular inclusion of schemas

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=5757>.
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=5757

Parser cannot handle circular inclusion of schemas

           Summary: Parser cannot handle circular inclusion of schemas
           Product: Xerces2-J
           Version: 2.0.0 [beta 4]
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: Eric.J.Schwarzenbach.C88@alumni.upenn.edu


Parser cannot handle circular inclusion of schemas. Simple example:

circtest1.xsd defined as:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Eric J Schwarzenbach 
(Classwell Learning Group) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:include schemaLocation="http://localhost/test/circtest2.xsd" />
	<xs:element name="circtestA">
		<xs:annotation>
			<xs:documentation>Comment describing your root 
element</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>


circtest2.xsd defined as:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Eric J Schwarzenbach 
(Classwell Learning Group) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:include schemaLocation="http://localhost/test/circtest1.xsd" />
	<xs:element name="circtestB">
		<xs:annotation>
			<xs:documentation>Comment describing your root 
element</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>

Atempting to validate document 

<?xml version="1.0" encoding="UTF-8"?>
<circtestA 
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:noNamespaceSchemaLocation='circtest1.xsd' />

results in

[Error] C:\test\circ1.xml:4:53: sch-props-correct.2: a schema cannot contain 
two global components with the same name; this one contains two occurrences 
of ',circtestA'.

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