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

  <xs:element name="SchedulerList">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Profile" type="xs:string"/>
        <xs:element name="Job">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Name" type="xs:string"/>
              <xs:element name="Group" type="xs:string" minOccurs="0"/> <!-- minOccurs set to 0 as Group is empty -->
              <xs:element name="Coordinates" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="J2000RA" type="xs:decimal"/>
                    <xs:element name="J2000DE" type="xs:decimal"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="PositionAngle" type="xs:integer"/>
              <xs:element name="Sequence" type="xs:string"/>
              <xs:element name="StartupCondition">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Condition" type="xs:string"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Constraints">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Constraint" minOccurs="1" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute name="value" type="xs:decimal" use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="CompletionCondition">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Condition" type="xs:string"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Steps">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Step" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="SchedulerAlgorithm">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:integer">
                <xs:attribute name="value" type="xs:integer" use="required"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="ErrorHandlingStrategy">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="delay" type="xs:integer"/>
            </xs:sequence>
            <xs:attribute name="value" type="xs:integer" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="StartupProcedure" type="xs:string" minOccurs="0"/> <!-- minOccurs set to 0 as it is empty -->
        <xs:element name="ShutdownProcedure" type="xs:string" minOccurs="0"/> <!-- minOccurs set to 0 as it is empty -->
      </xs:sequence>
      <xs:attribute name="version" type="xs:decimal" use="required"/>
    </xs:complexType>
  </xs:element>

</xs:schema>