W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2013

Re: Can root name in DOCTYPE be a XSD-validity thing?

From: Noah Mendelsohn <nrm@arcanedomain.com>
Date: Sun, 17 Feb 2013 23:13:24 -0500
Message-ID: <5121AA64.1010202@arcanedomain.com>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
CC: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xmlschema-dev@w3.org


On 2/17/2013 10:59 PM, Leif Halvard Silli wrote:
> Right. And as such, it is a very flexible system since it allows any
> element to serve as root. What about XSD in this regard? Perhaps XSD
> ”hard codes” which elements can serve as root element?

Nope. Actually, XSD doesn't provide a mechanism to identify a root at all. 
You declare elements in the schema. Schema validators can either accept 
whatever element happens to be in the document as the root, or can through 
other means (e.g. command line arg or api) specify a desired root name.

These design choice was somewhat controversial, but that's how it works.

Noah
Received on Monday, 18 February 2013 04:13:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 18 February 2013 04:13:49 GMT