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

Mandatory attributes on root element

From: Torbjørn Pehrsen <torbjorn.pehrsen@europay.no>
Date: Mon, 21 Jan 2002 06:11:50 -0500 (EST)
Message-ID: <c=NO%a=_%p=Europay_Norge%l=S1-020121110825Z-1373@s1.europay.no>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

I have the following xml file:

<exf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

This is my schema:

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

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

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC