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

Re: XSD validation, ambiguous root XML instance element

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Sat, 31 Oct 2020 18:37:25 +0530
Message-ID: <CABuuzNOTfWgTr7t3F65+VmZMhkJcfoUHHccgRdKFnpZiLrSZpg@mail.gmail.com>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Hi all,
    I think that, instead of having an element like xs:root (that could
wrap xs:assert elements) as child of xs:schema, the following could work as

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

     <xs:include schemaLocation="x1.xsd"/>

     <xs:assert test="not(self::p | self::q)"/>



i.e, optionally, one or more contiguous xs:assert elements could be allowed
as children of xs:schema element, that can enforce constraints on the XML
instance root element that is validated by an XML schema.

Mukul Gandhi
Received on Saturday, 31 October 2020 13:07:40 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 31 October 2020 13:07:41 UTC