<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="PDAScoresheet" targetNamespace="http://www.mdesystems.co.uk/xml/schema/PDAScoresheet.xsd" elementFormDefault="qualified" xmlns="http://www.mdesystems.co.uk/xml/schema/PDAScoresheet.xsd" xmlns:mstns="http://www.mdesystems.co.uk/xml/schema/PDAScoresheet.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="ScoreSheets">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Scoresheet" type="scoresheetType" maxOccurs="unbounded" minOccurs="1">
          <xsd:annotation>
            <xsd:documentation>An individual scoresheet from a round shot.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:complexType name="scoresheetType">
    <xsd:sequence>
      <xsd:element name="Archers_Longbow_ID" type="xsd:int" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            This is optional but if it is included, the records will be matched on this ID rather than
            the archers name thus removing the requirement for the xml to be validated manually.
            The ID should be provided by the archer themselves.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ArchersTitle" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>This is the archers title as in Mr, Mrs etc.</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ArchersForename" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>The Archers Forename</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ArchersSurname" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>The Archers Surname</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="Longbow_Round_ID" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The Round ID Value, please refer to the following document http://www.mdesystems.co.uk/xml/data/rounds.xml</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="Bowstyle" type="enmBowstyleType">
        <xsd:annotation>
          <xsd:documentation>The Bowstyle used to shoot the round</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="Venue" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>The Venue of the shoot</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="IsRecordStatusShoot" type="xsd:boolean">
        <xsd:annotation>
          <xsd:documentation>A flag to indicate whether the shoot was a record status shoot or not</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="DateShot" type="xsd:date">
        <xsd:annotation>
          <xsd:documentation>The date the round was shot.  The date should be specified in the following format "YYYY-MM-DD" for it to be valid for this datatype.</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScoreForFirstDistance" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The score for the first distance</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScoreForSecondDistance" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The score for the second distance</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScoreForThirdDistance" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The score for the third distance</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="ScoreForForthDistance" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The score for the forth distance</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TotalScore" type="xsd:int">
        <xsd:annotation>
          <xsd:documentation>The total score for the round</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TotalHits" type="xsd:int" >
        <xsd:annotation>
          <xsd:documentation>The total hits for the round</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TotalGolds" type="xsd:int" >
        <xsd:annotation>
          <xsd:documentation>The total golds for the round</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="TotalXs" type="xsd:int" >
        <xsd:annotation>
          <xsd:documentation>The total Xs for the round</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="HandicapShot" type="xsd:int" minOccurs="0" >
        <xsd:annotation>
          <xsd:documentation>The Handicap Shot</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:simpleType name="enmBowstyleType">
    <xsd:restriction base="xsd:int">
      <xsd:enumeration id="Recurve_Freestyle" value="1">
        <xsd:annotation>
          <xsd:documentation>Recurve Freestyle</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Recurve_Barebow" value="2">
        <xsd:annotation>
          <xsd:documentation>Recurve Barebow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Recurve_Traditional" value="3">
        <xsd:annotation>
          <xsd:documentation>Recurve Traditional</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Longbow" value="4">
        <xsd:annotation>
          <xsd:documentation>Longbow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound_Unlimited" value="5">
        <xsd:annotation>
          <xsd:documentation>Compound Unlimited</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound_Limited" value="6">
        <xsd:annotation>
          <xsd:documentation>Compound Limited</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound_Barebow" value="7">
        <xsd:annotation>
          <xsd:documentation>Compound Barebow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound_Flight_Bow" value="8">
        <xsd:annotation>
          <xsd:documentation>Compound Flight Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="FITA_Standard_Bow" value="9">
        <xsd:annotation>
          <xsd:documentation>FITA Standard Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Crossbow" value="10">
        <xsd:annotation>
          <xsd:documentation>Crossbow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Conventional_Flight_Bow" value="11">
        <xsd:annotation>
          <xsd:documentation>Conventional Flight Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="American_Flatbow" value="12">
        <xsd:annotation>
          <xsd:documentation>American Flatbow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Hunting_Tackle" value="13">
        <xsd:annotation>
          <xsd:documentation>Hunting Tackle</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Bowhunter" value="14">
        <xsd:annotation>
          <xsd:documentation>Bowhunter</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="BareBow" value="15">
        <xsd:annotation>
          <xsd:documentation>BareBow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Freestyle" value="16">
        <xsd:annotation>
          <xsd:documentation>Freestyle</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound" value="17">
        <xsd:annotation>
          <xsd:documentation>Compound</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Recurve" value="18">
        <xsd:annotation>
          <xsd:documentation>Recurve</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="American_Longbow" value="19">
        <xsd:annotation>
          <xsd:documentation>American Longbow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="English_Longbow" value="20">
        <xsd:annotation>
          <xsd:documentation>English Longbow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Recurve_Target_Bow" value="21">
        <xsd:annotation>
          <xsd:documentation>Recurve Target Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Compound_Target_Bow" value="22">
        <xsd:annotation>
          <xsd:documentation>Compound Target Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration id="Foot_Bow" value="23">
        <xsd:annotation>
          <xsd:documentation>Foot Bow</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>
