incorrect "type not found" error when importing a schema
---------------------------------------------------------
Key: XERCESC-1631
URL: http://issues.apache.org/jira/browse/XERCESC-1631
Project: Xerces-C++
Issue Type: Bug
Affects Versions: 2.7.0
Environment: Windows
Reporter: Frank Zhou
Her eis three schemas a, b and c, in which a import b, and b import c. a and c
have the same target namespace. When I try to use loadGrammar for schema a, I
got type not found error, but the type is defined in c.
a.xsd
=====
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.xyz.org/XYZ"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ABC="http://www.xyz.org/ABC"
targetNamespace="http://www.xyz.org/XYZ" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import namespace="http://www.xyz.org/ABC" schemaLocation="b.xsd"/>
<xs:element name="E1">
<xs:complexType>
<xs:sequence>
<xs:element name="E3" type="e3Type"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
======
b.xsd
======
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ABC="http://www.xyz.org/ABC" xmlns:XYZ="http://www.xyz.org/XYZ"
xmlns="http://www.xyz.org/ABC" targetNamespace="http://www.xyz.org/ABC"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.xyz.org/XYZ" schemaLocation="c.xsd"/>
<xs:element name="E2" type="XYZ:e2Type">
</xs:element>
</xs:schema>
======
c.xsd
=====
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://www.xyz.org/XYZ"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ABC="http://www.xyz.org/ABC"
targetNamespace="http://www.xyz.org/XYZ" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:simpleType name="e2Type">
<xs:restriction base="xs:int"/>
</xs:simpleType>
<xs:simpleType name="e3Type">
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:schema>
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]