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

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 UTC