in answer to the 2nd part of your question. You can use xsd:choice
:
element that appear there can be either location or ui-location
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="location" type="xsd:string"/>
<xsd:element name="ui-location" type="xsd:string"/>
</xsd:choice>
</xsd:sequence>