W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

Import with same targetNamespace as importing schema

From: Roberto Galnares <galnares@us.ibm.com>
Date: Mon, 11 Dec 2000 18:03:36 -0500
To: www-xml-schema-comments@w3.org
Message-ID: <OF90FD434D.E2D5B627-ON852569B2.007E3A72@pok.ibm.com>
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

Example schema:

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

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

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


Imported schema (ImportSameTNS.xsd):

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

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



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

This archive was generated by hypermail 2.3.1 : Friday, 13 July 2018 09:02:52 UTC