printer-schema.xsd 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--Created with Liquid Studio 2020 (https://www.liquid-technologies.com)-->
  3. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  4. <!-- 大小 位置 -->
  5. <xs:attributeGroup name="size">
  6. <xs:attribute name="width">
  7. <xs:annotation>
  8. <xs:documentation>
  9. 相对位置X轴
  10. 父组件为Stack、Page、Column时代表相对父组件的位置
  11. Row、RowFor代表相对上一个组件的位置
  12. Table无效
  13. </xs:documentation>
  14. </xs:annotation>
  15. <xs:simpleType>
  16. <xs:union>
  17. <xs:simpleType>
  18. <xs:restriction base="xs:integer"></xs:restriction>
  19. </xs:simpleType>
  20. <xs:simpleType>
  21. <xs:restriction base="xs:string">
  22. <xs:enumeration value="auto"></xs:enumeration>
  23. </xs:restriction>
  24. </xs:simpleType>
  25. </xs:union>
  26. </xs:simpleType>
  27. </xs:attribute>
  28. <xs:attribute name="height" type="xs:integer">
  29. <xs:annotation>
  30. <xs:documentation>
  31. 相对位置y轴
  32. 父组件为Stack、Page、Row时代表相对父组件的位置
  33. RowFor代表当前行的相对位置
  34. Column代表相对上一个组件的位置
  35. Table无效
  36. </xs:documentation>
  37. </xs:annotation>
  38. </xs:attribute>
  39. </xs:attributeGroup>
  40. <xs:attributeGroup name="sizeRWidth">
  41. <xs:attribute name="width" use="required">
  42. <xs:annotation>
  43. <xs:documentation>宽度</xs:documentation>
  44. </xs:annotation>
  45. <xs:simpleType>
  46. <xs:union>
  47. <xs:simpleType>
  48. <xs:restriction base="xs:integer"></xs:restriction>
  49. </xs:simpleType>
  50. <xs:simpleType>
  51. <xs:restriction base="xs:string">
  52. <xs:enumeration value="auto"></xs:enumeration>
  53. </xs:restriction>
  54. </xs:simpleType>
  55. </xs:union>
  56. </xs:simpleType>
  57. </xs:attribute>
  58. <xs:attribute name="height" type="xs:integer">
  59. <xs:annotation>
  60. <xs:documentation>高度</xs:documentation>
  61. </xs:annotation>
  62. </xs:attribute>
  63. </xs:attributeGroup>
  64. <xs:attributeGroup name="sizeRHeight">
  65. <xs:attribute name="width">
  66. <xs:annotation>
  67. <xs:documentation>宽度</xs:documentation>
  68. </xs:annotation>
  69. <xs:simpleType>
  70. <xs:union>
  71. <xs:simpleType>
  72. <xs:restriction base="xs:integer"></xs:restriction>
  73. </xs:simpleType>
  74. <xs:simpleType>
  75. <xs:restriction base="xs:string">
  76. <xs:enumeration value="auto"></xs:enumeration>
  77. </xs:restriction>
  78. </xs:simpleType>
  79. </xs:union>
  80. </xs:simpleType>
  81. </xs:attribute>
  82. <xs:attribute name="height" type="xs:integer" use="required">
  83. <xs:annotation>
  84. <xs:documentation>高度</xs:documentation>
  85. </xs:annotation>
  86. </xs:attribute>
  87. </xs:attributeGroup>
  88. <xs:attributeGroup name="offsetGroup">
  89. <xs:attribute name="x" type="xs:integer">
  90. <xs:annotation>
  91. <xs:documentation>
  92. 相对位置X轴
  93. 父组件为Stack、Page、Column时代表相对父组件的位置
  94. Row、RowFor代表相对上一个组件的位置
  95. Table无效
  96. </xs:documentation>
  97. </xs:annotation>
  98. </xs:attribute>
  99. <xs:attribute name="y" type="xs:integer">
  100. <xs:annotation>
  101. <xs:documentation>
  102. 相对位置y轴
  103. 父组件为Stack、Page、Row时代表相对父组件的位置
  104. RowFor代表当前行的相对位置
  105. Column代表相对上一个组件的位置
  106. Table无效
  107. </xs:documentation>
  108. </xs:annotation>
  109. </xs:attribute>
  110. </xs:attributeGroup>
  111. <!-- End 大小 位置 -->
  112. <!-- Data -->
  113. <xs:attributeGroup name="bindingGroup">
  114. <xs:attribute name="binding" type="xs:string">
  115. <xs:annotation>
  116. <xs:documentation>
  117. 绑定的数据
  118. </xs:documentation>
  119. </xs:annotation>
  120. </xs:attribute>
  121. <xs:attribute name="format" type="xs:string">
  122. <xs:annotation>
  123. <xs:documentation>
  124. 格式化,需要和binding一起使用
  125. </xs:documentation>
  126. </xs:annotation>
  127. </xs:attribute>
  128. </xs:attributeGroup>
  129. <xs:attributeGroup name="bindingValueGroup">
  130. <xs:attribute name="binding" type="xs:string" use="required">
  131. <xs:annotation>
  132. <xs:documentation>
  133. 绑定的数据
  134. </xs:documentation>
  135. </xs:annotation>
  136. </xs:attribute>
  137. </xs:attributeGroup>
  138. <!-- End Data -->
  139. <!-- 文字 -->
  140. <xs:attributeGroup name="textGroup">
  141. <xs:attribute name="align">
  142. <xs:annotation>
  143. <xs:documentation>文字位置</xs:documentation>
  144. </xs:annotation>
  145. <xs:simpleType>
  146. <xs:restriction base="xs:string">
  147. <xs:enumeration value="start">
  148. <xs:annotation>
  149. <xs:documentation>左侧</xs:documentation>
  150. </xs:annotation>
  151. </xs:enumeration>
  152. <xs:enumeration value="center">
  153. <xs:annotation>
  154. <xs:documentation>居中</xs:documentation>
  155. </xs:annotation>
  156. </xs:enumeration>
  157. <xs:enumeration value="end">
  158. <xs:annotation>
  159. <xs:documentation>右侧</xs:documentation>
  160. </xs:annotation>
  161. </xs:enumeration>
  162. </xs:restriction>
  163. </xs:simpleType>
  164. </xs:attribute>
  165. <xs:attribute name="fontType" type="xs:string">
  166. <xs:annotation>
  167. <xs:documentation>字体</xs:documentation>
  168. </xs:annotation>
  169. </xs:attribute>
  170. <xs:attribute name="fontSize" type="xs:integer">
  171. <xs:annotation>
  172. <xs:documentation>字体大小</xs:documentation>
  173. </xs:annotation>
  174. </xs:attribute>
  175. <xs:attribute name="fontBlod" type="xs:boolean">
  176. <xs:annotation>
  177. <xs:documentation>是否粗体</xs:documentation>
  178. </xs:annotation>
  179. </xs:attribute>
  180. <xs:attribute name="underline" type="xs:boolean">
  181. <xs:annotation>
  182. <xs:documentation>是否删除线</xs:documentation>
  183. </xs:annotation>
  184. </xs:attribute>
  185. <xs:attribute name="lineSpace" type="xs:integer">
  186. <xs:annotation>
  187. <xs:documentation>行距</xs:documentation>
  188. </xs:annotation>
  189. </xs:attribute>
  190. <xs:attribute name="lineHeight" type="xs:integer">
  191. <xs:annotation>
  192. <xs:documentation>行高</xs:documentation>
  193. </xs:annotation>
  194. </xs:attribute>
  195. </xs:attributeGroup>
  196. <!-- End 文字 -->
  197. <!-- 指令 -->
  198. <xs:attributeGroup name="directive">
  199. <xs:attribute name="if" type="xs:string">
  200. <xs:annotation>
  201. <xs:documentation>
  202. 用于判断是否显示 填写具体条件 注: 不可使用于table-column
  203. </xs:documentation>
  204. </xs:annotation>
  205. </xs:attribute>
  206. </xs:attributeGroup>
  207. <!-- End 指令 -->
  208. <xs:element name="page">
  209. <xs:annotation>
  210. <xs:documentation>一个模板的根节点,可用于配置一些基本信息</xs:documentation>
  211. </xs:annotation>
  212. <xs:complexType>
  213. <xs:choice minOccurs="0" maxOccurs="unbounded">
  214. <xs:element name="font-type" minOccurs="0" maxOccurs="unbounded">
  215. <xs:complexType>
  216. <xs:attribute name="fontType" type="xs:string">
  217. <xs:annotation>
  218. <xs:documentation>字体名称</xs:documentation>
  219. </xs:annotation>
  220. </xs:attribute>
  221. <xs:attribute name="fontBaseWidth" type="xs:integer">
  222. <xs:annotation>
  223. <xs:documentation>字体大小1的时候的宽度</xs:documentation>
  224. </xs:annotation>
  225. </xs:attribute>
  226. <xs:attribute name="fontBaseHeight" type="xs:integer">
  227. <xs:annotation>
  228. <xs:documentation>字体大小1的时候的宽度</xs:documentation>
  229. </xs:annotation>
  230. </xs:attribute>
  231. </xs:complexType>
  232. </xs:element>
  233. <xs:element name="printer-config" minOccurs="0" maxOccurs="1">
  234. <xs:complexType>
  235. <xs:all minOccurs="0">
  236. <xs:element name="page-info">
  237. <xs:annotation>
  238. <xs:documentation>设置纸张信息</xs:documentation>
  239. </xs:annotation>
  240. <xs:complexType>
  241. <xs:attribute name="gapmMM" type="xs:integer">
  242. <xs:annotation>
  243. <xs:documentation>间隙M (TSC)(单位MM)</xs:documentation>
  244. </xs:annotation>
  245. </xs:attribute>
  246. <xs:attribute name="gapnMM" type="xs:integer">
  247. <xs:annotation>
  248. <xs:documentation>间隙N (TSC)(单位MM)</xs:documentation>
  249. </xs:annotation>
  250. </xs:attribute>
  251. <xs:attribute name="pageCount" type="xs:integer">
  252. <xs:annotation>
  253. <xs:documentation>重复打印次数(TSC)</xs:documentation>
  254. </xs:annotation>
  255. </xs:attribute>
  256. </xs:complexType>
  257. </xs:element>
  258. </xs:all>
  259. <xs:attributeGroup ref="textGroup" />
  260. </xs:complexType>
  261. </xs:element>
  262. <xs:element name="eval-property" minOccurs="0" maxOccurs="unbounded">
  263. <xs:annotation>
  264. <xs:documentation>
  265. 计算字段
  266. </xs:documentation>
  267. </xs:annotation>
  268. <xs:complexType>
  269. <xs:simpleContent>
  270. <xs:extension base="xs:string">
  271. <xs:attribute name="attch" type="xs:string">
  272. <xs:annotation>
  273. <xs:documentation>
  274. 表示依附到某个的路径上
  275. </xs:documentation>
  276. </xs:annotation>
  277. </xs:attribute>
  278. <xs:attribute name="propertyName" type="xs:string">
  279. <xs:annotation>
  280. <xs:documentation>
  281. 计算属性名
  282. </xs:documentation>
  283. </xs:annotation>
  284. </xs:attribute>
  285. </xs:extension>
  286. </xs:simpleContent>
  287. </xs:complexType>
  288. </xs:element>
  289. <xs:group ref="control" minOccurs="0" maxOccurs="unbounded"></xs:group>
  290. </xs:choice>
  291. <xs:attributeGroup ref="sizeRWidth" />
  292. </xs:complexType>
  293. </xs:element>
  294. <xs:group name="control">
  295. <xs:choice>
  296. <!-- 条形码 -->
  297. <xs:element name="barcode" minOccurs="0" maxOccurs="unbounded">
  298. <xs:annotation>
  299. <xs:documentation>显示条形码组件</xs:documentation>
  300. </xs:annotation>
  301. <xs:complexType>
  302. <xs:attributeGroup ref="directive" />
  303. <xs:attributeGroup ref="sizeRHeight" />
  304. <xs:attributeGroup ref="offsetGroup" />
  305. <xs:attributeGroup ref="bindingGroup" />
  306. <xs:attribute name="lineWidth" type="xs:integer">
  307. <xs:annotation>
  308. <xs:documentation>
  309. 单条线的宽度
  310. </xs:documentation>
  311. </xs:annotation>
  312. </xs:attribute>
  313. <xs:attribute name="showText" type="xs:boolean">
  314. <xs:annotation>
  315. <xs:documentation>
  316. 是否显示文字
  317. </xs:documentation>
  318. </xs:annotation>
  319. </xs:attribute>
  320. </xs:complexType>
  321. </xs:element>
  322. <!-- End 条形码 -->
  323. <!-- 二维码 -->
  324. <xs:element name="qrcode" minOccurs="0" maxOccurs="unbounded">
  325. <xs:annotation>
  326. <xs:documentation>显示二维码组件</xs:documentation>
  327. </xs:annotation>
  328. <xs:complexType>
  329. <xs:simpleContent>
  330. <xs:extension base="xs:string">
  331. <xs:attributeGroup ref="directive" />
  332. <xs:attributeGroup ref="size" />
  333. <xs:attributeGroup ref="offsetGroup" />
  334. <xs:attributeGroup ref="bindingGroup" />
  335. <xs:attribute name="ecc">
  336. <xs:annotation>
  337. <xs:documentation>
  338. 纠错等级
  339. </xs:documentation>
  340. </xs:annotation>
  341. <xs:simpleType>
  342. <xs:restriction base="xs:string">
  343. <xs:enumeration value="L" />
  344. <xs:enumeration value="M" />
  345. <xs:enumeration value="Q" />
  346. <xs:enumeration value="H" />
  347. </xs:restriction>
  348. </xs:simpleType>
  349. </xs:attribute>
  350. <xs:attribute name="imagePaint" type="xs:boolean">
  351. <xs:annotation>
  352. <xs:documentation>
  353. 使用图片模式打印
  354. </xs:documentation>
  355. </xs:annotation>
  356. </xs:attribute>
  357. </xs:extension>
  358. </xs:simpleContent>
  359. </xs:complexType>
  360. </xs:element>
  361. <!-- End 二维码 -->
  362. <!-- 文字 -->
  363. <xs:element name="text" minOccurs="0" maxOccurs="unbounded">
  364. <xs:annotation>
  365. <xs:documentation>显示文字的组件</xs:documentation>
  366. </xs:annotation>
  367. <xs:complexType>
  368. <xs:simpleContent>
  369. <xs:extension base="xs:string">
  370. <xs:attributeGroup ref="directive" />
  371. <xs:attributeGroup ref="size" />
  372. <xs:attributeGroup ref="offsetGroup" />
  373. <xs:attributeGroup ref="bindingGroup" />
  374. <xs:attributeGroup ref="textGroup" />
  375. </xs:extension>
  376. </xs:simpleContent>
  377. </xs:complexType>
  378. </xs:element>
  379. <!-- End 文字 -->
  380. <!-- 图片 -->
  381. <xs:element name="image" minOccurs="0" maxOccurs="unbounded">
  382. <xs:annotation>
  383. <xs:documentation>显示图片的组件</xs:documentation>
  384. </xs:annotation>
  385. <xs:complexType>
  386. <xs:attributeGroup ref="directive" />
  387. <xs:attributeGroup ref="offsetGroup" />
  388. <xs:attributeGroup ref="bindingValueGroup" />
  389. </xs:complexType>
  390. </xs:element>
  391. <!-- End 图片 -->
  392. <!-- 线条 -->
  393. <xs:element name="line" minOccurs="0" maxOccurs="unbounded">
  394. <xs:annotation>
  395. <xs:documentation>显示线条的组件</xs:documentation>
  396. </xs:annotation>
  397. <xs:complexType>
  398. <xs:attributeGroup ref="directive" />
  399. <xs:attributeGroup ref="size" />
  400. <xs:attributeGroup ref="offsetGroup" />
  401. </xs:complexType>
  402. </xs:element>
  403. <!-- End 线条 -->
  404. <!-- 纵向排列 -->
  405. <xs:element name="column" minOccurs="0" maxOccurs="unbounded">
  406. <xs:annotation>
  407. <xs:documentation>从上往下排列组件, 子组件的y属性代表相对上一个子组件的位置</xs:documentation>
  408. </xs:annotation>
  409. <xs:complexType>
  410. <xs:choice minOccurs="0" maxOccurs="unbounded">
  411. <xs:group ref="control" />
  412. </xs:choice>
  413. <xs:attributeGroup ref="size" />
  414. <xs:attributeGroup ref="directive" />
  415. <xs:attributeGroup ref="offsetGroup" />
  416. </xs:complexType>
  417. </xs:element>
  418. <!-- End 纵向排列 -->
  419. <!-- 横向排列 -->
  420. <xs:element name="row" minOccurs="0" maxOccurs="unbounded">
  421. <xs:annotation>
  422. <xs:documentation>从左到右排列组件, 子组件的x属性代表相对上一个子组件的位置</xs:documentation>
  423. </xs:annotation>
  424. <xs:complexType>
  425. <xs:choice minOccurs="0" maxOccurs="unbounded">
  426. <xs:group ref="control" />
  427. </xs:choice>
  428. <xs:attributeGroup ref="directive" />
  429. <xs:attributeGroup ref="size" />
  430. <xs:attributeGroup ref="offsetGroup" />
  431. </xs:complexType>
  432. </xs:element>
  433. <!-- End 横向排列 -->
  434. <!-- 横向排列-循环 -->
  435. <xs:element name="row-for" minOccurs="0" maxOccurs="unbounded">
  436. <xs:annotation>
  437. <xs:documentation>从左到右排列组件, 子组件的x属性代表相对上一个子组件的位置, 带有循环数组的功能,适用于多行渲染, y属性代表当前数据行的相对位置</xs:documentation>
  438. </xs:annotation>
  439. <xs:complexType>
  440. <xs:choice minOccurs="0" maxOccurs="unbounded">
  441. <xs:group ref="control" />
  442. </xs:choice>
  443. <xs:attributeGroup ref="directive" />
  444. <xs:attributeGroup ref="size" />
  445. <xs:attributeGroup ref="offsetGroup" />
  446. <xs:attributeGroup ref="bindingValueGroup" />
  447. </xs:complexType>
  448. </xs:element>
  449. <!-- End 横向排列-循环 -->
  450. <!-- 绝对布局 -->
  451. <xs:element name="stack" minOccurs="0" maxOccurs="unbounded">
  452. <xs:annotation>
  453. <xs:documentation>绝对布局 使用子组件的x和y定位</xs:documentation>
  454. </xs:annotation>
  455. <xs:complexType>
  456. <xs:choice minOccurs="0" maxOccurs="unbounded">
  457. <xs:group ref="control" />
  458. </xs:choice>
  459. <xs:attributeGroup ref="size" />
  460. <xs:attributeGroup ref="directive" />
  461. <xs:attributeGroup ref="offsetGroup" />
  462. </xs:complexType>
  463. </xs:element>
  464. <!-- End 绝对布局 -->
  465. <!-- 表格 -->
  466. <xs:element name="table" minOccurs="0" maxOccurs="unbounded">
  467. <xs:annotation>
  468. <xs:documentation>表格组件, 支持纵向合并, 边框线 子组件的x和y无效 子组件只支持table-column</xs:documentation>
  469. </xs:annotation>
  470. <xs:complexType>
  471. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  472. <xs:element name="table-column">
  473. <xs:complexType>
  474. <xs:simpleContent>
  475. <xs:extension base="xs:string">
  476. <xs:attribute name="columnMerge" type="xs:boolean">
  477. <xs:annotation>
  478. <xs:documentation>
  479. 是否合并
  480. </xs:documentation>
  481. </xs:annotation>
  482. </xs:attribute>
  483. <xs:attributeGroup ref="bindingGroup" />
  484. <xs:attributeGroup ref="sizeRWidth" />
  485. <xs:attributeGroup ref="textGroup" />
  486. </xs:extension>
  487. </xs:simpleContent>
  488. </xs:complexType>
  489. </xs:element>
  490. </xs:sequence>
  491. <xs:attributeGroup ref="directive" />
  492. <xs:attributeGroup ref="sizeRHeight" />
  493. <xs:attributeGroup ref="offsetGroup" />
  494. <xs:attributeGroup ref="bindingValueGroup" />
  495. <xs:attribute name="borderTop" type="xs:integer">
  496. <xs:annotation>
  497. <xs:documentation>
  498. 外边框上
  499. </xs:documentation>
  500. </xs:annotation>
  501. </xs:attribute>
  502. <xs:attribute name="borderRight" type="xs:integer">
  503. <xs:annotation>
  504. <xs:documentation>
  505. 外边框右
  506. </xs:documentation>
  507. </xs:annotation>
  508. </xs:attribute>
  509. <xs:attribute name="borderBottom" type="xs:integer">
  510. <xs:annotation>
  511. <xs:documentation>
  512. 外边框下
  513. </xs:documentation>
  514. </xs:annotation>
  515. </xs:attribute>
  516. <xs:attribute name="borderLeft" type="xs:integer">
  517. <xs:annotation>
  518. <xs:documentation>
  519. 外边框左
  520. </xs:documentation>
  521. </xs:annotation>
  522. </xs:attribute>
  523. <xs:attribute name="borderHorizontalInside" type="xs:integer">
  524. <xs:annotation>
  525. <xs:documentation>
  526. 内边框横向
  527. </xs:documentation>
  528. </xs:annotation>
  529. </xs:attribute>
  530. <xs:attribute name="borderVerticalInside" type="xs:integer">
  531. <xs:annotation>
  532. <xs:documentation>
  533. 内边框纵向
  534. </xs:documentation>
  535. </xs:annotation>
  536. </xs:attribute>
  537. </xs:complexType>
  538. </xs:element>
  539. <!-- End 表格 -->
  540. </xs:choice>
  541. </xs:group>
  542. </xs:schema>