<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:mof="http://www.for.gov.bc.ca/schema/base" xmlns="http://www.for.gov.bc.ca/schema/iapp" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.for.gov.bc.ca/schema/iapp" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
    <xs:import namespace="http://www.for.gov.bc.ca/schema/base" schemaLocation="mof-simpleTypes.xsd"/>
    <xs:element name="IappSubmission" type="IappSubmissionType"/>
    <xs:complexType name="IappSubmissionType">
        <xs:sequence>
            <xs:element name="utmCoordinate" type="UtmCoordinate" minOccurs="1" maxOccurs="1"/>
            <xs:element name="genusCode" type="mof:AlphaNumeric4" minOccurs="1" maxOccurs="1"/>
            <xs:element name="speciesCode" type="mof:AlphaNumeric3" minOccurs="1" maxOccurs="1"/>
            <xs:element name="observationDate" type="xs:date" minOccurs="1" maxOccurs="1" >
              <xs:annotation>
                <xs:documentation>
                  yyyy-mm-dd format
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="estimatedArea" type="mof:Decimal11D4d" minOccurs="1" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  The area in hectares of the infestation. Note that this is a NUMBER(15,4) in the IAPP 
                  database but it is very unlikley that someone will report over one hectare of weed.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="siteLocationDetails" type="mof:AlphaNumeric2000" minOccurs="1" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  instructions on how to find the site
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="siteComments" type="mof:AlphaNumeric2000" minOccurs="0" maxOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  comments on the infestation at the site
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="submitterFirstName" type="mof:AlphaNumeric50" minOccurs="1" maxOccurs="1"/>
            <xs:element name="submitterLastName" type="mof:AlphaNumeric50" minOccurs="1" maxOccurs="1"/>
            <xs:element name="submitterTelephoneNumber" type="mof:TelephoneNumberType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="submitterEmailAddress" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
     <xs:complexType name="UtmCoordinate">
        <xs:sequence>
            <xs:element name="zone" type="mof:NonNegativeInteger2D">
                <xs:annotation>
                    <xs:documentation>The UTM zone of the location of the site.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="easting" type="mof:Integer6D">
                <xs:annotation>
                    <xs:documentation>The UTM easting of the locationof the site.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="northing" type="mof:Integer7D">
                <xs:annotation>
                    <xs:documentation>The UTM northing of the location of the site.</xs:documentation>
                </xs:annotation>
            </xs:element>          
        </xs:sequence>
    </xs:complexType>
</xs:schema>