Mandatory attributes on root element

Hi

I have the following xml file:

<exf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="M0101.xsd">
	<file>
		<delivering_data_center>700</delivering_data_center>
		<receiving_data_center>1</receiving_data_center>
		<production_date>2001-12-31</production_date>
.
.
</exf>

This is my schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
	<xsd:element name="exf">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="file" maxOccurs="unbounded"></xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
.
.
</xsd:schema>

I want "xmlns:xsi" and "xsi:noNamespaceSchemaLocation" to be required
abbributes. 

I have tried to put in the following lines:

<xsd:attribute name="xmlns:xsi"  use="required"/>
<xsd:attribute name="xsi:noNamespaceSchemaLocation"  use="required"/>

In most cases I get an invalid schema. If I put them before
</xsd:complexType> I get av valid schema, but my file is no longer valid
with the schema. Anyone?

Received on Monday, 21 January 2002 20:59:18 UTC