Re: Can root name in DOCTYPE be a XSD-validity thing?
Noah Mendelsohn <[email protected]> Sun, 17 Feb 2013 23:13:24 -0500
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
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 > =E2=80=9Dhard codes=E2=80=9D which elements can serve as root element? Nope. Actually, XSD doesn't provide a mechanism to identify a root at all= .=20 You declare elements in the schema. Schema validators can either accept=20 whatever element happens to be in the document as the root, or can throug= h=20 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