You can achieve this by nesting choices and sequences. Optional contents ("neither" in your example) is done with minOccurs="0"
cardinality. Cardinality restrictions can be used on element declarations or sets like here on <xs:choice>
Sample type below.
<xs:complexType name="something">
<xs:choice minOccurs="0">
<xs:sequence>
<xs:element name="John" type="xs:string" />
<xs:element minOccurs="0" name="Anna" type="xs:string" />
</xs:sequence>
<xs:element name="Jack" type="xs:string" />
</xs:choice>
</xs:complexType>