]> git.sur5r.net Git - glabels/blob - templates/glabels-3.0.dtd
Drop patches applied upstream
[glabels] / templates / glabels-3.0.dtd
1 <!--
2   glabels-3.0.dtd
3
4   This file is a part of the glabels template database.
5  
6   Copyright (c) 2001-2009 Jim Evins
7  
8   Permission is hereby granted, free of charge, to any person
9   obtaining a copy of this software and associated documentation
10   files (the "Software"), to deal in the Software without
11   restriction, including without limitation the rights to use,
12   copy, modify, merge, publish, distribute, sublicense, and/or sell
13   copies of the Software, and to permit persons to whom the
14   Software is furnished to do so, subject to the following
15   conditions:
16  
17   The above copyright notice and this permission notice shall be
18   included in all copies or substantial portions of the Software.
19  
20   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27   OTHER DEALINGS IN THE SOFTWARE.
28 -->
29
30 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
31 <!-- ENTITIES: primitive types used in element attributes                 -->
32 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
33
34 <!-- primitives -->
35 <!ENTITY % BOOLEAN_TYPE       "(False | True | 0 | 1)">
36 <!ENTITY % STRING_TYPE        "CDATA">
37 <!ENTITY % LENGTH_TYPE        "CDATA"> <!-- %g (pt|in|mm|cm|pc) -->
38 <!ENTITY % INT_TYPE           "CDATA"> <!-- %d | 0x%x | 0%o -->
39 <!ENTITY % UINT_TYPE          "CDATA"> <!-- %u | 0x%x | 0%o -->
40 <!ENTITY % FLOAT_TYPE         "CDATA"> <!-- %g -->
41
42 <!-- Text related enumerations/types -->
43 <!ENTITY % JUSTIFY_TYPE       "(Left | Right | Center)">
44 <!ENTITY % FONT_WEIGHT_TYPE   "(Regular | Bold)">
45
46 <!-- Barcode related enumerations/types -->
47 <!ENTITY % BC_BACKEND_TYPE    "CDATA">
48                               <!-- one of:
49                               "(built-in    |
50                                 gnu-barcode |
51                                 zint        |
52                                 libiec16022 |
53                                 libqrencode")
54                                -->
55 <!ENTITY % BC_STYLE_TYPE      "CDATA">
56                               <!-- one of:
57                               "(POSTNET    |
58                                 POSTNET-5  |
59                                 POSTNET-9  |
60                                 POSTNET-11 |
61                                 CEPNET     |
62                                 EAN        |
63                                 EAN-8      |
64                                 EAN-8+2    |
65                                 EAN-8+5    |
66                                 EAN-13     |
67                                 EAN-13+2   |
68                                 EAN-13+5   |
69                                 UPC        |
70                                 UPC-A      |
71                                 UPC-A+2    |
72                                 UPC-A+5    |
73                                 UPC-E      |
74                                 UPC-E+2    |
75                                 UPC-E+5    |
76                                 ISBN       |
77                                 ISBN+5     |
78                                 Code39     |
79                                 Code128    |
80                                 Code128C   |
81                                 Code128B   |
82                                 I25        |
83                                 CBR        |
84                                 MSI        |
85                                 PLS        |
86                                 IEC16022)"
87                                -->
88
89 <!-- Data encoding method -->
90 <!ENTITY % DATA_ENCODING_TYPE "(None | Base64)">
91
92 <!-- Inline file format type -->
93 <!ENTITY % FILE_FORMAT_TYPE "(SVG)">
94
95 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
96 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
97 <!-- Top-level glabels paper data base                                    -->
98 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
99 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
100 <!ELEMENT Glabels-paper-sizes (Paper-size*)>
101 <!ATTLIST Glabels-paper-sizes
102                  xmlns           %STRING_TYPE;           #IMPLIED
103 >
104
105 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
106 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
107 <!-- Top-level glabels categories data base                               -->
108 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
109 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
110 <!ELEMENT Glabels-categories (Category*)>
111 <!ATTLIST Glabels-categories
112                  xmlns           %STRING_TYPE;           #IMPLIED
113 >
114
115 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
116 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
117 <!-- Top-level glabels vendors data base                                  -->
118 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
119 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
120 <!ELEMENT Glabels-vendors (Vendor*)>
121 <!ATTLIST Glabels-vendors
122                  xmlns           %STRING_TYPE;           #IMPLIED
123 >
124
125 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
126 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
127 <!-- Top-level glabels template data base                                 -->
128 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
129 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
130 <!ELEMENT Glabels-templates (Template*)>
131 <!ATTLIST Glabels-templates
132                  xmlns           %STRING_TYPE;           #IMPLIED
133 >
134
135 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
136 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
137 <!-- Top-level glabels document                                           -->
138 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
139 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
140 <!ELEMENT Glabels-document (Template, Objects+, Merge?, Data*)>
141 <!ATTLIST Glabels-document
142                  xmlns           %STRING_TYPE;           #IMPLIED
143 >
144
145 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
146 <!-- Paper size                                                           -->
147 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
148 <!ELEMENT Paper-size EMPTY>
149 <!ATTLIST Paper-size
150                  id              %STRING_TYPE;           #REQUIRED
151                  name            %STRING_TYPE;           #IMPLIED
152                  _name           %STRING_TYPE;           #IMPLIED
153                  pwg_size        %STRING_TYPE;           #REQUIRED
154                  width           %LENGTH_TYPE;           #REQUIRED
155                  height          %LENGTH_TYPE;           #REQUIRED
156 >
157
158 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
159 <!-- Category                                                             -->
160 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
161 <!ELEMENT Category EMPTY>
162 <!ATTLIST Category
163                  id              %STRING_TYPE;           #REQUIRED
164                  name            %STRING_TYPE;           #IMPLIED
165                  _name           %STRING_TYPE;           #IMPLIED
166 >
167
168 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
169 <!-- Vendor                                                               -->
170 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
171 <!ELEMENT Vendor EMPTY>
172 <!ATTLIST Vendor
173                  name            %STRING_TYPE;           #REQUIRED
174                  url             %STRING_TYPE;           #IMPLIED
175 >
176
177 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
178 <!-- Template Section                                                     -->
179 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
180 <!ENTITY % label_element  "Label-rectangle | Label-round | Label-ellipse | Label-cd">
181 <!ENTITY % markup_element "Markup-margin | Markup-line | Markup-circle | Markup-rect | Markup-ellipse">
182
183 <!ELEMENT Template (Meta*, (%label_element;)*)>
184 <!ATTLIST Template
185                  brand           %STRING_TYPE;           #REQUIRED
186                  part            %STRING_TYPE;           #REQUIRED
187                  name            %STRING_TYPE;           #IMPLIED
188                  equiv           %STRING_TYPE;           #IMPLIED
189                  size            %STRING_TYPE;           #IMPLIED
190                  width           %LENGTH_TYPE;           #IMPLIED
191                  height          %LENGTH_TYPE;           #IMPLIED
192                  description     %STRING_TYPE;           #IMPLIED
193                  _description    %STRING_TYPE;           #IMPLIED
194 >
195
196 <!ELEMENT Meta EMPTY>
197 <!ATTLIST Meta
198                  product_url     %STRING_TYPE;           #IMPLIED
199                  category        %STRING_TYPE;           #IMPLIED
200                  print           %STRING_TYPE;           #IMPLIED
201 >
202
203 <!ELEMENT Label-rectangle ((%markup_element;)*, Layout+)>
204 <!ATTLIST Label-rectangle
205                  id              %STRING_TYPE;           #REQUIRED
206                  width           %LENGTH_TYPE;           #REQUIRED
207                  height          %LENGTH_TYPE;           #REQUIRED
208                  round           %LENGTH_TYPE;           "0 pt"
209                  waste           %LENGTH_TYPE;           #IMPLIED
210                  x_waste         %LENGTH_TYPE;           #IMPLIED
211                  y_waste         %LENGTH_TYPE;           #IMPLIED
212 >
213
214 <!ELEMENT Label-round ((%markup_element;)*, Layout+)>
215 <!ATTLIST Label-round
216                  id              %STRING_TYPE;           #REQUIRED
217                  radius          %LENGTH_TYPE;           #REQUIRED
218                  waste           %LENGTH_TYPE;           #IMPLIED
219 >
220
221 <!ELEMENT Label-ellipse ((%markup_element;)*, Layout+)>
222 <!ATTLIST Label-ellipse
223                  id              %STRING_TYPE;           #REQUIRED
224                  width           %LENGTH_TYPE;           #REQUIRED
225                  height          %LENGTH_TYPE;           #REQUIRED
226                  waste           %LENGTH_TYPE;           #IMPLIED
227 >
228
229 <!ELEMENT Label-cd ((%markup_element;)*, Layout+)>
230 <!ATTLIST Label-cd
231                  id              %STRING_TYPE;           #REQUIRED
232                  radius          %LENGTH_TYPE;           #REQUIRED
233                  hole            %LENGTH_TYPE;           #REQUIRED
234                  width           %LENGTH_TYPE;           #IMPLIED
235                  height          %LENGTH_TYPE;           #IMPLIED
236                  waste           %LENGTH_TYPE;           #IMPLIED
237 >
238
239 <!ELEMENT Markup-margin EMPTY>
240 <!ATTLIST Markup-margin
241                  size            %LENGTH_TYPE;           #REQUIRED
242 >
243
244 <!ELEMENT Markup-line EMPTY>
245 <!ATTLIST Markup-line
246                  x1              %LENGTH_TYPE;           #REQUIRED
247                  y1              %LENGTH_TYPE;           #REQUIRED
248                  x2              %LENGTH_TYPE;           #REQUIRED
249                  y2              %LENGTH_TYPE;           #REQUIRED
250 >
251
252 <!ELEMENT Markup-circle EMPTY>
253 <!ATTLIST Markup-circle
254                  x0              %LENGTH_TYPE;           #REQUIRED
255                  y0              %LENGTH_TYPE;           #REQUIRED
256                  radius          %LENGTH_TYPE;           #REQUIRED
257 >
258
259 <!ELEMENT Markup-rect EMPTY>
260 <!ATTLIST Markup-rect
261                  x1              %LENGTH_TYPE;           #REQUIRED
262                  y1              %LENGTH_TYPE;           #REQUIRED
263                  w               %LENGTH_TYPE;           #REQUIRED
264                  h               %LENGTH_TYPE;           #REQUIRED
265                  r               %LENGTH_TYPE;           "0 pt"
266 >
267
268 <!ELEMENT Markup-ellipse EMPTY>
269 <!ATTLIST Markup-ellipse
270                  x1              %LENGTH_TYPE;           #REQUIRED
271                  y1              %LENGTH_TYPE;           #REQUIRED
272                  w               %LENGTH_TYPE;           #REQUIRED
273                  h               %LENGTH_TYPE;           #REQUIRED
274 >
275
276 <!ELEMENT Layout EMPTY>
277 <!ATTLIST Layout
278                  nx              %UINT_TYPE;             #REQUIRED
279                  ny              %UINT_TYPE;             #REQUIRED
280                  x0              %LENGTH_TYPE;           "0 pt"
281                  y0              %LENGTH_TYPE;           "0 pt"
282                  dx              %LENGTH_TYPE;           "0 pt"
283                  dy              %LENGTH_TYPE;           "0 pt"
284 >
285
286
287 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
288 <!-- Objects Section                                                      -->
289 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
290 <!ENTITY % object_class_element  "Object-text    |
291                                   Object-box     |
292                                   Object-line    |
293                                   Object-ellipse |
294                                   Object-image   |
295                                   Object-barcode"
296 >
297
298 <!ELEMENT Objects ((%object_class_element;)*)>
299 <!ATTLIST Objects
300                  id              %STRING_TYPE;           #REQUIRED
301                  rotate          %BOOLEAN_TYPE;          #REQUIRED
302 >
303
304 <!ENTITY % position_attrs
305                  "x              %LENGTH_TYPE;           #REQUIRED
306                   y              %LENGTH_TYPE;           #REQUIRED"
307 >
308
309 <!ENTITY % size_attrs
310                  "w              %LENGTH_TYPE;           #REQUIRED
311                   h              %LENGTH_TYPE;           #REQUIRED"
312 >
313
314 <!ENTITY % line_attrs
315                  "line_width       %LENGTH_TYPE;          #IMPLIED
316                   line_color       %UINT_TYPE;            #IMPLIED
317                   line_color_field %STRING_TYPE;          #IMPLIED"
318 >
319
320 <!ENTITY % fill_attrs
321                  "fill_color       %UINT_TYPE;           #IMPLIED
322                   fill_color_field %STRING_TYPE;         #IMPLIED"
323 >
324
325 <!ENTITY % affine_attrs
326                  "a0              %FLOAT_TYPE;           #IMPLIED
327                   a1              %FLOAT_TYPE;           #IMPLIED
328                   a2              %FLOAT_TYPE;           #IMPLIED
329                   a3              %FLOAT_TYPE;           #IMPLIED
330                   a4              %FLOAT_TYPE;           #IMPLIED
331                   a5              %FLOAT_TYPE;           #IMPLIED"
332 >
333
334 <!ENTITY % shadow_attrs
335                  "shadow          %BOOLEAN_TYPE;         #IMPLIED
336                   shadow_x        %FLOAT_TYPE;           #IMPLIED
337                   shadow_y        %FLOAT_TYPE;           #IMPLIED
338                   shadow_color    %UINT_TYPE;            #IMPLIED
339                   shadow_opacity  %FLOAT_TYPE;           #IMPLIED"
340 >
341
342 <!ELEMENT Object-text (Span)>
343 <!ATTLIST Object-text
344                  %position_attrs;
345                  %size_attrs;
346                  justify         %JUSTIFY_TYPE;          #REQUIRED
347                  auto_shrink     %BOOLEAN_TYPE;          #IMPLIED
348                  %affine_attrs;
349                  %shadow_attrs;
350 >
351
352 <!ELEMENT Object-box EMPTY>
353 <!ATTLIST Object-box
354                  %position_attrs;
355                  %size_attrs;
356                  %line_attrs;
357                  %fill_attrs;
358                  %affine_attrs;
359                  %shadow_attrs;
360 >
361
362 <!ELEMENT Object-ellipse EMPTY>
363 <!ATTLIST Object-ellipse
364                  %position_attrs;
365                  %size_attrs;
366                  %line_attrs;
367                  %fill_attrs;
368                  %affine_attrs;
369                  %shadow_attrs;
370 >
371
372 <!ELEMENT Object-line EMPTY>
373 <!ATTLIST Object-line
374                  %position_attrs;
375                  dx              %LENGTH_TYPE;           #REQUIRED
376                  dy              %LENGTH_TYPE;           #REQUIRED
377                  %line_attrs;
378                  %affine_attrs;
379                  %shadow_attrs;
380 >
381
382 <!ELEMENT Object-image EMPTY>
383 <!ATTLIST Object-image
384                  %position_attrs;
385                  %size_attrs;
386                  src             %STRING_TYPE;           #IMPLIED
387                  field           %STRING_TYPE;           #IMPLIED
388                  embed           %BOOLEAN_TYPE;          #IMPLIED
389                  %affine_attrs;
390                  %shadow_attrs;
391 >
392
393 <!ELEMENT Object-barcode EMPTY>
394 <!ATTLIST Object-barcode
395                  %position_attrs;
396                  %size_attrs;
397                  backend          %BC_BACKEND_TYPE;       #REQUIRED
398                  style            %BC_STYLE_TYPE;         #REQUIRED
399                  text             %BOOLEAN_TYPE;          #REQUIRED
400                  checksum         %BOOLEAN_TYPE;          #REQUIRED
401                  color            %UINT_TYPE;             #IMPLIED
402                  color_field      %STRING_TYPE;           #IMPLIED
403                  data             %STRING_TYPE;           #IMPLIED
404                  field            %STRING_TYPE;           #IMPLIED
405                  format           %UINT_TYPE;             #IMPLIED
406                  %affine_attrs;
407                  %shadow_attrs;
408 >
409
410
411
412 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
413 <!-- Merge Section                                                        -->
414 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
415 <!ELEMENT Merge EMPTY>
416 <!ATTLIST Merge
417                  type            %STRING_TYPE;           #REQUIRED
418                  src             %STRING_TYPE;           #IMPLIED
419 >
420
421 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
422 <!-- Data Section                                                         -->
423 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
424 <!ENTITY % data_element "Pixdata | File">
425
426 <!ELEMENT Data (%data_element;)*>
427
428 <!-- Inline Pixdata -->
429 <!ELEMENT Pixdata (#PCDATA)>
430 <!ATTLIST Pixdata
431                  name            %STRING_TYPE;           #REQUIRED
432                  encoding        %DATA_ENCODING_TYPE;    "Base64"
433 >
434
435 <!-- Inline File -->
436 <!ELEMENT File (#PCDATA)>
437 <!ATTLIST File
438                  name            %STRING_TYPE;           #REQUIRED
439                  format          %FILE_FORMAT_TYPE;      "SVG"
440 >
441
442
443 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
444 <!-- Text elements                                                        -->
445 <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
446 <!ENTITY % text_element "#PCDATA | Span | Field | NL">
447
448 <!ELEMENT Span (%text_element;)*>
449 <!ATTLIST Span
450                  font_family     %STRING_TYPE;           #IMPLIED
451                  font_size       %LENGTH_TYPE;           #IMPLIED
452                  font_weight     %FONT_WEIGHT_TYPE;      #IMPLIED
453                  font_italic     %BOOLEAN_TYPE;          #IMPLIED
454                  color           %UINT_TYPE;             #IMPLIED
455                  color_field     %STRING_TYPE;           #IMPLIED
456                  line_spacing    %LENGTH_TYPE;           #IMPLIED
457 >
458
459 <!ELEMENT Field EMPTY>
460 <!ATTLIST Field
461                  name            %STRING_TYPE;           #REQUIRED
462 >
463
464 <!ELEMENT NL EMPTY>