Egaischeque.joint.2.xml
Материал из Фабиус wiki
Версия от 10:06, 29 июня 2018; Hisava (обсуждение | вклад)
<?xml version="1.0" encoding="utf-8"?> <xs:schema id="Cheque" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="IN"> <xs:restriction base="xs:string"> <xs:pattern value="(\d{10}|\d{12})" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="KP"> <xs:restriction base="xs:string"> <xs:pattern value="(\d{9}|)" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="DT"> <xs:restriction base="xs:string"> <xs:pattern value="(((31(0[13578]|1[02])|((29|30)(0[1,3-9]|1[0-2]))|((0[1-9]|1\d|2[0-8])(0[1-9]|1[0-2])))\d{2})|(2902(0[48]|[2468][048]|[13579][26]|00)))([01]\d|2[0-3])[0-5]\d((\+|-)\d{4})?" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="BK"> <xs:restriction base="xs:string"> <xs:pattern value="\d\d[a-zA-Z0-9]{21}\d[0-1]\d[0-3]\d{10}[a-zA-Z0-9]{31}|[a-zA-Z0-9]{40}" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="EAN"> <xs:restriction base="xs:string"> <xs:pattern value="(\d{8}|\d{13}|\d{12}|\d{14})" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="PRICE"> <xs:restriction base="xs:string"> <xs:pattern value="[-]?\d+\.\d{0,2}" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="VOLUME"> <xs:restriction base="xs:string"> <xs:pattern value="(\d+\.?\d{0,4}|)" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="ADDRESS"> <xs:restriction base="xs:string"> <xs:maxLength value="128" /> </xs:restriction> </xs:simpleType>
<xs:simpleType name="NAME"> <xs:restriction base="xs:string"> <xs:maxLength value="128" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="COUNT"> <xs:restriction base="xs:integer"> <xs:pattern value="[1-9][0-9]{0,9}" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="CODE"> <xs:restriction base="xs:string"> <xs:pattern value="\d{3}" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="NOEMPTY"> <xs:restriction base="xs:string"> <xs:pattern value="\S{1,128}" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="ALCCODE"> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> <xs:pattern value="\S+(.*\S+)*"/> </xs:restriction> </xs:simpleType>
<xs:element name="Bottle"> <xs:complexType> <xs:attribute name="price" type="PRICE" use="required" /> <xs:attribute name="barcode" type="BK" use="required" /> <xs:attribute name="ean" type="EAN" /> <xs:attribute name="volume" type="VOLUME" /> </xs:complexType> </xs:element> <xs:element name="nopdf"> <xs:complexType> <xs:attribute name="code" type="CODE" use="required"/> <xs:attribute name="price" type="PRICE" use="required"/> <xs:attribute name="bname" type="NAME" use="required" /> <xs:attribute name="alc" type="VOLUME" use="required" /> <xs:attribute name="volume" type="VOLUME" use="required" /> <xs:attribute name="ean" type="EAN" /> <xs:attribute name="count" type="COUNT" use="required" /> <xs:attribute name="alccode" type="ALCCODE" /> </xs:complexType> </xs:element>
<xs:element name="Cheque"> <xs:complexType> <xs:sequence> <xs:choice> <xs:element ref="Bottle" maxOccurs="unbounded" /> <xs:element ref="nopdf" maxOccurs="unbounded" /> </xs:choice> </xs:sequence> <xs:attribute name="inn" type="IN" use="required" /> <xs:attribute name="kpp" type="KP" /> <xs:attribute name="address" type="ADDRESS" use="required" /> <xs:attribute name="name" type="NAME" use="required" /> <xs:attribute name="kassa" type="NOEMPTY" use="required" /> <xs:attribute name="shift" type="COUNT" use="required" /> <xs:attribute name="number" type="COUNT" use="required" /> <xs:attribute name="datetime" type="DT" use="required" /> </xs:complexType> <xs:unique name="bottleBarcode"> <xs:selector xpath="Bottle" /> <xs:field xpath="@barcode" /> </xs:unique> </xs:element>
</xs:schema>