W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

complexType names

From: Daniel Acton <dacton@itouch.co.za>
Date: Fri, 1 Dec 2000 12:13:19 +0200 (SAST)
To: xmlschema-dev@w3.org
Message-ID: <Pine.BSF.4.21.0012011200320.49065-100000@alcapone.intouch.co.za>


I am trying to define a schema for an xml document that may start with a
different root element in different instances of the xml document.

-- Instance 1, in a file called cat.xml --


-- End of Instance 1 --

-- Instance 2, in a file called dog.xml --


-- End of Instance 2 --

The two instances will have the same elements, but with a different root
element. Do I have to write two seperate schemas for this? The examples
I've been looking at have this kind of definition of the root element:

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <xsd:element type="someComplexType" name="xmlRootElement"/>
  <xsd:complexType name="someComplexType">
    <!-- complexType definition here -->
  <!-- Rest of schema definition here -->

Thanks in advance
Received on Friday, 1 December 2000 05:17:02 UTC

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