M
Mario
Hi;
I try to limit the selection of elements to exactly one. I have to do
it by using elements, attributes are no alternativ.
If I use the configuration shown below, it is also possible to select
no element. If I set minOccurs to 1 at both elements, I have to select
both. How I can can define that just one and no more than one element
are allowed?
Thx for your help!
If I have the following xsd:
----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="test">
<xs:complexType>
<xs:choice>
<xs:element name="element1" minOccurs="0"/>
<xs:element name="element2" minOccurs="0"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
and the following xml should not be allowed:
I try to limit the selection of elements to exactly one. I have to do
it by using elements, attributes are no alternativ.
If I use the configuration shown below, it is also possible to select
no element. If I set minOccurs to 1 at both elements, I have to select
both. How I can can define that just one and no more than one element
are allowed?
Thx for your help!
If I have the following xsd:
----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="test">
<xs:complexType>
<xs:choice>
<xs:element name="element1" minOccurs="0"/>
<xs:element name="element2" minOccurs="0"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
and the following xml should not be allowed: