<?xml version="1.0" encoding="windows-1251"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Signer" type="TechnologicalDocumentSigner133" />
  <xs:complexType name="TechnologicalDocumentSigner133">
    <xs:sequence>
      <xs:element minOccurs="0" name="Certificate" type="Certificate" />
      <xs:element minOccurs="0" name="Position">
        <xs:annotation>
          <xs:documentation>Должность</xs:documentation>
          <xs:documentation>Один из элементов является обязательным</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="string255z">
              <xs:attribute name="PositionSource" use="required">
                <xs:annotation>
                  <xs:documentation>Автоматическое заполнение должности из настроек сотрудника указанных в сервисе</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="Employee">
                      <xs:annotation>
                        <xs:documentation>
                          <xs:annotation xmlns:xs="http://www.w3.org/2001/XMLSchema">
                            <xs:documentation>Первым шагом пытается сформировать должность из данных по сотруднику в сервисе</xs:documentation>
                            <xs:documentation>Если данных не найдено в сервисе значение будет взято из значения в элементе Position</xs:documentation>
                            <xs:documentation>Если в элементе пустое значение и данных не найдено в сервисе атрибут в конечном файле не сформируется</xs:documentation>
                          </xs:annotation>
                        </xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="Certificate">
                      <xs:annotation>
                        <xs:documentation>
                          <xs:annotation xmlns:xs="http://www.w3.org/2001/XMLSchema">
                            <xs:documentation>Первым шагом пытается сформировать должность из данных по сотруднику из сертификата</xs:documentation>
                            <xs:documentation>Если данных не найдено в сертификате значение будет взято из значения в элементе Position</xs:documentation>
                            <xs:documentation>Если в элементе пустое значение и данных не найдено в сертификате атрибут в конечном файле не сформируется</xs:documentation>
                          </xs:annotation>
                        </xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="Manual">
                      <xs:annotation>
                        <xs:documentation>Используется для ручного заполнения должности</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="PowerOfAttorney" type="PowerOfAttorney" />
    </xs:sequence>
    <xs:attribute name="SignerStatus">
      <xs:annotation>
        <xs:documentation>Статус подписанта</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:length value="1" />
          <xs:enumeration value="1" />
          <xs:enumeration value="2" />
          <xs:enumeration value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
		<xs:attribute name="SignatureType">
			<xs:annotation>
				<xs:documentation>Тип подписи</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:length value="1"/>
					<xs:enumeration value="1"/>
					<xs:enumeration value="2"/>
					<xs:enumeration value="3"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
  </xs:complexType>
  <xs:complexType name="Certificate">
    <xs:attribute name="CertificateThumbprint" type="string100" />
    <xs:attribute name="CertificateBytes" type="xs:base64Binary" />
  </xs:complexType>
  <xs:complexType name="PowerOfAttorney">
    <xs:sequence>
      <xs:choice>
        <xs:element name="Electronic" type="Electronic" />
        <xs:element name="Paper" type="Paper" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Electronic">
    <xs:sequence>
      <xs:choice>
        <xs:element name="Storage" type="Storage">
          <xs:annotation>
            <xs:documentation>Автоматическое заполнение информации по доверенности на основе номера и ИНН</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Manual" type="Manual">
          <xs:annotation>
            <xs:documentation>Ручное заполнение данных доверенности</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="MethodOfProviding" use="required">
      <xs:annotation>
        <xs:documentation>Способ представления доверенности</xs:documentation>
        <xs:documentation>1 - представление доверенности осуществляется посредством ее включения в пакет электронных документов</xs:documentation>
        <xs:documentation>2 - представление доверенности способом, не предусматривающим его включение в пакет электронных документов</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:length value="1" />
          <xs:enumeration value="1" />
          <xs:enumeration value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Storage">
    <xs:sequence>
      <xs:element minOccurs="0" name="FullId">
        <xs:complexType>
          <xs:attribute name="RegistrationNumber" type="guid" use="required">
            <xs:annotation>
              <xs:documentation>Номер доверенности</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="IssuerInn" type="inn" use="required">
            <xs:annotation>
              <xs:documentation>ИНН организации, выдавшей доверенность</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="RepresentativeInn" type="inn">
            <xs:annotation>
              <xs:documentation>ИНН доверенного лица</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="UseDefault" use="required">
      <xs:annotation>
        <xs:documentation>Автоматическое заполнение информации на основе доверенности, используемой сотрудником по умолчанию</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true" />
          <xs:enumeration value="false" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Manual">
    <xs:attribute name="RegistrationNumber" type="guid" use="required">
      <xs:annotation>
        <xs:documentation>Номер доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="RegistrationDate" type="date" use="required">
      <xs:annotation>
        <xs:documentation>Дата совершения (выдачи) доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="InternalNumber" type="string50">
      <xs:annotation>
        <xs:documentation>Внутренний регистрационный номер доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="InternalDate" type="date">
      <xs:annotation>
        <xs:documentation>Дата внутренней регистрации доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="SystemId" type="string500">
      <xs:annotation>
        <xs:documentation>Идентифицирующая информация об информационной системе, в которой осуществляется хранение доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Paper">
    <xs:annotation>
      <xs:documentation>Сведения о доверенности, используемой для подтверждения полномочий на бумажном носителе</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" name="Person" type="Fio">
        <xs:annotation>
          <xs:documentation>Фамилия, имя, отчество (при наличии) лица, подписавшего доверенность</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="InternalNumber" type="string50" use="required">
      <xs:annotation>
        <xs:documentation>Внутренний регистрационный номер доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="RegistrationDate" type="date" use="required">
      <xs:annotation>
        <xs:documentation>Дата совершения (выдачи) доверенности</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="IssuerInfo" type="string1000">
      <xs:annotation>
        <xs:documentation>Сведения о доверителе</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="Fio">
    <xs:attribute name="LastName" type="string60" use="required" />
    <xs:attribute name="FirstName" type="string60" use="required" />
    <xs:attribute name="MiddleName" type="string60" />
  </xs:complexType>
  <xs:simpleType name="string10">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="10" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string20">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="20" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string50">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="50" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string60">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="60" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string100">
    <xs:restriction base="xs:string">
      <xs:maxLength value="100" />
      <xs:minLength value="1" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string255z">
    <xs:restriction base="xs:string">
      <xs:minLength value="0" />
      <xs:maxLength value="255" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string500">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="500" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string1000">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="1000" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="inn">
    <xs:restriction base="xs:string">
      <xs:minLength value="10" />
      <xs:maxLength value="12" />
      <xs:pattern value="([0-9]{1}[1-9]{1}|[1-9]{1}[0-9]{1})([0-9]{10}|[0-9]{8})" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="guid">
    <xs:restriction base="xs:string">
      <xs:pattern value="([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|(\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\})" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="date">
    <xs:annotation>
      <xs:documentation>Дата в формате ДД.ММ.ГГГГ (01.01.1800 - 31.12.2099)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:length value="10" />
      <xs:pattern value="(((0[1-9]{1}|[1-2]{1}[0-9]{1})\.(0[1-9]{1}|1[0-2]{1}))|((30)\.(01|0[3-9]{1}|1[0-2]{1}))|((31)\.(01|03|05|07|08|10|12)))\.(18[0-9]{2}|19[0-9]{2}|20[0-9]{2})" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>