<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="icCardList">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element name="icCardEntry">
          <xs:complexType>
            <!-- The following sequence will have only 1 element -->
            <xs:sequence maxOccurs="1" minOccurs="1">
              <xs:element name="icCard">
                <xs:complexType>
                  <!-- The following sequence will have only 1 set of elements -->
                  <xs:sequence maxOccurs="1" minOccurs="1">
                    <xs:element name="icName">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icDescription">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icIntPattern">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icMyTask">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icTimeCriticalCondition">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icOtherName">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icOtherMessage">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icOtherTask">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:string" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <!-- If the IC card is not part of a group, the next two elements should be set to -1 -->
                    <xs:element name="icNumberCurrent">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:integer" use="required"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="icNumberTotal">
                      <xs:complexType>
                        <xs:attribute name="content" type="xs:integer" use="required"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <!-- The following attribute is used to keep track of the IC cards in the database -->
            <xs:attribute name="id" type="xs:positiveInteger" use="required"/>
            <!-- If the IC card is not part of a group, the following attribute should be set to -1 -->
            <xs:attribute name="groupId" type="xs:integer" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
