title: replacing xsd:choice in regularly updated XSD's
body: <p>Is there a simple (XSLT?), preferably automated, way to alter an xsd:choice construct in an XSD file to a definition without the choice construct. For example, I get an XSD that contains the following segment:</p>
  
  <pre><code>&lt;xsd:choice minOccurs="1" maxOccurs="1"&gt;
     &lt;xsd:element name="ExistingBuild" type="ExistingBuild" nillable="false"/&gt;
     &lt;xsd:element name="NewBuild" type="NewBuild" nillable="false"/&gt;
  &lt;/xsd:choice&gt;
  </code></pre>
  
  <p>This XSD needs to be imported in an application that doesn't support the choice construct. I have manually changed the XSD to have the segment defined as follows:</p>
  
  <pre><code>&lt;xsd:element name="ExistingBuild" type="ExistingBuild" nillable="false" minOccurs="0" maxOccurs="1"/&gt;
  &lt;xsd:element name="NewBuild" type="NewBuild" nillable="false" minOccurs="0" maxOccurs="1"/&gt;
  </code></pre>
  
  <p>The resulting XSD can be imported correctly and serves the purpose. So manually I can change this. </p>
  
  <p>However, this XSD will get updated regularly in the future and I would need to manually alter it every time a new version is delivered. To prevent manual errors I am looking to automate this conversion. Is XSLT a possible solution for this, and how would I define such an XSLT solution?</p>
  
  <p>Thanks in advance for any help in this.</p>