W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2012

Re: Here's how to empower instance document authors to create their own root element

From: Noah Mendelsohn <nrm@arcanedomain.com>
Date: Sun, 14 Oct 2012 12:35:19 -0400
Message-ID: <507AE9C7.3090500@arcanedomain.com>
To: "Costello, Roger L." <costello@mitre.org>
CC: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>

On 10/14/2012 8:59 AM, Costello, Roger L. wrote:
> It is not necessary to declare a root element in your XML Schema. You can empower instance document authors to create their own root element.

Right, or you can explicitly declare several root elements, and let your 
users use any one as a root. If you have:

<xs:element name="a">...</xs:element>
<xs:element name="b">...</xs:element>
<xs:element name="c">...</xs:element>

Then in principle <a>, <b>, or <c> can be a root element, and most likely 
without the need for xsi:type in the instance.

Noah
Received on Sunday, 14 October 2012 16:35:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:02 UTC