Explorar el Código

修改了打印的schema

Kevin hace 4 años
padre
commit
599e49cea5
Se han modificado 1 ficheros con 41 adiciones y 5 borrados
  1. 41 5
      printer-schema.xsd

+ 41 - 5
printer-schema.xsd

@@ -3,7 +3,7 @@
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <!-- 大小 位置 -->
   <xs:attributeGroup name="size">
-    <xs:attribute name="width" type="xs:integer">
+    <xs:attribute name="width">
       <xs:annotation>
         <xs:documentation>
           相对位置X轴
@@ -15,6 +15,18 @@
           Table无效
         </xs:documentation>
       </xs:annotation>
+      <xs:simpleType>
+        <xs:union>
+          <xs:simpleType>
+            <xs:restriction base="xs:integer"></xs:restriction>
+          </xs:simpleType>
+          <xs:simpleType>
+            <xs:restriction base="xs:string">
+              <xs:enumeration value="auto"></xs:enumeration>
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:union>
+      </xs:simpleType>
     </xs:attribute>
     <xs:attribute name="height" type="xs:integer">
       <xs:annotation>
@@ -33,10 +45,22 @@
     </xs:attribute>
   </xs:attributeGroup>
   <xs:attributeGroup name="sizeRWidth">
-    <xs:attribute name="width" type="xs:integer" use="required">
+    <xs:attribute name="width" use="required">
       <xs:annotation>
         <xs:documentation>宽度</xs:documentation>
       </xs:annotation>
+      <xs:simpleType>
+        <xs:union>
+          <xs:simpleType>
+            <xs:restriction base="xs:integer"></xs:restriction>
+          </xs:simpleType>
+          <xs:simpleType>
+            <xs:restriction base="xs:string">
+              <xs:enumeration value="auto"></xs:enumeration>
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:union>
+      </xs:simpleType>
     </xs:attribute>
     <xs:attribute name="height" type="xs:integer">
       <xs:annotation>
@@ -45,10 +69,22 @@
     </xs:attribute>
   </xs:attributeGroup>
   <xs:attributeGroup name="sizeRHeight">
-    <xs:attribute name="width" type="xs:integer">
+    <xs:attribute name="width">
       <xs:annotation>
         <xs:documentation>宽度</xs:documentation>
       </xs:annotation>
+      <xs:simpleType>
+        <xs:union>
+          <xs:simpleType>
+            <xs:restriction base="xs:integer"></xs:restriction>
+          </xs:simpleType>
+          <xs:simpleType>
+            <xs:restriction base="xs:string">
+              <xs:enumeration value="auto"></xs:enumeration>
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:union>
+      </xs:simpleType>
     </xs:attribute>
     <xs:attribute name="height" type="xs:integer" use="required">
       <xs:annotation>
@@ -209,8 +245,8 @@
         </xs:element>
         <xs:element name="printer-config" minOccurs="0" maxOccurs="1">
           <xs:complexType>
-            <xs:all>
-              <xs:element name="page-info" minOccurs="0">
+            <xs:all minOccurs="0">
+              <xs:element name="page-info">
                 <xs:annotation>
                   <xs:documentation>设置纸张信息</xs:documentation>
                 </xs:annotation>