W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2011

Re: True or False: A schema with no targetNamespace can never be imported

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Sat, 24 Sep 2011 18:57:38 +0530
Message-ID: <CABuuzNOUaQa_qF8NcU5emZqaKbSf7KfPNByn1hgMF-zvLCNnOg@mail.gmail.com>
To: "Costello, Roger L." <costello@mitre.org>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
seems to be "false".

The following pair of schema documents are valid.

b.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://try#1">

      <xs:import schemaLocation="a.xsd"/>
	
      <xs:element name="Z">
	    <xs:complexType>
		 <xs:sequence>
		      <xs:element ref="X"/>
	         </xs:sequence>
	    </xs:complexType>
      </xs:element>
	
</xs:schema>

a.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

     <xs:element name="X"/>
	
</xs:schema>


On Sat, Sep 24, 2011 at 5:39 PM, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
>
> An XML Schema file that has no targetNamespace can never be imported by an XML Schema file.
>
> (1) True
> (2) False
>
> /Roger





-- 
Regards,
Mukul Gandhi
Received on Saturday, 24 September 2011 13:28:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 24 September 2011 13:28:26 GMT