<schema
  xmlns='http://www.w3.org/2000/10/XMLSchema'
  targetNamespace='http://www.w3.org/namespace/'
  xmlns:t='http://www.w3.org/namespace/'>

 <element name='program'>
  <complexType>
   <sequence>
    <element ref='t:argument-model'/>
    <element ref='t:description-model'/>
    <element ref='t:return-model'/>
   </sequence>
  </complexType>
 </element>

 <element name='argument-model'>
  <complexType>
   <sequence>
    <element ref='t:arguments'/>
    <element ref='t:mappings'/>
   </sequence>
  </complexType>
 </element>

 <element name='arguments'>
  <complexType>
   <sequence>
    <element ref='t:argument' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='argument'>
  <complexType>
   <sequence>
    <element ref='t:name'/>
    <element ref='t:help'/>
    <element ref='t:is-compulsary' minOccurs='0' maxOccurs='1'/>
    <choice>
     <element ref='t:set-argument'/>
     <element ref='t:bool-argument'/>
     <element ref='t:singleline-argument'/>
     <element ref='t:multiline-argument'/>
    </choice>
   </sequence>
  </complexType>
 </element>

 <element name='name'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='help'>
  <complexType>
   <sequence>
    <element ref='t:overview'/>
    <element ref='t:validation-info' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='overview'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='validation-info'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='is-compulsary'>
  <complexType/>
 </element>

 <element name='set-argument'>
  <complexType>
   <choice>
    <element ref='t:initial'/>
    <element ref='t:set-values'/>
   </choice>
  </complexType>
 </element>

 <element name='initial'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='set-values'>
  <complexType>
   <sequence>
    <element ref='t:set-value'/>
    <element ref='t:set-value' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='set-value'>
  <complexType>
   <sequence>
    <element ref='t:name'/>
    <element ref='t:children' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='children'>
  <complexType>
   <sequence>
    <element ref='t:child' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='child'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='bool-argument'>
  <complexType>
   <sequence>
    <element ref='t:initially-on'/>
    <element ref='t:true-children' minOccurs='0' maxOccurs='1'/>
    <element ref='t:false-children' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='initially-on'>
  <complexType/>
 </element>

 <element name='true-children'>
  <complexType>
   <sequence>
    <element ref='t:child' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='false-children'>
  <complexType>
   <sequence>
    <element ref='t:child' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='singleline-argument'>
  <complexType>
   <sequence>
    <element ref='t:initial'/>
    <element ref='t:regex' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='regex'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='multiline-argument'>
  <complexType>
   <sequence>
    <element ref='t:initial'/>
    <element ref='t:regex' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='mappings'>
  <complexType>
   <sequence>
    <element ref='t:mapping' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='mapping'>
  <complexType>
   <sequence>
    <element ref='t:conditions'/>
    <element ref='t:input-pipes'/>
    <element ref='t:output-pipes'/>
   </sequence>
  </complexType>
 </element>

 <element name='conditions'>
  <complexType>
   <sequence>
    <element ref='t:condition' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='condition'>
  <complexType>
   <sequence>
    <element ref='t:target'/>
    <choice>
     <element ref='t:set-condition'/>
     <element ref='t:bool-true-condition'/>
     <element ref='t:bool-false-condition'/>
     <element ref='t:exists-condition'/>
     <element ref='t:not-exists-condition'/>
    </choice>
   </sequence>
  </complexType>
 </element>

 <element name='target'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='set-condition'>
  <complexType>
   <sequence>
    <element ref='t:allowed-values'/>
   </sequence>
  </complexType>
 </element>

 <element name='allowed-values'>
  <complexType>
   <sequence>
    <element ref='t:value'/>
   </sequence>
  </complexType>
 </element>

 <element name='value'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='bool-true-condition'>
  <complexType/>
 </element>

 <element name='bool-false-condition'>
  <complexType/>
 </element>

 <element name='exists-condition'>
  <complexType/>
 </element>

 <element name='not-exists-condition'>
  <complexType/>
 </element>

 <element name='input-pipes'>
  <complexType>
   <sequence>
    <element ref='t:pipe' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='pipe'>
  <complexType>
   <sequence>
    <element ref='t:name'/>
    <element ref='t:type'/>
    <element ref='t:param-name' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='type'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='param-name'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='output-pipes'>
  <complexType>
   <sequence>
    <element ref='t:pipe' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='description-model'>
  <complexType>
   <sequence>
    <element ref='t:name'/>
    <element ref='t:version'/>
    <element ref='t:description'/>
    <element ref='t:author' minOccurs='0' maxOccurs='1'/>
    <element ref='t:website' minOccurs='0' maxOccurs='1'/>
    <element ref='t:copyright' minOccurs='0' maxOccurs='1'/>
    <element ref='t:keywords' minOccurs='0' maxOccurs='1'/>
    <element ref='t:program-help' minOccurs='0' maxOccurs='1'/>
   </sequence>
  </complexType>
 </element>

 <element name='version'>
  <complexType>
   <sequence>
    <element ref='t:major'/>
    <element ref='t:minor'/>
   </sequence>
  </complexType>
 </element>

 <element name='major'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='minor'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='description'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='author'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='website'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='copyright'>
  <complexType>
   <sequence>
    <element ref='t:name'/>
    <element ref='t:year'/>
   </sequence>
  </complexType>
 </element>

 <element name='year'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='keywords'>
  <complexType>
   <sequence>
    <element ref='t:keyword' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='keyword'>
  <complexType mixed='true'>
  </complexType>
 </element>

 <element name='program-help'>
  <complexType>
   <sequence>
   <any namespace='http://www.w3.org/namespace/'/>
   </sequence>
  </complexType>
 </element>

 <element name='return-model'>
  <complexType>
   <sequence>
    <element ref='t:return-mappings'/>
   </sequence>
  </complexType>
 </element>

 <element name='return-mappings'>
  <complexType>
   <sequence>
    <element ref='t:return-mapping' minOccurs='0' maxOccurs='unbounded'/>
   </sequence>
  </complexType>
 </element>

 <element name='return-mapping'>
  <complexType>
   <sequence>
    <choice>
     <element ref='t:is-good'/>
     <element ref='t:is-bad'/>
    </choice>
    <element ref='t:message'/>
   </sequence>
  </complexType>
 </element>

 <element name='is-good'>
  <complexType/>
 </element>

 <element name='is-bad'>
  <complexType/>
 </element>

 <element name='message'>
  <complexType mixed='true'>
  </complexType>
 </element>
</schema>
