Using choicethere is a complicated way to create a choice where only valid combinations are allowed ...
In your example, this should have the desired result:
<xs:complexType name="Address">
<xs:choice>
<xs:sequence>
<xs:element name="city"/>
<xs:element name="street"/>
<xs:element name="state"/>
</xs:sequence>
<xs:sequence>
<xs:element name="street"/>
<xs:element name="postcode"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
Another simple example if you want to resolve any two of three. You could do this, say you have ABC elements, and you want to allow any two of the three, you can use the following xsd:
<xs:complexType name="anyTwo">
<xs:choice>
<xs:sequence>
<xs:element name="A"/>
<xs:element name="B"/>
</xs:sequence>
<xs:sequence>
<xs:element name="A"/>
<xs:element name="C"/>
</xs:sequence>
<xs:sequence>
<xs:element name="B"/>
<xs:element name="C"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
, , !
: .