Приложение N 1. Схема бланка XML-документа обмена данными

Приложение N 1

к Порядку обмена информацией

между демонстратором фильма

и оператором единой федеральной

автоматизированной системы сведений

о показах фильмов в кинозалах

СХЕМА БЛАНКА XML-ДОКУМЕНТА ОБМЕНА ДАННЫМИ

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!-- types -->

<xs:simpleType name="datetime_min">

<xs:annotation>

<xs:documentation>дата и время в формате: "ГГГГММДД ЧЧ:НН"

</xs:documentation>

</xs:annotation>

<xs:restriction base="xs:string">

<xs:length value="14"/>

<xs:pattern value="[12][0-9]{3}[01][0-9][0123][0-9][][012][0-9]

[:][0-5][0-9]"/>

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="datetime_sec">

<xs:annotation>

<xs:documentation>дата и время в формате:"ГГГГММДД ЧЧ:НН:СС"

</xs:documentation>

</xs:annotation>

<xs:restriction base="xs:string">

<xs:length value="17"/>

<xs:pattern value="[12][0-9]{3}[01][0-9][0123][0-9][][012][0-9]

[:][0-5][0-9][:][0-5][0-9]"/>

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="money">

<xs:restriction base="xs:double">

<xs:pattern value="([-])?([0-9])+([.] {1} [0-9] {1,2})?"/>

</xs:restriction>

</xs:simpleType>

<!-- form -->

<xs:element name="form">

<xs:annotation>

<xs:documentation>бланк билета</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:attribute name="place_x" use="required">

<xs:annotation>

<xs:documentation>место</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="20"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="place_y" use="required">

<xs:annotation>

<xs:documentation>ряд</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="20"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="section" use="optional">

<xs:annotation>

<xs:documentation>Секция (балкон, ложа,...), если есть

деление зала на секции</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="100"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="price" type="money" use="required">

<xs:annotation>

<xs:documentation>цена продажи билета (с учетом скидки,

в руб. коп., в случае возврата - цена отрицательная) </xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="discount" type="money" use="required">

<xs:annotation>

<xs:documentation>скидка на стоимость билета (в руб.

коп., в случае возврата - скидка отрицательная)</xs: documentation

</xs:annotation>

</xs:attribute>

<xs:attribute name="ticket_type" use="required">

<xs:annotation>

<xs:documentation>тип билета(VIP, студенческий,

детский,...)</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="50"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="sale_date" type="datetime_sec"

use="required">

<xs:annotation>

<xs:documentation>дата и время продажи в формате:

"ГГГГММДД ЧЧ:НН:СС". Например: "20080708 12:56:43"</xs:documentation>

</xs:annotation>

</xs:attribute>

</xs:complexType>

</xs:element>

<!-- film -->

<xs:element name="film">

<xs:annotation>

<xs:documentation>элемент описывает один из фильмов данного сеанса.

Т.е. если в течение сеанса демонстрируется несколько фильмов, тогда их

надо описывать данными элементами. Содержимое элемента - название фильма,

соответствующее прокатному удостоверению.</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:simpleContent>

<xs:extension base="xs:string">

<xs:attribute name="pu_number" use="required">

<xs:annotation>

<xs:documentation>номер прокатного

удостоверения (в случае отсутствия передается 0)</xs: documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="20"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:extension>

</xs:simpleContent>

</xs:complexType>

</xs:element>

<!-- seans-->

<xs:element name="seans">

<xs:annotation>

<xs:documentation>элемент описывает совокупность данных

зал-сеанс. Сеанс однозначно определяется набором из 3-х полей: org_id,

showroom, seans_date</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element ref="film" maxOccurs="unbounded">

<xs:annotation>

<xs:documentation>элемент описывает один из

фильмов данного сеанса. Т.е. если в течение сеанса демонстрируется

несколько фильмов, тогда их надо описывать данными элементами. Содержимое

элемента - название фильма, соответствующее прокатному удостоверению.

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element ref="form" maxOccurs="unbounded">

<xs:annotation>

<xs:documentation>элемент описывает совокупность

данных по бланку билета</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

<xs:attribute name="org_id" use="required">

<xs:annotation>

<xs:/documentation>уникальный идентификатор

Демонстратора фильмов, получаемый при регистрации</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:unsignedInt"/>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="showroom" use="required">

<xs:annotation>

<xs:documentation>название зала</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="255"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name="seans_date" type="datetime_min"

use="required">

<xs:annotation>

<xs:documentation>дата и время начала сеанса в формате:

"ГГГГММДД ЧЧ:НН". Например: "20080708 12:56"</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="seans_title">

<xs:annotation>

<xs:documentation>название сеанса (заполняется для сеансов,

в которых демонстрируется несколько фильмов)</xs:documentation>

</xs:annotation>

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:maxLength value="255"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

</xs:schema>