printer-schema.xsd 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  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:attribute name="attch" type="xs:string">
  270. <xs:annotation>
  271. <xs:documentation>
  272. 表示依附到某个的路径上
  273. </xs:documentation>
  274. </xs:annotation>
  275. </xs:attribute>
  276. <xs:attribute name="propertyName" type="xs:string">
  277. <xs:annotation>
  278. <xs:documentation>
  279. 计算属性名
  280. </xs:documentation>
  281. </xs:annotation>
  282. </xs:attribute>
  283. </xs:complexType>
  284. </xs:element>
  285. <xs:group ref="control" minOccurs="0" maxOccurs="unbounded"></xs:group>
  286. </xs:choice>
  287. <xs:attributeGroup ref="sizeRWidth" />
  288. </xs:complexType>
  289. </xs:element>
  290. <xs:group name="control">
  291. <xs:choice>
  292. <!-- 条形码 -->
  293. <xs:element name="barcode" minOccurs="0" maxOccurs="unbounded">
  294. <xs:annotation>
  295. <xs:documentation>显示条形码组件</xs:documentation>
  296. </xs:annotation>
  297. <xs:complexType>
  298. <xs:attributeGroup ref="directive" />
  299. <xs:attributeGroup ref="sizeRHeight" />
  300. <xs:attributeGroup ref="offsetGroup" />
  301. <xs:attributeGroup ref="bindingGroup" />
  302. <xs:attribute name="lineWidth" type="xs:integer">
  303. <xs:annotation>
  304. <xs:documentation>
  305. 单条线的宽度
  306. </xs:documentation>
  307. </xs:annotation>
  308. </xs:attribute>
  309. <xs:attribute name="showText" type="xs:boolean">
  310. <xs:annotation>
  311. <xs:documentation>
  312. 是否显示文字
  313. </xs:documentation>
  314. </xs:annotation>
  315. </xs:attribute>
  316. </xs:complexType>
  317. </xs:element>
  318. <!-- End 条形码 -->
  319. <!-- 二维码 -->
  320. <xs:element name="qrcode" minOccurs="0" maxOccurs="unbounded">
  321. <xs:annotation>
  322. <xs:documentation>显示二维码组件</xs:documentation>
  323. </xs:annotation>
  324. <xs:complexType>
  325. <xs:simpleContent>
  326. <xs:extension base="xs:string">
  327. <xs:attributeGroup ref="directive" />
  328. <xs:attributeGroup ref="size" />
  329. <xs:attributeGroup ref="offsetGroup" />
  330. <xs:attributeGroup ref="bindingGroup" />
  331. <xs:attribute name="ecc">
  332. <xs:annotation>
  333. <xs:documentation>
  334. 纠错等级
  335. </xs:documentation>
  336. </xs:annotation>
  337. <xs:simpleType>
  338. <xs:restriction base="xs:string">
  339. <xs:enumeration value="L" />
  340. <xs:enumeration value="M" />
  341. <xs:enumeration value="Q" />
  342. <xs:enumeration value="H" />
  343. </xs:restriction>
  344. </xs:simpleType>
  345. </xs:attribute>
  346. <xs:attribute name="imagePaint" type="xs:boolean">
  347. <xs:annotation>
  348. <xs:documentation>
  349. 使用图片模式打印
  350. </xs:documentation>
  351. </xs:annotation>
  352. </xs:attribute>
  353. </xs:extension>
  354. </xs:simpleContent>
  355. </xs:complexType>
  356. </xs:element>
  357. <!-- End 二维码 -->
  358. <!-- 文字 -->
  359. <xs:element name="text" minOccurs="0" maxOccurs="unbounded">
  360. <xs:annotation>
  361. <xs:documentation>显示文字的组件</xs:documentation>
  362. </xs:annotation>
  363. <xs:complexType>
  364. <xs:simpleContent>
  365. <xs:extension base="xs:string">
  366. <xs:attributeGroup ref="directive" />
  367. <xs:attributeGroup ref="size" />
  368. <xs:attributeGroup ref="offsetGroup" />
  369. <xs:attributeGroup ref="bindingGroup" />
  370. <xs:attributeGroup ref="textGroup" />
  371. </xs:extension>
  372. </xs:simpleContent>
  373. </xs:complexType>
  374. </xs:element>
  375. <!-- End 文字 -->
  376. <!-- 图片 -->
  377. <xs:element name="image" minOccurs="0" maxOccurs="unbounded">
  378. <xs:annotation>
  379. <xs:documentation>显示图片的组件</xs:documentation>
  380. </xs:annotation>
  381. <xs:complexType>
  382. <xs:attributeGroup ref="directive" />
  383. <xs:attributeGroup ref="offsetGroup" />
  384. <xs:attributeGroup ref="bindingValueGroup" />
  385. </xs:complexType>
  386. </xs:element>
  387. <!-- End 图片 -->
  388. <!-- 线条 -->
  389. <xs:element name="line" minOccurs="0" maxOccurs="unbounded">
  390. <xs:annotation>
  391. <xs:documentation>显示线条的组件</xs:documentation>
  392. </xs:annotation>
  393. <xs:complexType>
  394. <xs:attributeGroup ref="directive" />
  395. <xs:attributeGroup ref="size" />
  396. <xs:attributeGroup ref="offsetGroup" />
  397. </xs:complexType>
  398. </xs:element>
  399. <!-- End 线条 -->
  400. <!-- 纵向排列 -->
  401. <xs:element name="column" minOccurs="0" maxOccurs="unbounded">
  402. <xs:annotation>
  403. <xs:documentation>从上往下排列组件, 子组件的y属性代表相对上一个子组件的位置</xs:documentation>
  404. </xs:annotation>
  405. <xs:complexType>
  406. <xs:choice minOccurs="0" maxOccurs="unbounded">
  407. <xs:group ref="control" />
  408. </xs:choice>
  409. <xs:attributeGroup ref="size" />
  410. <xs:attributeGroup ref="directive" />
  411. <xs:attributeGroup ref="offsetGroup" />
  412. </xs:complexType>
  413. </xs:element>
  414. <!-- End 纵向排列 -->
  415. <!-- 横向排列 -->
  416. <xs:element name="row" minOccurs="0" maxOccurs="unbounded">
  417. <xs:annotation>
  418. <xs:documentation>从左到右排列组件, 子组件的x属性代表相对上一个子组件的位置</xs:documentation>
  419. </xs:annotation>
  420. <xs:complexType>
  421. <xs:choice minOccurs="0" maxOccurs="unbounded">
  422. <xs:group ref="control" />
  423. </xs:choice>
  424. <xs:attributeGroup ref="directive" />
  425. <xs:attributeGroup ref="size" />
  426. <xs:attributeGroup ref="offsetGroup" />
  427. </xs:complexType>
  428. </xs:element>
  429. <!-- End 横向排列 -->
  430. <!-- 横向排列-循环 -->
  431. <xs:element name="row-for" minOccurs="0" maxOccurs="unbounded">
  432. <xs:annotation>
  433. <xs:documentation>从左到右排列组件, 子组件的x属性代表相对上一个子组件的位置, 带有循环数组的功能,适用于多行渲染, y属性代表当前数据行的相对位置</xs:documentation>
  434. </xs:annotation>
  435. <xs:complexType>
  436. <xs:choice minOccurs="0" maxOccurs="unbounded">
  437. <xs:group ref="control" />
  438. </xs:choice>
  439. <xs:attributeGroup ref="directive" />
  440. <xs:attributeGroup ref="size" />
  441. <xs:attributeGroup ref="offsetGroup" />
  442. <xs:attributeGroup ref="bindingValueGroup" />
  443. </xs:complexType>
  444. </xs:element>
  445. <!-- End 横向排列-循环 -->
  446. <!-- 绝对布局 -->
  447. <xs:element name="stack" minOccurs="0" maxOccurs="unbounded">
  448. <xs:annotation>
  449. <xs:documentation>绝对布局 使用子组件的x和y定位</xs:documentation>
  450. </xs:annotation>
  451. <xs:complexType>
  452. <xs:choice minOccurs="0" maxOccurs="unbounded">
  453. <xs:group ref="control" />
  454. </xs:choice>
  455. <xs:attributeGroup ref="size" />
  456. <xs:attributeGroup ref="directive" />
  457. <xs:attributeGroup ref="offsetGroup" />
  458. </xs:complexType>
  459. </xs:element>
  460. <!-- End 绝对布局 -->
  461. <!-- 表格 -->
  462. <xs:element name="table" minOccurs="0" maxOccurs="unbounded">
  463. <xs:annotation>
  464. <xs:documentation>表格组件, 支持纵向合并, 边框线 子组件的x和y无效 子组件只支持table-column</xs:documentation>
  465. </xs:annotation>
  466. <xs:complexType>
  467. <xs:all>
  468. <xs:element name="table-column">
  469. <xs:complexType>
  470. <xs:simpleContent>
  471. <xs:extension base="xs:string">
  472. <xs:attribute name="columnMerge" type="xs:boolean">
  473. <xs:annotation>
  474. <xs:documentation>
  475. 是否合并
  476. </xs:documentation>
  477. </xs:annotation>
  478. </xs:attribute>
  479. <xs:attributeGroup ref="bindingGroup" />
  480. <xs:attributeGroup ref="sizeRWidth" />
  481. <xs:attributeGroup ref="textGroup" />
  482. </xs:extension>
  483. </xs:simpleContent>
  484. </xs:complexType>
  485. </xs:element>
  486. </xs:all>
  487. <xs:attributeGroup ref="directive" />
  488. <xs:attributeGroup ref="sizeRHeight" />
  489. <xs:attributeGroup ref="offsetGroup" />
  490. <xs:attributeGroup ref="bindingValueGroup" />
  491. <xs:attribute name="borderTop" type="xs:integer">
  492. <xs:annotation>
  493. <xs:documentation>
  494. 外边框上
  495. </xs:documentation>
  496. </xs:annotation>
  497. </xs:attribute>
  498. <xs:attribute name="borderRight" type="xs:integer">
  499. <xs:annotation>
  500. <xs:documentation>
  501. 外边框右
  502. </xs:documentation>
  503. </xs:annotation>
  504. </xs:attribute>
  505. <xs:attribute name="borderBottom" type="xs:integer">
  506. <xs:annotation>
  507. <xs:documentation>
  508. 外边框下
  509. </xs:documentation>
  510. </xs:annotation>
  511. </xs:attribute>
  512. <xs:attribute name="borderLeft" type="xs:integer">
  513. <xs:annotation>
  514. <xs:documentation>
  515. 外边框左
  516. </xs:documentation>
  517. </xs:annotation>
  518. </xs:attribute>
  519. <xs:attribute name="borderHorizontalInside" type="xs:integer">
  520. <xs:annotation>
  521. <xs:documentation>
  522. 内边框横向
  523. </xs:documentation>
  524. </xs:annotation>
  525. </xs:attribute>
  526. <xs:attribute name="borderVerticalInside" type="xs:integer">
  527. <xs:annotation>
  528. <xs:documentation>
  529. 内边框纵向
  530. </xs:documentation>
  531. </xs:annotation>
  532. </xs:attribute>
  533. </xs:complexType>
  534. </xs:element>
  535. <!-- End 表格 -->
  536. </xs:choice>
  537. </xs:group>
  538. </xs:schema>