<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!--Простые типы данных-->
	<xs:include schemaLocation="P_CommonSimpleType_v01.xsd"/>
	<xs:include schemaLocation="P_CommonSimpleType_v02.xsd"/>
	<!--Справочник Все документы-->
	<xs:include schemaLocation="dAllDocuments_v02.xsd"/>
	<!--Справочник Виды приложенных файлов-->
	<xs:include schemaLocation="dAppliedFiles_v01.xsd"/>
	<!--Подсхема "Документ"-->
	<xs:complexType name="tDocumentWithoutAppliedFile">
		<xs:annotation>
			<xs:documentation>Реквизиты документа</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="CodeDocument" type="dAllDocuments">
				<xs:annotation>
					<xs:documentation>Код документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Name" type="s500" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Наименование документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Series" type="s45" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Серия документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Number" type="s45">
				<xs:annotation>
					<xs:documentation>Номер документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Date" type="xs:date" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Дата выдачи (подписания) документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="IssueOrgan" type="s500" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Организация, выдавшая документ. Автор документа</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Desc" type="s1000" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Особые отметки</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="tDocumentAndPDF">
		<xs:annotation>
			<xs:documentation>Реквизиты документа с приложенным образом в формате PDF</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="tDocumentWithoutAppliedFile">
				<xs:sequence>
					<xs:element name="AppliedFilePDF" type="tAppliedFilePDF" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Приложенный файл в формате PDF</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="tAppliedFilePDF">
		<xs:annotation>
			<xs:documentation>Приложенный файл в формате PDF</xs:documentation>
		</xs:annotation>
		<xs:attribute name="Kind" type="dApplied_file" use="required">
			<xs:annotation>
				<xs:documentation>Вид файла по справочнику видов приложенных файлов</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="Name" type="sName500PDF" use="required">
			<xs:annotation>
				<xs:documentation>Относительный путь к файлу с изображением\Имя файла с изображением</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
</xs:schema>
