XMLSchema - Choice + Element with at least one element

I have an xml schema that allows the following:

    <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="A" />
        <xs:element ref="B" />
        <xs:element ref="C" />
    <xs:element ref="D" minOccurs="0" maxOccurs="1"/>


This means that I can create an element of 0 or more (A or B or C) and after that 0 or 1 (D). how









I want to add another constraint: there must be at least one (A or B or C or D).

Can this limit be expressed by xsd?


source to share

All Articles