printer-schema.xsd 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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="alignGroup">
  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:attributeGroup>
  166. <!-- End Data -->
  167. <!-- 文字 -->
  168. <xs:attributeGroup name="textGroup">
  169. <xs:attributeGroup ref="alignGroup"></xs:attributeGroup>
  170. <xs:attribute name="fontType" type="xs:string">
  171. <xs:annotation>
  172. <xs:documentation>字体</xs:documentation>
  173. </xs:annotation>
  174. </xs:attribute>
  175. <xs:attribute name="fontSize" type="xs:integer">
  176. <xs:annotation>
  177. <xs:documentation>字体大小</xs:documentation>
  178. </xs:annotation>
  179. </xs:attribute>
  180. <xs:attribute name="fontBlod" type="xs:boolean">
  181. <xs:annotation>
  182. <xs:documentation>是否粗体</xs:documentation>
  183. </xs:annotation>
  184. </xs:attribute>
  185. <xs:attribute name="underline" type="xs:boolean">
  186. <xs:annotation>
  187. <xs:documentation>是否删除线</xs:documentation>
  188. </xs:annotation>
  189. </xs:attribute>
  190. <xs:attribute name="lineSpace" type="xs:integer">
  191. <xs:annotation>
  192. <xs:documentation>行距</xs:documentation>
  193. </xs:annotation>
  194. </xs:attribute>
  195. <xs:attribute name="lineHeight" type="xs:integer">
  196. <xs:annotation>
  197. <xs:documentation>行高</xs:documentation>
  198. </xs:annotation>
  199. </xs:attribute>
  200. </xs:attributeGroup>
  201. <!-- End 文字 -->
  202. <!-- 指令 -->
  203. <xs:attributeGroup name="directive">
  204. <xs:attribute name="if" type="xs:string">
  205. <xs:annotation>
  206. <xs:documentation>
  207. 用于判断是否显示 填写具体条件 注: 不可使用于table-column
  208. </xs:documentation>
  209. </xs:annotation>
  210. </xs:attribute>
  211. </xs:attributeGroup>
  212. <!-- End 指令 -->
  213. <xs:element name="page">
  214. <xs:annotation>
  215. <xs:documentation>一个模板的根节点,可用于配置一些基本信息</xs:documentation>
  216. </xs:annotation>
  217. <xs:complexType>
  218. <xs:choice minOccurs="0" maxOccurs="unbounded">
  219. <xs:element name="font-type" minOccurs="0" maxOccurs="unbounded">
  220. <xs:complexType>
  221. <xs:attribute name="fontType" type="xs:string">
  222. <xs:annotation>
  223. <xs:documentation>字体名称</xs:documentation>
  224. </xs:annotation>
  225. </xs:attribute>
  226. <xs:attribute name="fontBaseWidth" type="xs:integer">
  227. <xs:annotation>
  228. <xs:documentation>字体大小1的时候的宽度</xs:documentation>
  229. </xs:annotation>
  230. </xs:attribute>
  231. <xs:attribute name="fontBaseHeight" type="xs:integer">
  232. <xs:annotation>
  233. <xs:documentation>字体大小1的时候的宽度</xs:documentation>
  234. </xs:annotation>
  235. </xs:attribute>
  236. </xs:complexType>
  237. </xs:element>
  238. <xs:element name="printer-config" minOccurs="0" maxOccurs="1">
  239. <xs:complexType>
  240. <xs:all minOccurs="0">
  241. <xs:element name="page-info">
  242. <xs:annotation>
  243. <xs:documentation>设置纸张信息</xs:documentation>
  244. </xs:annotation>
  245. <xs:complexType>
  246. <xs:attribute name="gapmMM" type="xs:integer">
  247. <xs:annotation>
  248. <xs:documentation>间隙M (TSC)(单位MM)</xs:documentation>
  249. </xs:annotation>
  250. </xs:attribute>
  251. <xs:attribute name="gapnMM" type="xs:integer">
  252. <xs:annotation>
  253. <xs:documentation>间隙N (TSC)(单位MM)</xs:documentation>
  254. </xs:annotation>
  255. </xs:attribute>
  256. <xs:attribute name="pageCount" type="xs:integer">
  257. <xs:annotation>
  258. <xs:documentation>重复打印次数(TSC)</xs:documentation>
  259. </xs:annotation>
  260. </xs:attribute>
  261. </xs:complexType>
  262. </xs:element>
  263. </xs:all>
  264. <xs:attributeGroup ref="textGroup" />
  265. </xs:complexType>
  266. </xs:element>
  267. <xs:element name="eval-property" minOccurs="0" maxOccurs="unbounded">
  268. <xs:annotation>
  269. <xs:documentation>
  270. 计算字段
  271. </xs:documentation>
  272. </xs:annotation>
  273. <xs:complexType>
  274. <xs:simpleContent>
  275. <xs:extension base="xs:string">
  276. <xs:attribute name="attch" type="xs:string">
  277. <xs:annotation>
  278. <xs:documentation>
  279. 表示依附到某个的路径上
  280. </xs:documentation>
  281. </xs:annotation>
  282. </xs:attribute>
  283. <xs:attribute name="propertyName" type="xs:string">
  284. <xs:annotation>
  285. <xs:documentation>
  286. 计算属性名
  287. </xs:documentation>
  288. </xs:annotation>
  289. </xs:attribute>
  290. </xs:extension>
  291. </xs:simpleContent>
  292. </xs:complexType>
  293. </xs:element>
  294. <xs:group ref="control" minOccurs="0" maxOccurs="unbounded"></xs:group>
  295. </xs:choice>
  296. <xs:attributeGroup ref="sizeRWidth" />
  297. </xs:complexType>
  298. </xs:element>
  299. <xs:group name="control">
  300. <xs:choice>
  301. <!-- 条形码 -->
  302. <xs:element name="barcode" minOccurs="0" maxOccurs="unbounded">
  303. <xs:annotation>
  304. <xs:documentation>显示条形码组件</xs:documentation>
  305. </xs:annotation>
  306. <xs:complexType>
  307. <xs:attributeGroup ref="directive" />
  308. <xs:attributeGroup ref="sizeRHeight" />
  309. <xs:attributeGroup ref="offsetGroup" />
  310. <xs:attributeGroup ref="bindingGroup" />
  311. <xs:attribute name="lineWidth" type="xs:integer">
  312. <xs:annotation>
  313. <xs:documentation>
  314. 单条线的宽度
  315. </xs:documentation>
  316. </xs:annotation>
  317. </xs:attribute>
  318. <xs:attribute name="showText" type="xs:boolean">
  319. <xs:annotation>
  320. <xs:documentation>
  321. 是否显示文字
  322. </xs:documentation>
  323. </xs:annotation>
  324. </xs:attribute>
  325. </xs:complexType>
  326. </xs:element>
  327. <!-- End 条形码 -->
  328. <!-- 二维码 -->
  329. <xs:element name="qrcode" minOccurs="0" maxOccurs="unbounded">
  330. <xs:annotation>
  331. <xs:documentation>显示二维码组件</xs:documentation>
  332. </xs:annotation>
  333. <xs:complexType>
  334. <xs:simpleContent>
  335. <xs:extension base="xs:string">
  336. <xs:attributeGroup ref="directive" />
  337. <xs:attributeGroup ref="size" />
  338. <xs:attributeGroup ref="offsetGroup" />
  339. <xs:attributeGroup ref="bindingGroup" />
  340. <xs:attribute name="ecc">
  341. <xs:annotation>
  342. <xs:documentation>
  343. 纠错等级
  344. </xs:documentation>
  345. </xs:annotation>
  346. <xs:simpleType>
  347. <xs:restriction base="xs:string">
  348. <xs:enumeration value="L" />
  349. <xs:enumeration value="M" />
  350. <xs:enumeration value="Q" />
  351. <xs:enumeration value="H" />
  352. </xs:restriction>
  353. </xs:simpleType>
  354. </xs:attribute>
  355. <xs:attribute name="imagePaint" type="xs:boolean">
  356. <xs:annotation>
  357. <xs:documentation>
  358. 使用图片模式打印
  359. </xs:documentation>
  360. </xs:annotation>
  361. </xs:attribute>
  362. </xs:extension>
  363. </xs:simpleContent>
  364. </xs:complexType>
  365. </xs:element>
  366. <!-- End 二维码 -->
  367. <!-- 文字 -->
  368. <xs:element name="text" minOccurs="0" maxOccurs="unbounded">
  369. <xs:annotation>
  370. <xs:documentation>显示文字的组件</xs:documentation>
  371. </xs:annotation>
  372. <xs:complexType>
  373. <xs:simpleContent>
  374. <xs:extension base="xs:string">
  375. <xs:attributeGroup ref="directive" />
  376. <xs:attributeGroup ref="size" />
  377. <xs:attributeGroup ref="offsetGroup" />
  378. <xs:attributeGroup ref="bindingGroup" />
  379. <xs:attributeGroup ref="textGroup" />
  380. </xs:extension>
  381. </xs:simpleContent>
  382. </xs:complexType>
  383. </xs:element>
  384. <!-- End 文字 -->
  385. <!-- 图片 -->
  386. <xs:element name="image" minOccurs="0" maxOccurs="unbounded">
  387. <xs:annotation>
  388. <xs:documentation>显示图片的组件</xs:documentation>
  389. </xs:annotation>
  390. <xs:complexType>
  391. <xs:attributeGroup ref="directive" />
  392. <xs:attributeGroup ref="offsetGroup" />
  393. <xs:attributeGroup ref="bindingValueGroup" />
  394. </xs:complexType>
  395. </xs:element>
  396. <!-- End 图片 -->
  397. <!-- 线条 -->
  398. <xs:element name="line" minOccurs="0" maxOccurs="unbounded">
  399. <xs:annotation>
  400. <xs:documentation>显示线条的组件</xs:documentation>
  401. </xs:annotation>
  402. <xs:complexType>
  403. <xs:attributeGroup ref="directive" />
  404. <xs:attributeGroup ref="size" />
  405. <xs:attributeGroup ref="offsetGroup" />
  406. </xs:complexType>
  407. </xs:element>
  408. <!-- End 线条 -->
  409. <!-- 纵向排列 -->
  410. <xs:element name="column" minOccurs="0" maxOccurs="unbounded">
  411. <xs:annotation>
  412. <xs:documentation>从上往下排列组件, 子组件的y属性代表相对上一个子组件的位置</xs:documentation>
  413. </xs:annotation>
  414. <xs:complexType>
  415. <xs:choice minOccurs="0" maxOccurs="unbounded">
  416. <xs:group ref="control" />
  417. </xs:choice>
  418. <xs:attributeGroup ref="size" />
  419. <xs:attributeGroup ref="directive" />
  420. <xs:attributeGroup ref="offsetGroup" />
  421. </xs:complexType>
  422. </xs:element>
  423. <!-- End 纵向排列 -->
  424. <!-- 横向排列 -->
  425. <xs:element name="row" minOccurs="0" maxOccurs="unbounded">
  426. <xs:annotation>
  427. <xs:documentation>按顺序排列组件, 子组件的x属性代表相对上一个子组件的位置</xs:documentation>
  428. </xs:annotation>
  429. <xs:complexType>
  430. <xs:choice minOccurs="0" maxOccurs="unbounded">
  431. <xs:group ref="control" />
  432. </xs:choice>
  433. <xs:attributeGroup ref="directive" />
  434. <xs:attributeGroup ref="size" />
  435. <xs:attributeGroup ref="offsetGroup" />
  436. <xs:attributeGroup ref="alignGroup" />
  437. <xs:attribute name="wordWrap" type="xs:boolean">
  438. <xs:annotation>
  439. <xs:documentation>超出是否自动换行,默认false</xs:documentation>
  440. </xs:annotation>
  441. </xs:attribute>
  442. </xs:complexType>
  443. </xs:element>
  444. <!-- End 横向排列 -->
  445. <!-- 横向排列-循环 -->
  446. <xs:element name="row-for" minOccurs="0" maxOccurs="unbounded">
  447. <xs:annotation>
  448. <xs:documentation>从左到右排列组件, 子组件的x属性代表相对上一个子组件的位置, 带有循环数组的功能,适用于多行渲染, y属性代表当前数据行的相对位置</xs:documentation>
  449. </xs:annotation>
  450. <xs:complexType>
  451. <xs:choice minOccurs="0" maxOccurs="unbounded">
  452. <xs:group ref="control" />
  453. </xs:choice>
  454. <xs:attributeGroup ref="directive" />
  455. <xs:attributeGroup ref="size" />
  456. <xs:attributeGroup ref="offsetGroup" />
  457. <xs:attributeGroup ref="bindingValueGroup" />
  458. </xs:complexType>
  459. </xs:element>
  460. <!-- End 横向排列-循环 -->
  461. <!-- 绝对布局 -->
  462. <xs:element name="stack" minOccurs="0" maxOccurs="unbounded">
  463. <xs:annotation>
  464. <xs:documentation>绝对布局 使用子组件的x和y定位</xs:documentation>
  465. </xs:annotation>
  466. <xs:complexType>
  467. <xs:choice minOccurs="0" maxOccurs="unbounded">
  468. <xs:group ref="control" />
  469. </xs:choice>
  470. <xs:attributeGroup ref="size" />
  471. <xs:attributeGroup ref="directive" />
  472. <xs:attributeGroup ref="offsetGroup" />
  473. </xs:complexType>
  474. </xs:element>
  475. <!-- End 绝对布局 -->
  476. <!-- 表格 -->
  477. <xs:element name="table" minOccurs="0" maxOccurs="unbounded">
  478. <xs:annotation>
  479. <xs:documentation>表格组件, 支持纵向合并, 边框线 子组件的x和y无效 子组件只支持table-column</xs:documentation>
  480. </xs:annotation>
  481. <xs:complexType>
  482. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  483. <xs:element name="table-column">
  484. <xs:complexType>
  485. <xs:simpleContent>
  486. <xs:extension base="xs:string">
  487. <xs:attribute name="columnMerge" type="xs:boolean">
  488. <xs:annotation>
  489. <xs:documentation>
  490. 是否合并
  491. </xs:documentation>
  492. </xs:annotation>
  493. </xs:attribute>
  494. <xs:attributeGroup ref="bindingGroup" />
  495. <xs:attributeGroup ref="sizeRWidth" />
  496. <xs:attributeGroup ref="textGroup" />
  497. </xs:extension>
  498. </xs:simpleContent>
  499. </xs:complexType>
  500. </xs:element>
  501. </xs:sequence>
  502. <xs:attributeGroup ref="directive" />
  503. <xs:attributeGroup ref="sizeRHeight" />
  504. <xs:attributeGroup ref="offsetGroup" />
  505. <xs:attributeGroup ref="bindingValueGroup" />
  506. <xs:attribute name="borderTop" type="xs:integer">
  507. <xs:annotation>
  508. <xs:documentation>
  509. 外边框上
  510. </xs:documentation>
  511. </xs:annotation>
  512. </xs:attribute>
  513. <xs:attribute name="borderRight" type="xs:integer">
  514. <xs:annotation>
  515. <xs:documentation>
  516. 外边框右
  517. </xs:documentation>
  518. </xs:annotation>
  519. </xs:attribute>
  520. <xs:attribute name="borderBottom" type="xs:integer">
  521. <xs:annotation>
  522. <xs:documentation>
  523. 外边框下
  524. </xs:documentation>
  525. </xs:annotation>
  526. </xs:attribute>
  527. <xs:attribute name="borderLeft" type="xs:integer">
  528. <xs:annotation>
  529. <xs:documentation>
  530. 外边框左
  531. </xs:documentation>
  532. </xs:annotation>
  533. </xs:attribute>
  534. <xs:attribute name="borderHorizontalInside" type="xs:integer">
  535. <xs:annotation>
  536. <xs:documentation>
  537. 内边框横向
  538. </xs:documentation>
  539. </xs:annotation>
  540. </xs:attribute>
  541. <xs:attribute name="borderVerticalInside" type="xs:integer">
  542. <xs:annotation>
  543. <xs:documentation>
  544. 内边框纵向
  545. </xs:documentation>
  546. </xs:annotation>
  547. </xs:attribute>
  548. </xs:complexType>
  549. </xs:element>
  550. <!-- End 表格 -->
  551. </xs:choice>
  552. </xs:group>
  553. </xs:schema>