<?xml version="1.0" encoding="utf-8"?>
<!--  NOTE
System: DFO-ELOG

Form:       43788	ELOG - Logbook - Groundfish
Formulaire: 43788	JBE  - Journal de bord - Poisson de fond
        
Form_ver_id: 232

Goal: Validation of XML datafiles destinated to the Electronic logbooks system of DFO (ELOG)
But:  Validation des fichiers XML destines au systeme des journaux de bord electroniques du MPO (JBE)


xsd_start_date: 2022-10-05

Modifications: Must have at least one occurence of node TGT_SPECIES
               Doit avoir au moins une occurrence du noeud TGT_SPECIES
      
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:simpleType name="integer">
        <xs:restriction base="xs:integer" >
            <xs:whiteSpace value="collapse"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="decimal">
        <xs:restriction base="xs:decimal">
            <xs:whiteSpace value="collapse"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string">
        <xs:restriction base="xs:string">
            <xs:whiteSpace value="collapse"/>
            <xs:minLength value="1"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_6">
        <xs:restriction base="string">
            <xs:maxLength value="6"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_10">
        <xs:restriction base="string">
            <xs:maxLength value="10"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="string_12">
        <xs:restriction base="string">
            <xs:maxLength value="12"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_18">
        <xs:restriction base="string">
            <xs:maxLength value="18"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_20">
        <xs:restriction base="string">
            <xs:maxLength value="20"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="string_30">
        <xs:restriction base="string">
            <xs:maxLength value="30"/>
        </xs:restriction>
    </xs:simpleType>   
    
    <xs:simpleType name="string_40">
        <xs:restriction base="string">
            <xs:maxLength value="40"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="string_50">
        <xs:restriction base="string">
            <xs:maxLength value="50"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_80">
        <xs:restriction base="string">
            <xs:maxLength value="80"/>
        </xs:restriction>
    </xs:simpleType>
 
    <xs:simpleType name="string_100">
        <xs:restriction base="string">
            <xs:maxLength value="100"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="string_150">
        <xs:restriction base="string">
            <xs:maxLength value="150"/>
        </xs:restriction>
    </xs:simpleType>
        
    <xs:simpleType name="string_200">
        <xs:restriction base="string">
            <xs:maxLength value="200"/>
        </xs:restriction>
    </xs:simpleType>      

    <xs:simpleType name="string_2000">
        <xs:restriction base="string">
            <xs:maxLength value="2000"/>
        </xs:restriction>
    </xs:simpleType>    
    
    <xs:simpleType name="ind_yn">
        <xs:restriction base="string">
            <xs:maxLength value="1"/>
            <xs:pattern value="[Y|N]"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="date_12">
        <xs:restriction base="integer">
            <xs:pattern value="[0-9]{4}(((0[13578]|(10|12))(0[1-9]|[1-2][0-9]|3[0-1]))|(02(0[1-9]|[1-2][0-9]))|((0[469]|11)(0[1-9]|[1-2][0-9]|30)))([0-1][0-9]|[2][0-3])([0-5][0-9])"/>
            <xs:minInclusive value="202101010000"/>  
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="date_14">
        <xs:restriction base="integer">
       <xs:pattern value="[0-9]{4}(((0[13578]|(10|12))(0[1-9]|[1-2][0-9]|3[0-1]))|(02(0[1-9]|[1-2][0-9]))|((0[469]|11)(0[1-9]|[1-2][0-9]|30)))([0-1][0-9]|[2][0-3])([0-5][0-9])([0-5][0-9])"/>
            <xs:minInclusive value="20210101000000"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="integer_1">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="9"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="integer_2">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="99"/>
        </xs:restriction>
    </xs:simpleType>    

    <xs:simpleType name="integer_02">
        <xs:restriction base="integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="99"/>
        </xs:restriction>
    </xs:simpleType>   
    
    <xs:simpleType name="integer_3">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="999"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="integer_03">
        <xs:restriction base="integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="999"/>
        </xs:restriction>
    </xs:simpleType>
   
    <xs:simpleType name="integer_4">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="9999"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="integer_04">
        <xs:restriction base="integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="9999"/>
        </xs:restriction>
    </xs:simpleType>    

    <xs:simpleType name="integer_5">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="99999"/>
        </xs:restriction>
    </xs:simpleType>
        
    <xs:simpleType name="integer_6">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="999999"/>
        </xs:restriction>
    </xs:simpleType>
	
	<xs:simpleType name="integer_06">
        <xs:restriction base="integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="999999"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="integer_10">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="9999999999"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="number_03_2">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,3}|[0-9]{1,3}\.[0-9]{1,2})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="999.99"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="number_1_1">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]|[0-9]\.[0-9]{1})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="9.9"/>
        </xs:restriction>
    </xs:simpleType>
        
    <xs:simpleType name="number_3_1">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,3}|[0-9]{1,3}\.[0-9]{1})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="999.9"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="number_04_2">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,4}|[0-9]{1,4}\.[0-9]{1,2})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="9999.99"/>
        </xs:restriction>
    </xs:simpleType>
        
    <xs:simpleType name="number_7_2">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,7}|[0-9]{1,7}\.[0-9]{1,2})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="9999999.99"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="nb_spcmn">
        <xs:restriction base="integer">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="9999"/>
        </xs:restriction>
    </xs:simpleType> 

    <xs:simpleType name="modeType">
      <xs:restriction base="xs:string">
        <xs:enumeration value="M" />
        <xs:enumeration value="G" />
      </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="latitude">
        <xs:simpleContent>
            <xs:restriction base="AttType">
               <xs:pattern value="([0-9]{2}|([0-9]{2}\.{0,1}[0-9]{1,4}))"/>
               <xs:minInclusive value="40"/>
               <xs:maxInclusive value="84"/>
            </xs:restriction>
        </xs:simpleContent>
    </xs:complexType>
    
    <xs:complexType name="longitude">
        <xs:simpleContent>
            <xs:restriction base="AttType">
               <xs:pattern value="(-[0-9]{2,3}|(-[0-9]{2,3}\.{0,1}[0-9]{1,4}))"/>
               <xs:minInclusive value="-141"/>
               <xs:maxInclusive value="-42"/>
            </xs:restriction>
        </xs:simpleContent>
    </xs:complexType>
    
    <xs:complexType name="AttType">
        <xs:simpleContent>
            <xs:extension base="xs:decimal">
                <xs:attribute name="MODE" type="modeType" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="weight">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,6}|[0-9]{1,6}\.[0-9]{1,3})"/>
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="999999.999"/>
        </xs:restriction>
    </xs:simpleType>    
    
    <xs:simpleType name="dpth">
        <xs:restriction base="integer">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="2000"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="spcmn_len_3_1">
        <xs:restriction base="decimal">
            <xs:pattern value="([0-9]{1,3}|[0-9]{1,3}\.[0-9]{1})"/>
            <xs:minInclusive value="0.1"/>
            <xs:maxInclusive value="999.9"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="general_info_type">
       <xs:sequence>
        <xs:element name="CIE_ID"                minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="SOFT_VER"              minOccurs="1" maxOccurs="1" type="string_20"/>
        <xs:element name="REG_ID"                minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="FIN"                   minOccurs="0" maxOccurs="1" type="string_20"/>
        <xs:element name="VRN"                   minOccurs="0" maxOccurs="1" type="string_12"/>
        <xs:element name="FORM_VER_ID"           minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="SUBFORM_ID"            minOccurs="1" maxOccurs="1" type="integer_10"/>        
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="trip_type">
       <xs:sequence>
        <xs:element name="TRIP_NUM"              minOccurs="0" maxOccurs="1" type="integer_4"/>
        <xs:element name="OPER_NAME"             minOccurs="0" maxOccurs="1" type="string_80"/>
        <xs:element name="FSH_SEAS_YR"           minOccurs="0" maxOccurs="1" type="integer_4"/>      
        <xs:element name="START_DT"              minOccurs="0" maxOccurs="1" type="date_12"/>    
        <xs:element name="RET_DT"                minOccurs="0" maxOccurs="1" type="date_12"/>    
        <xs:element name="CREW_NB"               minOccurs="0" maxOccurs="1" type="integer_2"/>
        <xs:element name="PORT_ID"               minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="OBS_TRIP_NUM"          minOccurs="0" maxOccurs="1" type="string_12"/>  
        <xs:element name="FIRST_ENTRY_DT"        minOccurs="1" maxOccurs="1" type="date_14"/>
        <xs:element name="OBS_NAME"              minOccurs="0" maxOccurs="1" type="string_50"/> 
        <xs:element name="OBS_ID"                minOccurs="0" maxOccurs="1" type="string_20"/> 
        <xs:element name="HRVSTR_NAME"           minOccurs="0" maxOccurs="1" type="string_50"/> 
        <xs:element name="PRTNSHP_ID"            minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="LGBK_UID"              minOccurs="1" maxOccurs="1" type="string_6"/>        
        <xs:element name="NAFO_ID"               minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="FTCN_NUM"              minOccurs="0" maxOccurs="1" type="string_20"/> 
        <xs:element name="FTCN_DT"               minOccurs="0" maxOccurs="1" type="date_12"/> 
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>

        <xs:element name="BAIT_USED"             minOccurs="0" maxOccurs="unbounded" type="bait_used_type"/>
        <xs:element name="SAR"                   minOccurs="0" maxOccurs="unbounded" type="sar_type"/>
        <xs:element name="TAG"                   minOccurs="0" maxOccurs="unbounded" type="tag_type"/>        
        <xs:element name="HLIN"                  minOccurs="0" maxOccurs="unbounded" type="hlin_type"/>
        <xs:element name="HLOUT"                 minOccurs="0" maxOccurs="unbounded" type="hlout_type"/>
        <xs:element name="PCONS"                 minOccurs="0" maxOccurs="unbounded" type="pcons_type"/>
        <xs:element name="EFFORT"                minOccurs="0" maxOccurs="unbounded" type="effort_type"/>
        <xs:element name="LANDING"               minOccurs="0" maxOccurs="unbounded" type="landing_type"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>
    
    <xs:complexType name="bait_used_type">
       <xs:sequence>
        <xs:element name="BT_TYP_ID"             minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="BT_WT"                 minOccurs="0" maxOccurs="1" type="weight"/>        
        <xs:element name="AVG_BT_WT_PER_GR"      minOccurs="0" maxOccurs="1" type="weight"/>    
        <xs:element name="TOW_NUM"               minOccurs="0" maxOccurs="1" type="integer_3"/>         
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>              
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>        

    <xs:complexType name="sar_type">
       <xs:sequence>
        <xs:element name="SAR_DT"                minOccurs="1" maxOccurs="1" type="date_12"/>
        <xs:element name="LAT"                   minOccurs="1" maxOccurs="1" type="latitude"/>
        <xs:element name="LONG"                  minOccurs="1" maxOccurs="1" type="longitude"/>
        <xs:element name="SPECIE_ID"             minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="NB_SPCMN"              minOccurs="1" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="WT"                    minOccurs="0" maxOccurs="1" type="weight"/>
        <xs:element name="SPCMN_COND_ID"         minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>                      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="tag_type">
       <xs:sequence>
        <xs:element name="SPECIE_ID"         minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="TAG_NUM1"          minOccurs="1" maxOccurs="1" type="string_40"/>
        <xs:element name="TAG_NUM2"          minOccurs="0" maxOccurs="1" type="string_40"/>
        <xs:element name="CTCH_DPTH"         minOccurs="0" maxOccurs="1" type="integer_4"/>
        <xs:element name="CTCH_LAT"          minOccurs="0" maxOccurs="1" type="latitude"/>
        <xs:element name="CTCH_LONG"         minOccurs="0" maxOccurs="1" type="longitude"/>
        <xs:element name="SPCMN_LEN"         minOccurs="0" maxOccurs="1" type="spcmn_len_3_1"/>                   
        <xs:element name="TOW_NUM"           minOccurs="0" maxOccurs="1" type="integer_3"/>
        <xs:element name="DG_CLOSE_DT"       minOccurs="1" maxOccurs="1" type="date_14"/>           
        <xs:element name="REM"               minOccurs="0" maxOccurs="1" type="string_2000"/>        
       </xs:sequence>                               
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>
    

    <xs:complexType name="hlin_type">
       <xs:sequence>
        <xs:element name="HLIN_CIE_ID"           minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="HLIN_NUM"              minOccurs="1" maxOccurs="1" type="string_20"/>
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>                      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="hlout_type">
       <xs:sequence>
        <xs:element name="HLOUT_CIE_ID"          minOccurs="0" maxOccurs="1" type="integer_10"/>       
        <xs:element name="HLOUT_NUM"             minOccurs="1" maxOccurs="1" type="string_20"/>
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>                      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="pcons_type">
       <xs:sequence>
        <xs:element name="SPECIE_ID"             minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="SPECIE_FRM_ID"         minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="WT"                    minOccurs="0" maxOccurs="1" type="weight"/>
        <xs:element name="NB_SPCMN"              minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="USG_ID"                minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>    

    <xs:complexType name="effort_type">
       <xs:sequence>
        <xs:element name="START_DT"              minOccurs="1" maxOccurs="1" type="date_12"/>
        <xs:element name="END_DT"                minOccurs="1" maxOccurs="1" type="date_12"/>
        <xs:element name="LIC_NO"                minOccurs="1" maxOccurs="1" type="string_18"/>
        <xs:element name="FMA_ID"                minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="PFMA_ID"               minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="FSH_TYP_ID"            minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="SAR_IND"               minOccurs="1" maxOccurs="1" type="ind_yn"/>
        <xs:element name="LOST_GEAR_IND"         minOccurs="1" maxOccurs="1" type="ind_yn"/>
        <xs:element name="MM_INTER_IND"          minOccurs="1" maxOccurs="1" type="ind_yn"/>                
        <xs:element name="NB_SETS"               minOccurs="0" maxOccurs="1" type="integer_3"/>  
        <xs:element name="LIC_NO_2"              minOccurs="0" maxOccurs="1" type="string_18"/>  
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>

        <xs:element name="TGT_SPECIES"           minOccurs="1" maxOccurs="1"         type="tgt_species_type"/>
        <xs:element name="EFFORT_BY_GEAR"        minOccurs="1" maxOccurs="unbounded" type="effort_by_gear_type"/>
        
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="tgt_species_type">
       <xs:sequence>
        <xs:element name="SPECIE_ID"             minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="OTHR_SPC_DSC"          minOccurs="0" maxOccurs="1" type="string_50"/>        
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="effort_by_gear_type">
       <xs:sequence>
        <xs:element name="GEAR_ID"               minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="SEL_DEV_ID"            minOccurs="0" maxOccurs="1" type="integer_10"/>   
        <xs:element name="MSH_SZ"                minOccurs="0" maxOccurs="1" type="integer_3"/>    
        <xs:element name="MSH_TYP_ID"            minOccurs="0" maxOccurs="1" type="integer_10"/>   
        <xs:element name="GEAR_SBTYP_ID"         minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="HK_TYP_ID"             minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="HK_SZ_ID"              minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="ESC_DIA"               minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="NB_ESC"                minOccurs="0" maxOccurs="1" type="integer_02"/>   
        <xs:element name="GEAR_HGHT"             minOccurs="0" maxOccurs="1" type="integer_4"/>  
        <xs:element name="GEAR_DIA"              minOccurs="0" maxOccurs="1" type="integer_4"/> 
        <xs:element name="GEAR_SP"               minOccurs="0" maxOccurs="1" type="integer_4"/> 
        <xs:element name="GANG_SP"               minOccurs="0" maxOccurs="1" type="integer_3"/> 
        <xs:element name="OTHR_GR_DSC"           minOccurs="0" maxOccurs="1" type="string_50"/>
        <xs:element name="HK_GAPE"               minOccurs="0" maxOccurs="1" type="number_3_1"/>
        <xs:element name="GEAR_LEN"              minOccurs="0" maxOccurs="1" type="number_04_2"/>
        <xs:element name="NB_HKS_PER_SKT"        minOccurs="0" maxOccurs="1" type="integer_6"/>
        <xs:element name="GEAR_MODEL"            minOccurs="0" maxOccurs="1" type="string_50"/>
        <xs:element name="GEAR_SZ"               minOccurs="0" maxOccurs="1" type="integer_3"/>  
        <xs:element name="ESC_CONFIG"            minOccurs="0" maxOccurs="1" type="string_50"/>                      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>

        <xs:element name="EFFORT_DETAIL"         minOccurs="1" maxOccurs="unbounded" type="effort_detail_type"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="effort_detail_type">
       <xs:sequence>
        <xs:element name="TOW_NUM"                   minOccurs="0" maxOccurs="1" type="integer_3"/>  
        <xs:element name="SET_NUM"                   minOccurs="0" maxOccurs="1" type="string_30"/>   
        <xs:element name="SOAKED_DUR"                minOccurs="0" maxOccurs="1" type="integer_5"/>   
        <xs:element name="START_DT"                  minOccurs="0" maxOccurs="1" type="date_12"/>     
        <xs:element name="START_LAT"                 minOccurs="0" maxOccurs="1" type="latitude"/>    
        <xs:element name="START_LONG"                minOccurs="0" maxOccurs="1" type="longitude"/>   
        <xs:element name="END_DT"                    minOccurs="0" maxOccurs="1" type="date_12"/>     
        <xs:element name="END_LAT"                   minOccurs="0" maxOccurs="1" type="latitude"/>    
        <xs:element name="END_LONG"                  minOccurs="0" maxOccurs="1" type="longitude"/>        
        <xs:element name="NAFO_ID"                   minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="NB_TOWS"                   minOccurs="0" maxOccurs="1" type="integer_3"/>   
        <xs:element name="NB_GEAR_HLD"               minOccurs="0" maxOccurs="1" type="integer_4"/>   
        <xs:element name="NB_GEAR_LST"               minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="AVG_GR_DPTH"               minOccurs="0" maxOccurs="1" type="integer_04"/>     
        <xs:element name="BT_PRTC_IND"               minOccurs="0" maxOccurs="1" type="ind_yn"/>         
        <xs:element name="TOT_GEAR_LEN"              minOccurs="0" maxOccurs="1" type="integer_5"/>   
        <xs:element name="NB_HKS"                    minOccurs="0" maxOccurs="1" type="integer_6"/>   
        <xs:element name="RGGD_LEN"                  minOccurs="0" maxOccurs="1" type="integer_5"/>   
        <xs:element name="NB_SKT"                    minOccurs="0" maxOccurs="1" type="integer_3"/>   
        <xs:element name="FSH_SITE_DSC"              minOccurs="0" maxOccurs="1" type="string_100"/>  
        <xs:element name="AVG_TOW_SPD"               minOccurs="0" maxOccurs="1" type="number_1_1"/> 
        <xs:element name="TGT_GR_DPTH"               minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="WRP_LEN"                   minOccurs="0" maxOccurs="1" type="integer_3"/>         
        <xs:element name="WING_SPRD"                 minOccurs="0" maxOccurs="1" type="integer_3"/>   
        <xs:element name="DOOR_SPRD"                 minOccurs="0" maxOccurs="1" type="integer_3"/>        
        <xs:element name="MID_LAT"                   minOccurs="0" maxOccurs="1" type="latitude"/>    
        <xs:element name="MID_LONG"                  minOccurs="0" maxOccurs="1" type="longitude"/>   
        <xs:element name="CATCH_DPTH"                minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="MSH_SZ"                    minOccurs="0" maxOccurs="1" type="integer_3"/>   
        <xs:element name="MIN_GR_DPTH"               minOccurs="0" maxOccurs="1" type="integer_04"/>     
        <xs:element name="MAX_GR_DPTH"               minOccurs="0" maxOccurs="1" type="integer_04"/>      
        <xs:element name="GRID_ID"                   minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="START_DEPL_DT"             minOccurs="0" maxOccurs="1" type="date_12"/>     
        <xs:element name="START_FISH_GR_DPTH"        minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="END_FISH_GR_DPTH"          minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="DATE_TIME"                 minOccurs="0" maxOccurs="1" type="date_12"/>     
        <xs:element name="LAT"                       minOccurs="0" maxOccurs="1" type="latitude"/>    
        <xs:element name="LONG"                      minOccurs="0" maxOccurs="1" type="longitude"/>   
        <xs:element name="STAT_SECT_ID"              minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="HK_TYP_ID"                 minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="HK_SZ_ID"                  minOccurs="0" maxOccurs="1" type="integer_10"/>       
        <xs:element name="AVG_GR_DIST"               minOccurs="0" maxOccurs="1" type="integer_5"/>   
        <xs:element name="MID_FISH_GR_DPTH"          minOccurs="0" maxOccurs="1" type="integer_04"/>   
        <xs:element name="GR_DPTH_CAT_ID"            minOccurs="0" maxOccurs="1" type="integer_10"/>  
        <xs:element name="VERT_SPRD"                 minOccurs="0" maxOccurs="1" type="integer_3"/>   
        <xs:element name="NB_HKS_LST"                minOccurs="0" maxOccurs="1" type="integer_06"/>      
        <xs:element name="REM"                       minOccurs="0" maxOccurs="1" type="string_2000"/> 
                                                                                                         
        <xs:element name="CATCH"                     minOccurs="1" maxOccurs="unbounded" type="catch_type"/>
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>

    <xs:complexType name="catch_type">
       <xs:sequence>
        <xs:element name="SPECIE_ID"              minOccurs="1" maxOccurs="1" type="integer_10"/>
		<xs:element name="KEPT_WT"                minOccurs="0" maxOccurs="1" type="weight"/>
        <xs:element name="DISC_WT"                minOccurs="0" maxOccurs="1" type="weight"/>        
        <xs:element name="NB_SPCMN_KEPT"          minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="NB_SPCMN_DISC"          minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="NB_SPCMN_CGHT"          minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="SPECIE_FRM_ID"          minOccurs="0" maxOccurs="1" type="integer_10"/>
        <xs:element name="NB_SPCMN_DISC_LCD"      minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="MRKT_IND"               minOccurs="0" maxOccurs="1" type="ind_yn"/>  
		<xs:element name="OTHR_SPC_DSC"           minOccurs="0" maxOccurs="1" type="string_50"/>   		
        <xs:element name="LEGALITY_IND"           minOccurs="0" maxOccurs="1" type="ind_yn"/>            
        <xs:element name="NB_SPCMN_CGHT_HOOKD"    minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="NB_SPCMN_CGHT_ENTNGLD"  minOccurs="0" maxOccurs="1" type="nb_spcmn"/>
        <xs:element name="REM"                    minOccurs="0" maxOccurs="1" type="string_2000"/>
                
       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>  
       
    <xs:complexType name="landing_type">
       <xs:sequence>
        <xs:element name="START_DT"              minOccurs="1" maxOccurs="1" type="date_12"/>
        <xs:element name="PORT_ID"               minOccurs="1" maxOccurs="1" type="integer_10"/>
        <xs:element name="OFFLD_SITE_DSC"        minOccurs="0" maxOccurs="1" type="string_100"/>        
        <xs:element name="WHRF_DSC"              minOccurs="0" maxOccurs="1" type="string_100"/>        
        <xs:element name="DG_CLOSE_DT"           minOccurs="1" maxOccurs="1" type="date_14"/>      
        <xs:element name="REM"                   minOccurs="0" maxOccurs="1" type="string_2000"/>

       </xs:sequence>                         
       <xs:attribute name="NODE_ID" type="integer"/>
    </xs:complexType>  

    
    <xs:element name="ELOG">                                                                          
        <xs:complexType>                                                                              
            <xs:sequence>                                                                             
                <xs:element name="GENERAL_INFO"  minOccurs="1" maxOccurs="1"         type="general_info_type"/>                                                                                                                      
                <xs:element name="TRIP"          minOccurs="1" maxOccurs="unbounded" type="trip_type"/>        
            </xs:sequence>                                                                            
            <xs:attribute name="NODE_ID" type="integer"/>                                             
        </xs:complexType>                                                                             
    </xs:element>      
</xs:schema>



