| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> |
| 3 |
<xs:element name="qrcode"> |
| 4 |
<xs:annotation> |
| 5 |
<xs:documentation>QR Code root element</xs:documentation> |
| 6 |
</xs:annotation> |
| 7 |
<xs:complexType> |
| 8 |
<xs:sequence> |
| 9 |
<xs:element ref="matrix"/> |
| 10 |
</xs:sequence> |
| 11 |
<xs:attribute name="eccLevel" use="required"> |
| 12 |
<xs:annotation> |
| 13 |
<xs:documentation>The ECC level: [L, M, Q, H]</xs:documentation> |
| 14 |
</xs:annotation> |
| 15 |
<xs:simpleType> |
| 16 |
<xs:restriction base="xs:string"> |
| 17 |
<xs:enumeration value="H"/> |
| 18 |
<xs:enumeration value="L"/> |
| 19 |
<xs:enumeration value="M"/> |
| 20 |
<xs:enumeration value="Q"/> |
| 21 |
</xs:restriction> |
| 22 |
</xs:simpleType> |
| 23 |
</xs:attribute> |
| 24 |
<xs:attribute name="version" use="required"> |
| 25 |
<xs:annotation> |
| 26 |
<xs:documentation>The QR Code version: [1...40]</xs:documentation> |
| 27 |
</xs:annotation> |
| 28 |
<xs:simpleType> |
| 29 |
<xs:restriction base="xs:nonNegativeInteger"> |
| 30 |
<xs:minInclusive value="1"/> |
| 31 |
<xs:maxInclusive value="40"/> |
| 32 |
</xs:restriction> |
| 33 |
</xs:simpleType> |
| 34 |
</xs:attribute> |
| 35 |
</xs:complexType> |
| 36 |
</xs:element> |
| 37 |
<xs:element name="matrix"> |
| 38 |
<xs:annotation> |
| 39 |
<xs:documentation>The matrix holds the encoded data in a 2-dimensional array of modules.</xs:documentation> |
| 40 |
</xs:annotation> |
| 41 |
<xs:complexType> |
| 42 |
<xs:sequence> |
| 43 |
<xs:element minOccurs="0" maxOccurs="unbounded" ref="row"/> |
| 44 |
</xs:sequence> |
| 45 |
<xs:attribute name="height" use="required"> |
| 46 |
<xs:annotation> |
| 47 |
<xs:documentation>The total height of the matrix, including the quiet zone.</xs:documentation> |
| 48 |
</xs:annotation> |
| 49 |
<xs:simpleType> |
| 50 |
<xs:restriction base="xs:nonNegativeInteger"> |
| 51 |
<xs:minInclusive value="21"/> |
| 52 |
</xs:restriction> |
| 53 |
</xs:simpleType> |
| 54 |
</xs:attribute> |
| 55 |
<xs:attribute name="maskPattern" use="required"> |
| 56 |
<xs:annotation> |
| 57 |
<xs:documentation>The detected mask pattern that was used to mask this matrix. [0...7]</xs:documentation> |
| 58 |
</xs:annotation> |
| 59 |
<xs:simpleType> |
| 60 |
<xs:restriction base="xs:nonNegativeInteger"> |
| 61 |
<xs:maxInclusive value="7"/> |
| 62 |
</xs:restriction> |
| 63 |
</xs:simpleType> |
| 64 |
</xs:attribute> |
| 65 |
<xs:attribute name="quietzoneSize" use="required" type="xs:nonNegativeInteger"> |
| 66 |
<xs:annotation> |
| 67 |
<xs:documentation>The size of the quiet zone (margin around the QR symbol).</xs:documentation> |
| 68 |
</xs:annotation> |
| 69 |
</xs:attribute> |
| 70 |
<xs:attribute name="size" use="required"> |
| 71 |
<xs:annotation> |
| 72 |
<xs:documentation>The side length of the QR symbol, excluding the quiet zone (version * 4 + 17). [21...177]</xs:documentation> |
| 73 |
</xs:annotation> |
| 74 |
<xs:simpleType> |
| 75 |
<xs:restriction base="xs:nonNegativeInteger"> |
| 76 |
<xs:minInclusive value="21"/> |
| 77 |
<xs:maxInclusive value="177"/> |
| 78 |
</xs:restriction> |
| 79 |
</xs:simpleType> |
| 80 |
</xs:attribute> |
| 81 |
<xs:attribute name="width" use="required"> |
| 82 |
<xs:annotation> |
| 83 |
<xs:documentation>The total width of the matrix, including the quiet zone.</xs:documentation> |
| 84 |
</xs:annotation> |
| 85 |
<xs:simpleType> |
| 86 |
<xs:restriction base="xs:nonNegativeInteger"> |
| 87 |
<xs:minInclusive value="21"/> |
| 88 |
</xs:restriction> |
| 89 |
</xs:simpleType> |
| 90 |
</xs:attribute> |
| 91 |
</xs:complexType> |
| 92 |
</xs:element> |
| 93 |
<xs:element name="row"> |
| 94 |
<xs:annotation> |
| 95 |
<xs:documentation>A row holds an array of modules.</xs:documentation> |
| 96 |
</xs:annotation> |
| 97 |
<xs:complexType> |
| 98 |
<xs:sequence> |
| 99 |
<xs:element minOccurs="0" maxOccurs="unbounded" ref="module"/> |
| 100 |
</xs:sequence> |
| 101 |
<xs:attribute name="y" use="required" type="xs:nonNegativeInteger"> |
| 102 |
<xs:annotation> |
| 103 |
<xs:documentation>The "y" (vertical) coordinate of this row.</xs:documentation> |
| 104 |
</xs:annotation> |
| 105 |
</xs:attribute> |
| 106 |
</xs:complexType> |
| 107 |
</xs:element> |
| 108 |
<xs:element name="module"> |
| 109 |
<xs:annotation> |
| 110 |
<xs:documentation>Represents a single module (pixel) of a QR symbol.</xs:documentation> |
| 111 |
</xs:annotation> |
| 112 |
<xs:complexType> |
| 113 |
<xs:attribute name="dark" use="required" type="xs:boolean"> |
| 114 |
<xs:annotation> |
| 115 |
<xs:documentation>Indicates whether this module is dark.</xs:documentation> |
| 116 |
</xs:annotation> |
| 117 |
</xs:attribute> |
| 118 |
<xs:attribute name="layer" use="required" type="xs:normalizedString"> |
| 119 |
<xs:annotation> |
| 120 |
<xs:documentation>The layer (functional pattern) this module belongs to.</xs:documentation> |
| 121 |
</xs:annotation> |
| 122 |
</xs:attribute> |
| 123 |
<xs:attribute name="value" use="required" type="xs:normalizedString"> |
| 124 |
<xs:annotation> |
| 125 |
<xs:documentation>The value for this module (CSS color).</xs:documentation> |
| 126 |
</xs:annotation> |
| 127 |
</xs:attribute> |
| 128 |
<xs:attribute name="x" use="required" type="xs:nonNegativeInteger"> |
| 129 |
<xs:annotation> |
| 130 |
<xs:documentation>The "x" (horizontal) coordinate of this module.</xs:documentation> |
| 131 |
</xs:annotation> |
| 132 |
</xs:attribute> |
| 133 |
</xs:complexType> |
| 134 |
</xs:element> |
| 135 |
</xs:schema> |