how to specify in xml schema that either one of two fields must be present?
- by matti
i want to specify that either fieldname or freetext is always present in xml files that apply to xsd. is there a way to define it?
<xs:complexType name="tSome">
<xs:sequence>
<!-- either of 2 below have 2 be present. -->
<xs:element name="fieldname" type="xs:string" minOccurs="0" />
<xs:element name="freetext" type="xs:string" minOccurs="0" />
<xs:element name="dbtablename" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
thanks & best regards: Matti