I'm looking to do something like this:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Systems Management (Caleb Technologies Corp) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Config" type="Config"/>
<xs:simpleType name="FeatureNames">
<xs:restriction base="xs:string">
<xs:enumeration value="Feature1"/>
<xs:enumeration value="Feature2"/>
<xs:enumeration value="Feature3"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="UIConfigOptions">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="**FeatureNames**" type="xs:boolean"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Config">
<xs:all minOccurs="0">
<xs:element name="UIConfigOptions" type="UIConfigOptions"/>
</xs:all>
</xs:complexType>
</xs:schema>
Where the **FeatureNames**
element contained in UIConfigOptions
is replaced by some dynamic mapping which automatically expands the elements of the choice container to the whatever the contents of the FeatureNames enumeration is.