<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * @copyright: Copyright © 2017 Firebear Studio. All rights reserved.
 * @author   : Firebear Studio <fbeardev@gmail.com>
 */
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="config">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element name="fileFormat" type="fileFormatDeclaration" minOccurs="0" maxOccurs="unbounded" />
            </xs:choice>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="fileFormatDeclaration">
        <xs:annotation>
            <xs:documentation>
                Export file format declaration.
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="direction" type="xs:string" use="required"/>
        <xs:attribute name="label" type="xs:string" use="optional" />
        <xs:attribute name="model" type="modelName" use="optional" />
    </xs:complexType>

    <xs:simpleType name="modelName">
        <xs:annotation>
            <xs:documentation>
                Model name can contain only [A-Za-z_\d\\\\].
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z_\d\\\\]+" />
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
