printer-schema.xsd 17 KB

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