W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

SchemaLocation Question

From: Arigapudi, Shyam <Shyam.Arigapudi@ugs.com>
Date: Tue, 22 Jan 2002 18:09:01 -0500 (EST)
Message-ID: <07E98776DFF1BE448D9C9BA60A79ADA4017202C6@amwntx1.ugsolutions.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

Hi,

I have 2 schema files, both using the same namespace.
Let's say box.xsd,pallet.xsd. Both of them derive from common.xsd.


Common.xsd has an abstract type, which is overridden in each of the other
xsd's (box - boxType, pallet - palletType).

If I have 
<?xml version="1.0" encoding="UTF-8"?>
<x:CimfObjects xmlns:x="urn:www.eai.com:CIMF"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:www.eai.com:CIMF box.xsd">

<x:Object xsi:type="x:BoxType>
	...
</x:Object>
</x:CimfObjects>

It all works fine. (Replace box with pallet and that works fine).


Now,  I want to have both the types to be in one xml file. Is this possible?

<?xml version="1.0" encoding="UTF-8"?>
<x:CimfObjects xmlns:x="urn:www.eai.com:CIMF"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:www.eai.com:CIMF box.xsd 
				urn:www.eai.com:CIMF pallet.xsd">

<x:Object xsi:type="x:BoxType>
	...
</x:Object>
<x:Object xsi:type="x:PalletType>
	...
</x:Object>
</x:CimfObjects>


Not sure about the syntax for schemaLocation (since both xsd files use the
same 
 urn). Is the solution to change these name spaces or is there a better way?
 

Regards,
Shyam Arigapudi
www.eds.com
shyam@ugs.com
Received on Wednesday, 23 January 2002 13:41:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT