﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="TunnelRoot" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation>
      FHWA NTI Data Schema
      Version 1.0 - 10-05-2017
    </xs:documentation>
  </xs:annotation>
 
  <xs:element name="TunnelRoot">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="TunnelInstance" minOccurs="1" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <!-- Required field. Combination of lower-case, upper-case, and numbers up to 15 characters long. 
              Star (*), parenthesis (), ampersand (&), dot (.), dash (-), plus sign (+) and spaces also allowed. -->
              <xs:element name="I1" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    I1 - Tunnel Number
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(.){1,15}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Any combination of characters up to 100 characters long. If the tunnel is not named, leave this item blank. -->
              <xs:element name="I2" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I2 - Tunnel Name
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|.){0,100}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 0 and 99.  -->
              <xs:element name="I3" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    I3 - State Code
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:pattern value="^([0-9]){1,2}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 0 and 999.  -->
              <xs:element name="I4" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I4 - County Code
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:pattern value="^([0-9]{1,3})$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 0 and 99999.  -->
              <xs:element name="I5" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I5 - Place Code
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,5})$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!--Combination of upper-case and numbers up to 2 characters long-->
              <xs:element name="I6" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I6 - Highway District
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[A-Z0-9]){1,2}$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!--Combination of upper-case and numbers up to 5 characters long. Default 00000-->
              <xs:element name="I7" minOccurs="0" default="00000">
                <xs:annotation>
                  <xs:documentation>
                    I7 - Route Number
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[A-Z0-9]{1,5})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0, 1, 2, 3, or 4. -->
              <xs:element name="I8" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I8 - Route Direction
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value=""/>
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 1, 2, 3, 4, 5, 6, 7, or 8. -->
              <xs:element name="I9" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I9 - Route Type
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value=""/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="5"/>
                    <xs:enumeration value="6"/>
                    <xs:enumeration value="7"/>
                    <xs:enumeration value="8"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Any combination of characters up to 100 characters long. -->
              <xs:element name="I10" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I10 - Facility Carried
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|.){0,100}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Any combination of characters up to 120 characters long. -->
              <xs:element name="I11" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I11 - LRS Route ID
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|.){0,120}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with 8 total digits and maximum of 3 decimal digits -->
              <!-- Floating point number with 8 total digits and maximum of 3 decimal digits -->
              <xs:element name="I12" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I12 - LRS Mile Point
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|([0-9]{1,5})\.([0-9]{1,3})|([0-9]{1,5}))$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with 11 total digits and maximum of 8 decimal digits -->
              <xs:element name="I13">
                <xs:annotation>
                  <xs:documentation>
                    I13 - Tunnel Portal's Latitude
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="8"/>
                    <xs:totalDigits value="11" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with 11 total digits and maximum of 8 decimal digits -->
              <xs:element name="I14">
                <xs:annotation>
                  <xs:documentation>
                    I14 - Tunnel Portal's Longitude
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="8"/>
                    <xs:totalDigits value="11" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Text field representing a neighboring state (number between 0 and 99) or 'CN' for Canada and 'MX' for Mexico.   -->
              <xs:element name="I15" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I15 - Border Tunnel State or Country Code
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="(\s*|[A-Z0-9]{1,2})?"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Percent field between 0 and 100. Optional Field.-->
              <xs:element name="I16" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I16 - Border Tunnel Financial Responsibility
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|100|[1-9]?[0-9])$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Combination of lower-case, upper-case, and numbers up to 15 characters long. 
              Star (*), parenthesis (), ampersand (&), dot (.), dash (-), and spaces also allowed. Optional Field.-->
              <xs:element name="I17" minOccurs="0" >
                <xs:annotation>
                  <xs:documentation>
                    I17 - Border Tunnel Number
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|.){1,15}$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0, 1, or 2. Optional Field. -->
              <xs:element name="I18" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    I18 - Border Tunnel Inspection Responsibility
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value=""/>
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Year in YYYY format. Only values 1900 to 2099 are allowed. -->
              <xs:element name="A1" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    A1 - Year Built
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^((16[0-9][0-9])|(17[0-9][0-9])|(18[0-9][0-9])|(19[0-9][0-9])|(20[0-9][0-9]))?$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="A2" minOccurs="0" default="0">
                <xs:annotation>
                  <xs:documentation>
                    A2 - Year Rehabilitated
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|(19[0-9][0-9])|(20[0-9][0-9])|(0)|(0000))?$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 1 and 99.  -->
              <xs:element name="A3" minOccurs ="1">
                <xs:annotation>
                  <xs:documentation>
                    A3 - Total Number of Lanes
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[0-9]{1,2}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 1 and 999999.  -->
              <xs:element name="A4" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    A4 - Annual Average Daily Traffic
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[0-9]{1,6}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 1 and 999999. Optional Field. -->
              <xs:element name="A5" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    A5 - Annual Average Daily Truck Traffic
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[0-9]{1,6}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Year in YYYY format. Only values 1900 to 2099 are allowed. -->
              <xs:element name="A6" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    A6 - Year of Average Daily Traffic
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^((19[0-9][0-9])|(20[0-9][0-9]))?$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field between 1 and 999.  -->
              <xs:element name="A7" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    A7 - Detour Length
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[0-9]{1,3}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 1, 2, 3, 4, or 5 -->
              <xs:element name="A8">
                <xs:annotation>
                  <xs:documentation>
                    A8 - Service in Tunnel
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="5"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Any value from the Owner List of Values -->
              <xs:element name="C1" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C1 - Owner
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="01"/>
                    <xs:enumeration value="02"/>
                    <xs:enumeration value="03"/>
                    <xs:enumeration value="04"/>
                    <xs:enumeration value="11"/>
                    <xs:enumeration value="12"/>
                    <xs:enumeration value="21"/>
                    <xs:enumeration value="25"/>
                    <xs:enumeration value="26"/>
                    <xs:enumeration value="27"/>
                    <xs:enumeration value="31"/>
                    <xs:enumeration value="32"/>
                    <xs:enumeration value="57"/>
                    <xs:enumeration value="58"/>
                    <xs:enumeration value="59"/>
                    <xs:enumeration value="60"/>
                    <xs:enumeration value="61"/>
                    <xs:enumeration value="62"/>
                    <xs:enumeration value="63"/>
                    <xs:enumeration value="64"/>
                    <xs:enumeration value="66"/>
                    <xs:enumeration value="67"/>
                    <xs:enumeration value="68"/>
                    <xs:enumeration value="69"/>
                    <xs:enumeration value="70"/>
                    <xs:enumeration value="72"/>
                    <xs:enumeration value="73"/>
                    <xs:enumeration value="74"/>
                    <xs:enumeration value="75"/>
                    <xs:enumeration value="76"/>
                    <xs:enumeration value="77"/>
                    <xs:enumeration value="78"/>
                    <xs:enumeration value="79"/>
                    <xs:enumeration value="80"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Any value from the Owner List of Values -->
              <xs:element name="C2" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C2 - Operator
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="01"/>
                    <xs:enumeration value="02"/>
                    <xs:enumeration value="03"/>
                    <xs:enumeration value="04"/>
                    <xs:enumeration value="11"/>
                    <xs:enumeration value="12"/>
                    <xs:enumeration value="21"/>
                    <xs:enumeration value="25"/>
                    <xs:enumeration value="26"/>
                    <xs:enumeration value="27"/>
                    <xs:enumeration value="31"/>
                    <xs:enumeration value="32"/>
                    <xs:enumeration value="57"/>
                    <xs:enumeration value="58"/>
                    <xs:enumeration value="59"/>
                    <xs:enumeration value="60"/>
                    <xs:enumeration value="61"/>
                    <xs:enumeration value="62"/>
                    <xs:enumeration value="63"/>
                    <xs:enumeration value="64"/>
                    <xs:enumeration value="66"/>
                    <xs:enumeration value="67"/>
                    <xs:enumeration value="68"/>
                    <xs:enumeration value="69"/>
                    <xs:enumeration value="70"/>
                    <xs:enumeration value="72"/>
                    <xs:enumeration value="73"/>
                    <xs:enumeration value="74"/>
                    <xs:enumeration value="75"/>
                    <xs:enumeration value="76"/>
                    <xs:enumeration value="77"/>
                    <xs:enumeration value="78"/>
                    <xs:enumeration value="79"/>
                    <xs:enumeration value="80"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0, 1, 2, 3, or 4.-->
              <xs:element name="C3" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C3 - Direction of Traffic
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0, 1, or 2. -->
              <xs:element name="C4" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C4
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="C5" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C5 - NHS Designation
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="C6" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C6 - STRAHNET Designation
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Functional Classification is a number between 1 and 7.-->
              <xs:element name="C7" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C7 - Functional Classification
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:pattern value="([1-7]){1}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Urban Code is a 5 digit code consistent with the State’s HPMS urban boundaries. Code 99999 is used for 
              rural areas with population less than 5,000 and code 99998 for small urban areas with population 5,000 – 49,000.-->
              <xs:element name="C8" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    C8 - Urban Code
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:totalDigits value="5" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number field with a maximum of 6 digits-->
              <xs:element name="G1" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    G1 - Tunnel Length
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[0-9]{1,6}"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with up to 5 total digits and maximum of 1 decimal digit. -->
              <xs:element name="G2" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>
                    G2 - Minimum Vertical Clearance over Tunnel Roadway
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="1"/>
                    <xs:totalDigits value="5" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with up to 4 total digits and maximum of 1 decimal digit. -->
              <xs:element name="G3">
                <xs:annotation>
                  <xs:documentation>
                    G3 - Roadway Width, Curb-to-Curb
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="1"/>
                    <xs:totalDigits value="4" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with up to 3 total digits and maximum of 1 decimal digit.-->
              <xs:element name="G4">
                <xs:annotation>
                  <xs:documentation>
                    G4 - Left Curb Widths
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="1"/>
                    <xs:totalDigits value="3" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with up to 3 total digits and maximum of 1 decimal digit.-->
              <xs:element name="G5">
                <xs:annotation>
                  <xs:documentation>
                    G5 - Right Curb Widths
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:decimal">
                    <xs:fractionDigits value="1"/>
                    <xs:totalDigits value="3" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Date in MMDDYYYY format. -->
              <xs:element name="D1">
                <xs:annotation>
                  <xs:documentation>
                    D1 - Routine Inspection Target Date
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:pattern value="^((0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])(19|20)\d\d)?$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Date in MMDDYYYY format. -->
              <xs:element name="D2">
                <xs:annotation>
                  <xs:documentation>
                    D2 - Actual Routine Inspection Date
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^((0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])(19|20)\d\d)?$" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Number of months between designated routine inspections.-->
              <xs:element name="D3">
                <xs:annotation>
                  <xs:documentation>
                    D3 - Routine Inspection Interval
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:int">
                    <xs:totalDigits value="2" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="D4">
                <xs:annotation>
                  <xs:documentation>
                    D4 - In-Depth Inspection
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="D5">
                <xs:annotation>
                  <xs:documentation>
                    D5 - Damage Inspection
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="D6">
                <xs:annotation>
                  <xs:documentation>
                    D6 - Special Inspection
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!--Valid values are in the enumeration below.-->
              <xs:element name="L1">
                <xs:annotation>
                  <xs:documentation>
                    L1 - Load Rating Method
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="5"/>
                    <xs:enumeration value="A"/>
                    <xs:enumeration value="N"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with 4 total digits and maximum of 2 decimal digit. 
              Leave this item blank ("") for tunnels not requiring a load rating (ID L.1 - Load Rating Method coded as N.)-->
              <xs:element name="L2" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L2 - Inventory Load Rating Factor
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:union>
                    <xs:simpleType>
                      <xs:restriction base='xs:string'>
                        <xs:length value="0"/>
                      </xs:restriction>
                    </xs:simpleType>
                    <xs:simpleType>
                      <xs:restriction base="xs:decimal">
                        <xs:fractionDigits value="2"/>
                        <xs:totalDigits value="4" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:union>
                </xs:simpleType>
              </xs:element>
              <!-- Floating point number with 4 total digits and maximum of 2 decimal digit. 
               Leave this item blank for tunnels not requiring a load rating (ID L.1 - Load Rating Method coded as N.)-->
              <xs:element name="L3" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L3 - Operating Load Rating Factor
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:union>
                    <xs:simpleType>
                      <xs:restriction base='xs:string'>
                        <xs:length value="0"/>
                      </xs:restriction>
                    </xs:simpleType>
                    <xs:simpleType>
                      <xs:restriction base="xs:decimal">
                        <xs:fractionDigits value="2"/>
                        <xs:totalDigits value="4" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:union>
                </xs:simpleType>
              </xs:element>
              <!--Valid values are in the enumeration below.-->
              <xs:element name="L4">
                <xs:annotation>
                  <xs:documentation>
                    L4 - Tunnel Load Posting Status
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="A"/>
                    <xs:enumeration value="B"/>
                    <xs:enumeration value="D"/>
                    <xs:enumeration value="E"/>
                    <xs:enumeration value="G"/>
                    <xs:enumeration value="K"/>
                    <xs:enumeration value="P"/>
                    <xs:enumeration value="R"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- 2-digit number combination. Leave this item blank if a gross load posting sign is not used.-->
              <xs:element name="L5" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L5 - Posting Load - Gross
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,2})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- 2-digit number combination. Leave this item blank if an axle load posting sign is not used.-->
              <xs:element name="L6" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L6 - Posting Load - Axle
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,2})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- 2-digit number combination. Leave this item blank if no posting sign is used for this vehicle type.-->
              <xs:element name="L7" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L7 - Posting Load - Type 3
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,2})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- 2-digit number combination. Leave this item blank if no posting sign is used for this vehicle type.-->
              <xs:element name="L8" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L8 - Posting Load - Type 3S2
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,2})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- 2-digit number combination. Leave this item blank if no posting sign is used for this vehicle type.-->
              <xs:element name="L9" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    L9 - Posting Load - Type 3-3
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|[0-9]{1,2})$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="L10">
                <xs:annotation>
                  <xs:documentation>
                    L10 - Height Restriction
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="L11">
                <xs:annotation>
                  <xs:documentation>
                    L11 - Hazardous Material Restriction
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="L12">
                <xs:annotation>
                  <xs:documentation>
                    L12 - Other Restrictions
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="N1">
                <xs:annotation>
                  <xs:documentation>
                    N1 - Under Navigable Waterway
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N2" minOccurs="0" default="00.0">
                <xs:annotation>
                  <xs:documentation>
                    N2 - Navigable Waterway Clearance
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="^(\s*|([0-9]{1,2})\.([0-9]{1})|([0-9]{1,2}))$"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0, 1, 2, 3, or 4 -->
              <xs:element name="N3" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>
                    N3 - Tunnel or Portal Island Protection from Navigation
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value=""/>
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!--Valid values are in the enumeration below.-->
              <xs:element name="S1">
                <xs:annotation>
                  <xs:documentation>
                    S1 - Number of Bores
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="5"/>
                    <xs:enumeration value="6"/>
                    <xs:enumeration value="7"/>
                    <xs:enumeration value="8"/>
                    <xs:enumeration value="9"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 1, 2, 3, OR 4. -->
              <xs:element name="S2">
                <xs:annotation>
                  <xs:documentation>
                    S2 - Tunnel Shape
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 1, 2, 3, 4 OR 5. -->
              <xs:element name="S3">
                <xs:annotation>
                  <xs:documentation>
                    S3 - Portal Shapes
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                    <xs:enumeration value="4"/>
                    <xs:enumeration value="5"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 1, 2 or 3. -->
              <xs:element name="S4">
                <xs:annotation>
                  <xs:documentation>
                    S4 - Ground Conditions
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="2"/>
                    <xs:enumeration value="3"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <!-- Valid values are 0 or 1. -->
              <xs:element name="S5">
                <xs:annotation>
                  <xs:documentation>
                    S5 - Complex
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              
              
              <xs:element name="FHWAElements">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="FHWAED" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:all>
                          <!-- Required field. Combination of lower-case, upper-case, and numbers up to 15 characters long. 
              Star (*), parenthesis (), ampersand (&), dot (.), dash (-), plus sign (+) and spaces also allowed. -->
                          <xs:element name="I1">
                            <xs:annotation>
                              <xs:documentation>
                                I1 - Tunnel Number
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:pattern value="^(.){1,15}$" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99.  -->
                          <xs:element name="I3">
                            <xs:annotation>
                              <xs:documentation>
                                I3 - State Code
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:pattern value="^([0-9]){1,2}$" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 1 and 99999.-->
                          <xs:element name="EN">
                            <xs:annotation>
                              <xs:documentation>
                                EN short for Element Number
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="5" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="1" />
                                <xs:maxInclusive value="99999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 1 and 9999.-->
                          <xs:element name="EPN" minOccurs="0">
                            <xs:annotation>
                              <xs:documentation>
                                EPN short for Element Parent Number
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="5" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="1" />
                                <xs:maxInclusive value="99999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99999999.-->
                          <xs:element name="TOTALQTY">
                            <xs:annotation>
                              <xs:documentation>
                                TOTALQTY short for Element Total Quantity
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="8" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="0" />
                                <xs:maxInclusive value="99999999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99999999.-->
                          <xs:element name="CS1">
                            <xs:annotation>
                              <xs:documentation>
                                CS1 short for Element Quantity Condition State 1
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="8" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="0" />
                                <xs:maxInclusive value="99999999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99999999.-->
                          <xs:element name="CS2">
                            <xs:annotation>
                              <xs:documentation>
                                CS2 short for Element Quantity Condition State 2
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="8" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="0" />
                                <xs:maxInclusive value="99999999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99999999.-->
                          <xs:element name="CS3">
                            <xs:annotation>
                              <xs:documentation>
                                CS3 short for Element Quantity Condition State 3
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="8" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="0" />
                                <xs:maxInclusive value="99999999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <!-- Number field between 0 and 99999999.-->
                          <xs:element name="CS4">
                            <xs:annotation>
                              <xs:documentation>9999
                                CS4 short for Element Quantity Condition State 4
                              </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:int">
                                <xs:totalDigits value="8" />
                                <xs:fractionDigits value="0" />
                                <xs:minInclusive value="0" />
                                <xs:maxInclusive value="99999999" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:all>
                </xs:complexType>
              </xs:element>
                </xs:sequence>      
              </xs:complexType>
        </xs:element>
      </xs:all>
    </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
