<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tns=      "http://www.w3.org/XML/2008/xsdl-exx/ns1"
  targetNamespace="http://www.w3.org/XML/2008/xsdl-exx/ns1"
  > 
  <xs:element name="test" type="tns:tests"/>
  
  <xs:complexType name="tests">
    <xs:sequence maxOccurs="unbounded">
      <xs:choice>
        <xs:element ref="tns:test"/>
        <xs:element ref="tns:s"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="s" type="xs:string"/>
  
  <!--* We define two simple types with different but equivalent
      * patterns.  These should accept the same string values
      * (and reject the same string values).
      *-->
  <xs:simpleType name="optional-a">
    <xs:restriction base="xs:string">
      <xs:pattern value="a?"/>
    </xs:restriction> 
  </xs:simpleType>
  <xs:simpleType name="a-or-nothing">
    <xs:restriction base="xs:string">
      <xs:pattern value="(a|)"/>
    </xs:restriction> 
  </xs:simpleType>
  <xs:simpleType name="nothing-or-a">
    <xs:restriction base="xs:string">
      <xs:pattern value="(|a)"/>
    </xs:restriction> 
  </xs:simpleType>
  <xs:simpleType name="empty-string">
    <xs:restriction base="xs:string">
      <xs:pattern value=""/>
    </xs:restriction> 
  </xs:simpleType>
  <xs:simpleType name="empty-or-nothing">
    <xs:restriction base="xs:string">
      <xs:pattern value="|"/>
    </xs:restriction> 
  </xs:simpleType>
  <xs:simpleType name="empty-or-nothing-2">
    <xs:restriction base="xs:string">
      <xs:pattern value="(|)"/>
    </xs:restriction> 
  </xs:simpleType>
</xs:schema>

