Import with same targetNamespace as importing schema

We would like to know if it is allowed to use the same targetNamespace in
an imported schema as the one declared in the importing schema. We know we
can use 'include' to handle those cases, but we want to know if doing it
with 'import' should produce an error or not.

We could not find something definitive in the 'Import Constraints and
Semantics' forbidding the use of the same targetNamespace. If the
constraint exists  somewhere else in the specifications please let us know
where.


Example schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" targetNamespace
="http://www.abc.com/Import1">

  <xsd:import namespace="http://www.abc.com/Import1" schemaLocation="
ImportSameTNS.xsd"/>

  <xsd:complexType name="ComplexType01">
    <xsd:simpleContent>
      <xsd:extension base="SimpleType01"/>
    </xsd:simpleContent>
  </xsd:complexType>

</xsd:schema>

Imported schema (ImportSameTNS.xsd):

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" targetNamespace
="http://www.abc.com/Import1">

  <xsd:simpleType name="SimpleType01">
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>

</xsd:schema>


Thanks,


Roberto Galnares

Received on Monday, 11 December 2000 18:03:46 UTC