<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright (c) 2008-2010, AMT – The Association For Manufacturing Technology (“AMT”)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the AMT nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

DISCLAIMER OF WARRANTY. ALL MTCONNECT MATERIALS AND SPECIFICATIONS PROVIDED
BY AMT, MTCONNECT OR ANY PARTICIPANT TO YOU OR ANY PARTY ARE PROVIDED "AS IS"
AND WITHOUT ANY WARRANTY OF ANY KIND. AMT, MTCONNECT, AND EACH OF THEIR
RESPECTIVE MEMBERS, OFFICERS, DIRECTORS, AFFILIATES, SPONSORS, AND AGENTS
(COLLECTIVELY, THE "AMT PARTIES") AND PARTICIPANTS MAKE NO REPRESENTATION OR
WARRANTY OF ANY KIND WHATSOEVER RELATING TO THESE MATERIALS, INCLUDING, WITHOUT
LIMITATION, ANY EXPRESS OR IMPLIED WARRANTY OF NONINFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 

LIMITATION OF LIABILITY. IN NO EVENT SHALL AMT, MTCONNECT, ANY OTHER AMT
PARTY, OR ANY PARTICIPANT BE LIABLE FOR THE COST OF PROCURING SUBSTITUTE GOODS
OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA OR ANY INCIDENTAL,
CONSEQUENTIAL, INDIRECT, SPECIAL OR PUNITIVE DAMAGES OR OTHER DIRECT DAMAGES,
WHETHER UNDER CONTRACT, TORT, WARRANTY OR OTHERWISE, ARISING IN ANY WAY OUT OF
THIS AGREEMENT, USE OR INABILITY TO USE MTCONNECT MATERIALS, WHETHER OR NOT
SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
-->
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns='urn:mtconnect.org:MTConnectError:1.2' xmlns:mt='urn:mtconnect.org:MTConnectError:1.2' targetNamespace='urn:mtconnect.org:MTConnectError:1.2' elementFormDefault='qualified' attributeFormDefault='unqualified'>
  <xs:element name='MTConnectError' type='MTConnectErrorType'>
    <xs:annotation>
      <xs:documentation>
        The root node for MTConnect
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:simpleType name='SenderType'>
    <xs:annotation>
      <xs:documentation>
        The sender of the message
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='CreationTimeType'>
    <xs:annotation>
      <xs:documentation>
        The date and time the document was created
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:dateTime'/>
  </xs:simpleType>
  <xs:simpleType name='SequenceType'>
    <xs:annotation>
      <xs:documentation>
        A sequence number
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'>
      <xs:minInclusive value='1'/>
      <xs:maxExclusive value='18446744073709551615'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='TestIndicatorType'>
    <xs:annotation>
      <xs:documentation>
        A debugging flag for testing.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:boolean'/>
  </xs:simpleType>
  <xs:simpleType name='InstanceIdType'>
    <xs:annotation>
      <xs:documentation>
        The instance number of the agent, used for fault tolerance
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'>
      <xs:minInclusive value='1'/>
      <xs:maxExclusive value='18446744073709551615'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='BufferSizeType'>
    <xs:annotation>
      <xs:documentation>
        The size of the agents buffer
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'>
      <xs:minInclusive value='1'/>
      <xs:maxExclusive value='4294967295'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='TimestampType'>
    <xs:annotation>
      <xs:documentation>
        The time the sample was reported
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:dateTime'/>
  </xs:simpleType>
  <xs:simpleType name='OccurrenceTimeType'>
    <xs:annotation>
      <xs:documentation>
        The time a sample occurred
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:dateTime'/>
  </xs:simpleType>
  <xs:simpleType name='VersionType'>
    <xs:annotation>
      <xs:documentation>
        A version number
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:NMTOKEN'/>
  </xs:simpleType>
  <xs:simpleType name='NameType'>
    <xs:annotation>
      <xs:documentation>
        A short name for any element
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='UuidType'>
    <xs:annotation>
      <xs:documentation>
        A universally unique id that uniquely identifies the element for
        it&apos;s entire life
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='SerialNumberType'>
    <xs:annotation>
      <xs:documentation>
        A serial number for a piece of equipment
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='ItemSourceType'>
    <xs:annotation>
      <xs:documentation>
        The measurement source
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='RateType'>
    <xs:annotation>
      <xs:documentation>
        A sample rate in milliseconds per sample
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:float'/>
  </xs:simpleType>
  <xs:simpleType name='ComponentIdType'>
    <xs:annotation>
      <xs:documentation>
        The id of the component (maps to the id from probe)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:ID'/>
  </xs:simpleType>
  <xs:simpleType name='IDType'>
    <xs:annotation>
      <xs:documentation>
        An identifier
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:ID'/>
  </xs:simpleType>
  <xs:simpleType name='SignificantDigitsValueType'>
    <xs:annotation>
      <xs:documentation>
        The number significant digits
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'/>
  </xs:simpleType>
  <xs:simpleType name='AssetIdType'>
    <xs:annotation>
      <xs:documentation>
        The unique id of the asset
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='AssetAttrType'>
    <xs:annotation>
      <xs:documentation>
        An asset type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='AssetBufferSizeType'>
    <xs:annotation>
      <xs:documentation>
        The maximum number of assets
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'>
      <xs:minInclusive value='1'/>
      <xs:maxExclusive value='4294967295'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='AssetCountAttrType'>
    <xs:annotation>
      <xs:documentation>
        The number of assets
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:integer'>
      <xs:minInclusive value='0'/>
      <xs:maxExclusive value='4294967295'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DescriptionTextType'>
    <xs:annotation>
      <xs:documentation>
        A description
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='DataItemExtType'>
    <xs:annotation>
      <xs:documentation>
        An extension point for data item types
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:pattern value='[a-ln-z]:[A-Z_0-9]+'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DataItemStatsExtType'>
    <xs:annotation>
      <xs:documentation>
        An extension point for data item statistics types
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:pattern value='[a-ln-z]:[A-Z_0-9]+'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DataItemEnumTypeEnum'>
    <xs:annotation>
      <xs:documentation>
        The types of measurements available
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='ACCELERATION'/>
      <xs:enumeration value='ACTIVE_AXES'/>
      <xs:enumeration value='ALARM'/>
      <xs:enumeration value='AMPERAGE'/>
      <xs:enumeration value='ANGLE'/>
      <xs:enumeration value='ANGULAR_ACCELERATION'/>
      <xs:enumeration value='ANGULAR_VELOCITY'/>
      <xs:enumeration value='AVAILABILITY'/>
      <xs:enumeration value='AXIS_FEEDRATE'/>
      <xs:enumeration value='BLOCK'/>
      <xs:enumeration value='CODE'/>
      <xs:enumeration value='DIRECTION'/>
      <xs:enumeration value='DOOR_STATE'/>
      <xs:enumeration value='EMERGENCY_STOP'/>
      <xs:enumeration value='EXECUTION'/>
      <xs:enumeration value='FREQUENCY'/>
      <xs:enumeration value='PART_COUNT'/>
      <xs:enumeration value='PART_ID'/>
      <xs:enumeration value='PATH_FEEDRATE'/>
      <xs:enumeration value='PATH_POSITION'/>
      <xs:enumeration value='PATH_MODE'/>
      <xs:enumeration value='LINE'/>
      <xs:enumeration value='CONTROLLER_MODE'/>
      <xs:enumeration value='LOAD'/>
      <xs:enumeration value='MESSAGE'/>
      <xs:enumeration value='POSITION'/>
      <xs:enumeration value='POWER_STATUS'/>
      <xs:enumeration value='POWER_STATE'/>
      <xs:enumeration value='PRESSURE'/>
      <xs:enumeration value='RESET'/>
      <xs:enumeration value='PROGRAM'/>
      <xs:enumeration value='ROTARY_MODE'/>
      <xs:enumeration value='COUPLED_AXES'/>
      <xs:enumeration value='AXIS_COUPLING'/>
      <xs:enumeration value='SPINDLE_SPEED'/>
      <xs:enumeration value='TEMPERATURE'/>
      <xs:enumeration value='TORQUE'/>
      <xs:enumeration value='TOOL_ASSET_ID'/>
      <xs:enumeration value='TOOL_ID'/>
      <xs:enumeration value='VELOCITY'/>
      <xs:enumeration value='VIBRATION'/>
      <xs:enumeration value='VOLTAGE'/>
      <xs:enumeration value='WATTAGE'/>
      <xs:enumeration value='WORKHOLDING_ID'/>
      <xs:enumeration value='ACCUMULATED_TIME'/>
      <xs:enumeration value='ACTUATOR_STATE'/>
      <xs:enumeration value='ASSET_CHANGED'/>
      <xs:enumeration value='CONCENTRATION'/>
      <xs:enumeration value='CONDUCTIVITY'/>
      <xs:enumeration value='DISPLACEMENT'/>
      <xs:enumeration value='ELECTRICAL_POWER'/>
      <xs:enumeration value='FILL_LEVEL'/>
      <xs:enumeration value='FLOW'/>
      <xs:enumeration value='LINEAR_FORCE'/>
      <xs:enumeration value='MASS'/>
      <xs:enumeration value='PH'/>
      <xs:enumeration value='POWER_FACTOR'/>
      <xs:enumeration value='RESISTANCE'/>
      <xs:enumeration value='ROTARY_VELOCITY'/>
      <xs:enumeration value='SOUND_PRESSURE'/>
      <xs:enumeration value='STRAIN'/>
      <xs:enumeration value='TILT'/>
      <xs:enumeration value='VOLT_AMPERE'/>
      <xs:enumeration value='VOLT_AMPERE_REACTIVE'/>
      <xs:enumeration value='WATT_SECOND'/>
      <xs:enumeration value='VISCOSITY'/>
      <xs:enumeration value='COMMUNICATIONS'/>
      <xs:enumeration value='LOGIC_PROGRAM'/>
      <xs:enumeration value='MOTION_PROGRAM'/>
      <xs:enumeration value='HARDWARE'/>
      <xs:enumeration value='SYSTEM'/>
      <xs:enumeration value='LEVEL'/>
      <xs:enumeration value='ACTUATOR'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DataItemEnumType'>
    <xs:annotation>
      <xs:documentation>
        The types of measurements available
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes='DataItemEnumTypeEnum DataItemExtType'/>
  </xs:simpleType>
  <xs:simpleType name='DataItemSubEnumTypeEnum'>
    <xs:annotation>
      <xs:documentation>
        The sub-types for a measurement
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='ACTUAL'/>
      <xs:enumeration value='COMMANDED'/>
      <xs:enumeration value='MAXIMUM'/>
      <xs:enumeration value='MINIMUM'/>
      <xs:enumeration value='OTHER'/>
      <xs:enumeration value='OVERRIDE'/>
      <xs:enumeration value='PROBE'/>
      <xs:enumeration value='TARGET'/>
      <xs:enumeration value='GOOD'/>
      <xs:enumeration value='BAD'/>
      <xs:enumeration value='ALL'/>
      <xs:enumeration value='LINE'/>
      <xs:enumeration value='CONTROL'/>
      <xs:enumeration value='ALTERNATING'/>
      <xs:enumeration value='DIRECT'/>
      <xs:enumeration value='WEIGHT'/>
      <xs:enumeration value='VOLUME'/>
      <xs:enumeration value='MOLE'/>
      <xs:enumeration value='KINETIC'/>
      <xs:enumeration value='DYNAMIC'/>
      <xs:enumeration value='NO_SCALE'/>
      <xs:enumeration value='A_SCALE'/>
      <xs:enumeration value='B_SCALE'/>
      <xs:enumeration value='C_SCALE'/>
      <xs:enumeration value='D_SCALE'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DataItemSubEnumType'>
    <xs:annotation>
      <xs:documentation>
        The sub-types for a measurement
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes='DataItemSubEnumTypeEnum DataItemExtType'/>
  </xs:simpleType>
  <xs:simpleType name='DataItemStatisticsTypeEnum'>
    <xs:annotation>
      <xs:documentation>
        Statistical operations on data
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='MINIMUM'/>
      <xs:enumeration value='MAXIMUM'/>
      <xs:enumeration value='AVERAGE'/>
      <xs:enumeration value='STANDARD_DEVIATION'/>
      <xs:enumeration value='ROOT_MEAN_SQUARE'/>
      <xs:enumeration value='MEAN'/>
      <xs:enumeration value='MODE'/>
      <xs:enumeration value='RANGE'/>
      <xs:enumeration value='KURTOSIS'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='DataItemStatisticsType'>
    <xs:annotation>
      <xs:documentation>
        Statistical operations on data
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes='DataItemStatisticsTypeEnum DataItemStatsExtType'/>
  </xs:simpleType>
  <xs:simpleType name='UnitsExtType'>
    <xs:annotation>
      <xs:documentation>
        An extension point for data item types
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:pattern value='x:[A-Z_0-9]+'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='UnitsTypeEnum'>
    <xs:annotation>
      <xs:documentation>
        The units supported
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='AMPERE'/>
      <xs:enumeration value='CELSIUS'/>
      <xs:enumeration value='COUNT'/>
      <xs:enumeration value='DEGREE'/>
      <xs:enumeration value='DEGREE/SECOND'/>
      <xs:enumeration value='DEGREE/SECOND^2'/>
      <xs:enumeration value='HERTZ'/>
      <xs:enumeration value='JOULE'/>
      <xs:enumeration value='KILOGRAM'/>
      <xs:enumeration value='LITER'/>
      <xs:enumeration value='LITER/SECOND'/>
      <xs:enumeration value='MILLIMETER'/>
      <xs:enumeration value='MILLIMETER/SECOND'/>
      <xs:enumeration value='MILLIMETER/SECOND^2'/>
      <xs:enumeration value='MILLIMETER_3D'/>
      <xs:enumeration value='NEWTON'/>
      <xs:enumeration value='NEWTON_METER'/>
      <xs:enumeration value='PASCAL'/>
      <xs:enumeration value='PERCENT'/>
      <xs:enumeration value='PH'/>
      <xs:enumeration value='REVOLUTION/MINUTE'/>
      <xs:enumeration value='SECOND'/>
      <xs:enumeration value='VOLT'/>
      <xs:enumeration value='WATT'/>
      <xs:enumeration value='OHM'/>
      <xs:enumeration value='SOUND_LEVEL'/>
      <xs:enumeration value='SIEMENS/METER'/>
      <xs:enumeration value='MICRO_RADIAN'/>
      <xs:enumeration value='PASCAL_SECOND'/>
      <xs:enumeration value='VOLT_AMPERE'/>
      <xs:enumeration value='VOLT_AMPERE_REACTIVE'/>
      <xs:enumeration value='WATT_SECOND'/>
      <xs:enumeration value='DECIBEL'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='UnitsType'>
    <xs:annotation>
      <xs:documentation>
        The units supported
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes='UnitsTypeEnum UnitsExtType'/>
  </xs:simpleType>
  <xs:simpleType name='NativeUnitsTypeEnum'>
    <xs:annotation>
      <xs:documentation>
        The units supported for the source equipment that can be converted into
        MTC Units.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='AMPERE'/>
      <xs:enumeration value='CELSIUS'/>
      <xs:enumeration value='COUNT'/>
      <xs:enumeration value='DEGREE'/>
      <xs:enumeration value='DEGREE/SECOND'/>
      <xs:enumeration value='DEGREE/SECOND^2'/>
      <xs:enumeration value='HERTZ'/>
      <xs:enumeration value='JOULE'/>
      <xs:enumeration value='KILOGRAM'/>
      <xs:enumeration value='LITER'/>
      <xs:enumeration value='LITER/SECOND'/>
      <xs:enumeration value='MILLIMETER'/>
      <xs:enumeration value='MILLIMETER/SECOND'/>
      <xs:enumeration value='MILLIMETER/SECOND^2'/>
      <xs:enumeration value='MILLIMETER_3D'/>
      <xs:enumeration value='NEWTON'/>
      <xs:enumeration value='NEWTON_METER'/>
      <xs:enumeration value='PASCAL'/>
      <xs:enumeration value='PERCENT'/>
      <xs:enumeration value='PH'/>
      <xs:enumeration value='REVOLUTION/MINUTE'/>
      <xs:enumeration value='SECOND'/>
      <xs:enumeration value='VOLT'/>
      <xs:enumeration value='WATT'/>
      <xs:enumeration value='OHM'/>
      <xs:enumeration value='SOUND_LEVEL'/>
      <xs:enumeration value='SIEMENS/METER'/>
      <xs:enumeration value='MICRO_RADIAN'/>
      <xs:enumeration value='PASCAL_SECOND'/>
      <xs:enumeration value='VOLT_AMPERE'/>
      <xs:enumeration value='VOLT_AMPERE_REACTIVE'/>
      <xs:enumeration value='WATT_SECOND'/>
      <xs:enumeration value='DECIBEL'/>
      <xs:enumeration value='CENTIPOISE'/>
      <xs:enumeration value='DEGREE/MINUTE'/>
      <xs:enumeration value='FAHRENHEIT'/>
      <xs:enumeration value='FOOT'/>
      <xs:enumeration value='FOOT/MINUTE'/>
      <xs:enumeration value='FOOT/SECOND'/>
      <xs:enumeration value='FOOT/SECOND^2'/>
      <xs:enumeration value='FOOT_3D'/>
      <xs:enumeration value='GALLON/MINUTE'/>
      <xs:enumeration value='INCH'/>
      <xs:enumeration value='INCH/MINUTE'/>
      <xs:enumeration value='INCH/SECOND'/>
      <xs:enumeration value='INCH/SECOND^2'/>
      <xs:enumeration value='INCH_3D'/>
      <xs:enumeration value='KILOWATT'/>
      <xs:enumeration value='KILOWATT_HOUR'/>
      <xs:enumeration value='MILLIMETER/MINUTE'/>
      <xs:enumeration value='OTHER'/>
      <xs:enumeration value='POUND'/>
      <xs:enumeration value='POUND/INCH^2'/>
      <xs:enumeration value='RADIAN'/>
      <xs:enumeration value='RADIAN/MINUTE'/>
      <xs:enumeration value='RADIAN/SECOND'/>
      <xs:enumeration value='RADIAN/SECOND^2'/>
      <xs:enumeration value='REVOLUTION/SECOND'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name='NativeUnitsType'>
    <xs:annotation>
      <xs:documentation>
        The units supported for the source equipment that can be converted into
        MTC Units.
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes='NativeUnitsTypeEnum UnitsExtType'/>
  </xs:simpleType>
  <xs:simpleType name='CoordinateSystemType'>
    <xs:annotation>
      <xs:documentation>
        The coordinate system to be used for the position
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='MACHINE'/>
      <xs:enumeration value='WORK'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name='HeaderType'>
    <xs:annotation>
      <xs:documentation>
        Message header for protocol information
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base='xs:string'>
        <xs:attribute name='version' type='VersionType' use='required'/>
        <xs:attribute name='creationTime' type='CreationTimeType' use='required'/>
        <xs:attribute name='testIndicator' type='TestIndicatorType' use='optional'/>
        <xs:attribute name='instanceId' type='InstanceIdType' use='required'/>
        <xs:attribute name='sender' type='SenderType' use='required'/>
        <xs:attribute name='bufferSize' type='BufferSizeType' use='required'/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name='MTConnectErrorType'>
    <xs:annotation>
      <xs:documentation>
        The root node for MTConnect
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name='Header' type='HeaderType'>
        <xs:annotation>
          <xs:documentation>
            Protocol dependent information
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:choice minOccurs='1'>
        <xs:element name='Error' type='ErrorType'>
          <xs:annotation>
            <xs:documentation>
              Only for backward compatibility with 1.0
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name='Errors' type='ErrorsType'>
          <xs:annotation>
            <xs:documentation>
              A collection of errors
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name='ErrorsType'>
    <xs:annotation>
      <xs:documentation>
        A collection of errors
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name='Error' type='ErrorType' minOccurs='1' maxOccurs='unbounded'>
        <xs:annotation>
          <xs:documentation>
            An error result
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name='ErrorDescriptionType'>
    <xs:annotation>
      <xs:documentation>
        The text description of the error
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'/>
  </xs:simpleType>
  <xs:simpleType name='ErrorCodeType'>
    <xs:annotation>
      <xs:documentation>
        The error code
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base='xs:string'>
      <xs:enumeration value='UNAUTHORIZED'/>
      <xs:enumeration value='NO_DEVICE'/>
      <xs:enumeration value='OUT_OF_RANGE'/>
      <xs:enumeration value='TOO_MANY'/>
      <xs:enumeration value='INVALID_URI'/>
      <xs:enumeration value='INVALID_REQUEST'/>
      <xs:enumeration value='INTERNAL_ERROR'/>
      <xs:enumeration value='INVALID_PATH'/>
      <xs:enumeration value='UNSUPPORTED'/>
      <xs:enumeration value='ASSET_NOT_FOUND'/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name='ErrorType'>
    <xs:annotation>
      <xs:documentation>
        An error description
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base='ErrorDescriptionType'>
        <xs:attribute name='errorCode' type='ErrorCodeType' use='required'/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:schema>