Re: XSD validation, ambiguous root XML instance element

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
well,

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

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

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

     ............

.</xs:schema>

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.



-- 
Regards,
Mukul Gandhi

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