Debian Codegraph @

src/odf/attrconverters.py

raw
1 # Copyright (C) 2006-2010 Søren Roug, European Environment Agency
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 #
17 # Contributor(s):
18 #
19
20 import re
21
22 from .namespaces import (
23 ANIMNS,
24 CHARTNS,
25 CONFIGNS,
26 DR3DNS,
27 DRAWNS,
28 FONS,
29 FORMNS,
30 MANIFESTNS,
31 METANS,
32 NUMBERNS,
33 OFFICENS,
34 PRESENTATIONNS,
35 SCRIPTNS,
36 SMILNS,
37 STYLENS,
38 SVGNS,
39 TABLENS,
40 TEXTNS,
41 XFORMSNS,
42 XLINKNS,
43 )
44
45 pattern_color = re.compile(r'#[0-9a-fA-F]{6}')
46 pattern_vector3D = re.compile(r'\([ ]*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)([ ]+-?([0-9]+(\.[0-9]*)?|\.[0-9]+)){2}[ ]*\)')
47
48
49 def make_NCName(arg):
50 for c in (':', ' '):
51 arg = arg.replace(c, f'_{ord(c):x}_')
52 return arg
53
54
55 def cnv_anyURI(attribute, arg, element):
56 return str(arg)
57
58
59 def cnv_boolean(attribute, arg, element):
60 if arg.lower() in ('false', 'no'):
61 return 'false'
62 if arg:
63 return 'true'
64 return 'false'
65
66
67 # Potentially accept color values
68
69
70 def cnv_color(attribute, arg, element):
71 """A RGB color in conformance with §5.9.11 of [XSL], that is a RGB color in notation “#rrggbb”, where
72 rr, gg and bb are 8-bit hexadecimal digits.
73 """
74 return str(arg)
75
76
77 def cnv_configtype(attribute, arg, element):
78 if str(arg) not in ('boolean', 'short', 'int', 'long', 'double', 'string', 'datetime', 'base64Binary'):
79 raise ValueError(f"'{arg!s}' not allowed")
80 return str(arg)
81
82
83 def cnv_data_source_has_labels(attribute, arg, element):
84 if str(arg) not in ('none', 'row', 'column', 'both'):
85 raise ValueError(f"'{arg!s}' not allowed")
86 return str(arg)
87
88
89 # Understand different date formats
90
91
92 def cnv_date(attribute, arg, element):
93 """A dateOrDateTime value is either an [xmlschema-2] date value or an [xmlschema-2] dateTime
94 value.
95 """
96 return str(arg)
97
98
99 def cnv_dateTime(attribute, arg, element):
100 """A dateOrDateTime value is either an [xmlschema-2] date value or an [xmlschema-2] dateTime
101 value.
102 """
103 return str(arg)
104
105
106 def cnv_double(attribute, arg, element):
107 return str(arg)
108
109
110 def cnv_duration(attribute, arg, element):
111 return str(arg)
112
113
114 def cnv_family(attribute, arg, element):
115 """A style family"""
116 if str(arg) not in (
117 'text',
118 'paragraph',
119 'section',
120 'ruby',
121 'table',
122 'table-column',
123 'table-row',
124 'table-cell',
125 'graphic',
126 'presentation',
127 'drawing-page',
128 'chart',
129 ):
130 raise ValueError(f"'{arg!s}' not allowed")
131 return str(arg)
132
133
134 def __save_prefix(attribute, arg, element):
135 prefix = arg.split(':', 1)[0]
136 if prefix == arg:
137 return str(arg)
138 namespace = element.get_knownns(prefix)
139 if namespace is None:
140 # raise ValueError(f"'{str(prefix)}' is an unknown prefix")
141 return str(arg)
142 return str(arg)
143
144
145 def cnv_formula(attribute, arg, element):
146 """A string containing a formula. Formulas do not have a predefined syntax, but the string should
147 begin with a namespace prefix, followed by a “:” (COLON, U+003A) separator, followed by the text
148 of the formula. The namespace bound to the prefix determines the syntax and semantics of the
149 formula.
150 """
151 return __save_prefix(attribute, arg, element)
152
153
154 def cnv_ID(attribute, arg, element):
155 return str(arg)
156
157
158 def cnv_IDREF(attribute, arg, element):
159 return str(arg)
160
161
162 def cnv_integer(attribute, arg, element):
163 return str(arg)
164
165
166 def cnv_legend_position(attribute, arg, element):
167 if str(arg) not in ('start', 'end', 'top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end'):
168 raise ValueError(f"'{arg!s}' not allowed")
169 return str(arg)
170
171
172 pattern_length = re.compile(r'-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))')
173
174
175 def cnv_length(attribute, arg, element):
176 """A (positive or negative) physical length, consisting of magnitude and unit, in conformance with the
177 Units of Measure defined in §5.9.13 of [XSL].
178 """
179 global pattern_length
180 if not pattern_length.match(arg):
181 raise ValueError(f"'{arg}' is not a valid length")
182 return arg
183
184
185 def cnv_lengthorpercent(attribute, arg, element):
186 failed = False
187 try:
188 return cnv_length(attribute, arg, element)
189 except Exception:
190 failed = True
191 try:
192 return cnv_percent(attribute, arg, element)
193 except Exception:
194 failed = True
195 if failed:
196 raise ValueError(f"'{arg}' is not a valid length or percent")
197 return arg
198
199
200 def cnv_metavaluetype(attribute, arg, element):
201 if str(arg) not in ('float', 'date', 'time', 'boolean', 'string'):
202 raise ValueError(f"'{arg!s}' not allowed")
203 return str(arg)
204
205
206 def cnv_major_minor(attribute, arg, element):
207 if arg not in ('major', 'minor'):
208 raise ValueError(f"'{arg}' is not either 'minor' or 'major'")
209
210
211 pattern_namespacedToken = re.compile(r'[0-9a-zA-Z_]+:[0-9a-zA-Z._\-]+')
212
213
214 def cnv_namespacedToken(attribute, arg, element):
215 global pattern_namespacedToken
216
217 if not pattern_namespacedToken.match(arg):
218 raise ValueError(f"'{arg}' is not a valid namespaced token")
219 return __save_prefix(attribute, arg, element)
220
221
222 def cnv_NCName(attribute, arg, element):
223 """NCName is defined in http://www.w3.org/TR/REC-xml-names/#NT-NCName
224 Essentially an XML name minus ':'
225 """
226 if isinstance(arg, (str, bytes)):
227 return make_NCName(arg)
228 else:
229 return arg.getAttrNS(STYLENS, 'name')
230
231
232 # This function takes either an instance of a style (preferred)
233 # or a text string naming the style. If it is a text string, then it must
234 # already have been converted to an NCName
235 # The text-string argument is mainly for when we build a structure from XML
236
237
238 def cnv_StyleNameRef(attribute, arg, element):
239 try:
240 return arg.getAttrNS(STYLENS, 'name')
241 except Exception:
242 return arg
243
244
245 # This function takes either an instance of a style (preferred)
246 # or a text string naming the style. If it is a text string, then it must
247 # already have been converted to an NCName
248 # The text-string argument is mainly for when we build a structure from XML
249
250
251 def cnv_DrawNameRef(attribute, arg, element):
252 try:
253 return arg.getAttrNS(DRAWNS, 'name')
254 except Exception:
255 return arg
256
257
258 # Must accept list of Style objects
259
260
261 def cnv_NCNames(attribute, arg, element):
262 return ' '.join(arg)
263
264
265 def cnv_nonNegativeInteger(attribute, arg, element):
266 return str(arg)
267
268
269 pattern_percent = re.compile(r'-?([0-9]+(\.[0-9]*)?|\.[0-9]+)%')
270
271
272 def cnv_percent(attribute, arg, element):
273 global pattern_percent
274 if not pattern_percent.match(arg):
275 raise ValueError(f"'{arg}' is not a valid length")
276 return arg
277
278
279 # Real one doesn't allow floating point values
280 pattern_points = re.compile(r'-?[0-9]+,-?[0-9]+([ ]+-?[0-9]+,-?[0-9]+)*')
281 # pattern_points = re.compile(r'-?[0-9.]+,-?[0-9.]+([ ]+-?[0-9.]+,-?[0-9.]+)*')
282
283
284 def cnv_points(attribute, arg, element):
285 global pattern_points
286 if isinstance(arg, (str, bytes)):
287 if not pattern_points.match(arg):
288 raise ValueError('x,y are separated by a comma and the points are separated by white spaces')
289 return arg
290 else:
291 try:
292 strarg = ' '.join(['{},{}'.format(*p) for p in arg])
293 except Exception:
294 raise ValueError(f'Points must be string or [(0,0),(1,1)] - not {arg}')
295 return strarg
296
297
298 def cnv_positiveInteger(attribute, arg, element):
299 return str(arg)
300
301
302 def cnv_string(attribute, arg, element):
303 return str(arg)
304
305
306 def cnv_textnoteclass(attribute, arg, element):
307 if str(arg) not in ('footnote', 'endnote'):
308 raise ValueError(f"'{arg!s}' not allowed")
309 return str(arg)
310
311
312 # Understand different time formats
313
314
315 def cnv_time(attribute, arg, element):
316 return str(arg)
317
318
319 def cnv_token(attribute, arg, element):
320 return str(arg)
321
322
323 pattern_viewbox = re.compile(r'-?[0-9]+([ ]+-?[0-9]+){3}$')
324
325
326 def cnv_viewbox(attribute, arg, element):
327 global pattern_viewbox
328 if not pattern_viewbox.match(arg):
329 raise ValueError('viewBox must be four integers separated by whitespaces')
330 return arg
331
332
333 def cnv_xlinkshow(attribute, arg, element):
334 if str(arg) not in ('new', 'replace', 'embed'):
335 raise ValueError(f"'{arg!s}' not allowed")
336 return str(arg)
337
338
339 attrconverters = {
340 ((ANIMNS, 'audio-level'), None): cnv_double,
341 ((ANIMNS, 'color-interpolation'), None): cnv_string,
342 ((ANIMNS, 'color-interpolation-direction'), None): cnv_string,
343 ((ANIMNS, 'command'), None): cnv_string,
344 ((ANIMNS, 'formula'), None): cnv_string,
345 ((ANIMNS, 'id'), None): cnv_ID,
346 ((ANIMNS, 'iterate-interval'), None): cnv_duration,
347 ((ANIMNS, 'iterate-type'), None): cnv_string,
348 ((ANIMNS, 'name'), None): cnv_string,
349 ((ANIMNS, 'sub-item'), None): cnv_string,
350 ((ANIMNS, 'value'), None): cnv_string,
351 # ((DBNS,'type'), None): cnv_namespacedToken,
352 ((CHARTNS, 'attached-axis'), None): cnv_string,
353 ((CHARTNS, 'class'), (CHARTNS, 'grid')): cnv_major_minor,
354 ((CHARTNS, 'class'), None): cnv_namespacedToken,
355 ((CHARTNS, 'column-mapping'), None): cnv_string,
356 ((CHARTNS, 'connect-bars'), None): cnv_boolean,
357 ((CHARTNS, 'data-label-number'), None): cnv_string,
358 ((CHARTNS, 'data-label-symbol'), None): cnv_boolean,
359 ((CHARTNS, 'data-label-text'), None): cnv_boolean,
360 ((CHARTNS, 'data-source-has-labels'), None): cnv_data_source_has_labels,
361 ((CHARTNS, 'deep'), None): cnv_boolean,
362 ((CHARTNS, 'dimension'), None): cnv_string,
363 ((CHARTNS, 'display-label'), None): cnv_boolean,
364 ((CHARTNS, 'error-category'), None): cnv_string,
365 ((CHARTNS, 'error-lower-indicator'), None): cnv_boolean,
366 ((CHARTNS, 'error-lower-limit'), None): cnv_string,
367 ((CHARTNS, 'error-margin'), None): cnv_string,
368 ((CHARTNS, 'error-percentage'), None): cnv_string,
369 ((CHARTNS, 'error-upper-indicator'), None): cnv_boolean,
370 ((CHARTNS, 'error-upper-limit'), None): cnv_string,
371 ((CHARTNS, 'gap-width'), None): cnv_string,
372 ((CHARTNS, 'interpolation'), None): cnv_string,
373 ((CHARTNS, 'interval-major'), None): cnv_string,
374 ((CHARTNS, 'interval-minor-divisor'), None): cnv_string,
375 ((CHARTNS, 'japanese-candle-stick'), None): cnv_boolean,
376 ((CHARTNS, 'label-arrangement'), None): cnv_string,
377 ((CHARTNS, 'label-cell-address'), None): cnv_string,
378 ((CHARTNS, 'legend-align'), None): cnv_string,
379 ((CHARTNS, 'legend-position'), None): cnv_legend_position,
380 ((CHARTNS, 'lines'), None): cnv_boolean,
381 ((CHARTNS, 'link-data-style-to-source'), None): cnv_boolean,
382 ((CHARTNS, 'logarithmic'), None): cnv_boolean,
383 ((CHARTNS, 'maximum'), None): cnv_string,
384 ((CHARTNS, 'mean-value'), None): cnv_boolean,
385 ((CHARTNS, 'minimum'), None): cnv_string,
386 ((CHARTNS, 'name'), None): cnv_string,
387 ((CHARTNS, 'origin'), None): cnv_string,
388 ((CHARTNS, 'overlap'), None): cnv_string,
389 ((CHARTNS, 'percentage'), None): cnv_boolean,
390 ((CHARTNS, 'pie-offset'), None): cnv_string,
391 ((CHARTNS, 'regression-type'), None): cnv_string,
392 ((CHARTNS, 'repeated'), None): cnv_nonNegativeInteger,
393 ((CHARTNS, 'row-mapping'), None): cnv_string,
394 ((CHARTNS, 'scale-text'), None): cnv_boolean,
395 ((CHARTNS, 'series-source'), None): cnv_string,
396 ((CHARTNS, 'solid-type'), None): cnv_string,
397 ((CHARTNS, 'spline-order'), None): cnv_string,
398 ((CHARTNS, 'spline-resolution'), None): cnv_string,
399 ((CHARTNS, 'stacked'), None): cnv_boolean,
400 ((CHARTNS, 'style-name'), None): cnv_StyleNameRef,
401 ((CHARTNS, 'symbol-height'), None): cnv_string,
402 ((CHARTNS, 'symbol-name'), None): cnv_string,
403 ((CHARTNS, 'symbol-type'), None): cnv_string,
404 ((CHARTNS, 'symbol-width'), None): cnv_string,
405 ((CHARTNS, 'text-overlap'), None): cnv_boolean,
406 ((CHARTNS, 'three-dimensional'), None): cnv_boolean,
407 ((CHARTNS, 'tick-marks-major-inner'), None): cnv_boolean,
408 ((CHARTNS, 'tick-marks-major-outer'), None): cnv_boolean,
409 ((CHARTNS, 'tick-marks-minor-inner'), None): cnv_boolean,
410 ((CHARTNS, 'tick-marks-minor-outer'), None): cnv_boolean,
411 ((CHARTNS, 'values-cell-range-address'), None): cnv_string,
412 ((CHARTNS, 'vertical'), None): cnv_boolean,
413 ((CHARTNS, 'visible'), None): cnv_boolean,
414 ((CONFIGNS, 'name'), None): cnv_formula,
415 ((CONFIGNS, 'type'), None): cnv_configtype,
416 ((DR3DNS, 'ambient-color'), None): cnv_string,
417 ((DR3DNS, 'back-scale'), None): cnv_string,
418 ((DR3DNS, 'backface-culling'), None): cnv_string,
419 ((DR3DNS, 'center'), None): cnv_string,
420 ((DR3DNS, 'close-back'), None): cnv_boolean,
421 ((DR3DNS, 'close-front'), None): cnv_boolean,
422 ((DR3DNS, 'depth'), None): cnv_length,
423 ((DR3DNS, 'diffuse-color'), None): cnv_string,
424 ((DR3DNS, 'direction'), None): cnv_string,
425 ((DR3DNS, 'distance'), None): cnv_length,
426 ((DR3DNS, 'edge-rounding'), None): cnv_string,
427 ((DR3DNS, 'edge-rounding-mode'), None): cnv_string,
428 ((DR3DNS, 'emissive-color'), None): cnv_string,
429 ((DR3DNS, 'enabled'), None): cnv_boolean,
430 ((DR3DNS, 'end-angle'), None): cnv_string,
431 ((DR3DNS, 'focal-length'), None): cnv_length,
432 ((DR3DNS, 'horizontal-segments'), None): cnv_string,
433 ((DR3DNS, 'lighting-mode'), None): cnv_boolean,
434 ((DR3DNS, 'max-edge'), None): cnv_string,
435 ((DR3DNS, 'min-edge'), None): cnv_string,
436 ((DR3DNS, 'normals-direction'), None): cnv_string,
437 ((DR3DNS, 'normals-kind'), None): cnv_string,
438 ((DR3DNS, 'projection'), None): cnv_string,
439 ((DR3DNS, 'shade-mode'), None): cnv_string,
440 ((DR3DNS, 'shadow'), None): cnv_string,
441 ((DR3DNS, 'shadow-slant'), None): cnv_nonNegativeInteger,
442 ((DR3DNS, 'shininess'), None): cnv_string,
443 ((DR3DNS, 'size'), None): cnv_string,
444 ((DR3DNS, 'specular'), None): cnv_boolean,
445 ((DR3DNS, 'specular-color'), None): cnv_string,
446 ((DR3DNS, 'texture-filter'), None): cnv_string,
447 ((DR3DNS, 'texture-generation-mode-x'), None): cnv_string,
448 ((DR3DNS, 'texture-generation-mode-y'), None): cnv_string,
449 ((DR3DNS, 'texture-kind'), None): cnv_string,
450 ((DR3DNS, 'texture-mode'), None): cnv_string,
451 ((DR3DNS, 'transform'), None): cnv_string,
452 ((DR3DNS, 'vertical-segments'), None): cnv_string,
453 ((DR3DNS, 'vpn'), None): cnv_string,
454 ((DR3DNS, 'vrp'), None): cnv_string,
455 ((DR3DNS, 'vup'), None): cnv_string,
456 ((DRAWNS, 'align'), None): cnv_string,
457 ((DRAWNS, 'angle'), None): cnv_integer,
458 ((DRAWNS, 'archive'), None): cnv_string,
459 ((DRAWNS, 'auto-grow-height'), None): cnv_boolean,
460 ((DRAWNS, 'auto-grow-width'), None): cnv_boolean,
461 ((DRAWNS, 'background-size'), None): cnv_string,
462 ((DRAWNS, 'blue'), None): cnv_string,
463 ((DRAWNS, 'border'), None): cnv_string,
464 ((DRAWNS, 'caption-angle'), None): cnv_string,
465 ((DRAWNS, 'caption-angle-type'), None): cnv_string,
466 ((DRAWNS, 'caption-escape'), None): cnv_string,
467 ((DRAWNS, 'caption-escape-direction'), None): cnv_string,
468 ((DRAWNS, 'caption-fit-line-length'), None): cnv_boolean,
469 ((DRAWNS, 'caption-gap'), None): cnv_string,
470 ((DRAWNS, 'caption-line-length'), None): cnv_length,
471 ((DRAWNS, 'caption-point-x'), None): cnv_string,
472 ((DRAWNS, 'caption-point-y'), None): cnv_string,
473 ((DRAWNS, 'caption-id'), None): cnv_IDREF,
474 ((DRAWNS, 'caption-type'), None): cnv_string,
475 ((DRAWNS, 'chain-next-name'), None): cnv_string,
476 ((DRAWNS, 'class-id'), None): cnv_string,
477 ((DRAWNS, 'class-names'), None): cnv_NCNames,
478 ((DRAWNS, 'code'), None): cnv_string,
479 ((DRAWNS, 'color'), None): cnv_string,
480 ((DRAWNS, 'color-inversion'), None): cnv_boolean,
481 ((DRAWNS, 'color-mode'), None): cnv_string,
482 ((DRAWNS, 'concave'), None): cnv_string,
483 ((DRAWNS, 'concentric-gradient-fill-allowed'), None): cnv_boolean,
484 ((DRAWNS, 'contrast'), None): cnv_string,
485 ((DRAWNS, 'control'), None): cnv_IDREF,
486 ((DRAWNS, 'copy-of'), None): cnv_string,
487 ((DRAWNS, 'corner-radius'), None): cnv_length,
488 ((DRAWNS, 'corners'), None): cnv_positiveInteger,
489 ((DRAWNS, 'cx'), None): cnv_string,
490 ((DRAWNS, 'cy'), None): cnv_string,
491 ((DRAWNS, 'data'), None): cnv_string,
492 ((DRAWNS, 'decimal-places'), None): cnv_string,
493 ((DRAWNS, 'display'), None): cnv_string,
494 ((DRAWNS, 'display-name'), None): cnv_string,
495 ((DRAWNS, 'distance'), None): cnv_lengthorpercent,
496 ((DRAWNS, 'dots1'), None): cnv_integer,
497 ((DRAWNS, 'dots1-length'), None): cnv_lengthorpercent,
498 ((DRAWNS, 'dots2'), None): cnv_integer,
499 ((DRAWNS, 'dots2-length'), None): cnv_lengthorpercent,
500 ((DRAWNS, 'end-angle'), None): cnv_double,
501 ((DRAWNS, 'end'), None): cnv_string,
502 ((DRAWNS, 'end-color'), None): cnv_string,
503 ((DRAWNS, 'end-glue-point'), None): cnv_nonNegativeInteger,
504 ((DRAWNS, 'end-guide'), None): cnv_length,
505 ((DRAWNS, 'end-intensity'), None): cnv_string,
506 ((DRAWNS, 'end-line-spacing-horizontal'), None): cnv_string,
507 ((DRAWNS, 'end-line-spacing-vertical'), None): cnv_string,
508 ((DRAWNS, 'end-shape'), None): cnv_IDREF,
509 ((DRAWNS, 'engine'), None): cnv_namespacedToken,
510 ((DRAWNS, 'enhanced-path'), None): cnv_string,
511 ((DRAWNS, 'escape-direction'), None): cnv_string,
512 ((DRAWNS, 'extrusion-allowed'), None): cnv_boolean,
513 ((DRAWNS, 'extrusion-brightness'), None): cnv_string,
514 ((DRAWNS, 'extrusion'), None): cnv_boolean,
515 ((DRAWNS, 'extrusion-color'), None): cnv_boolean,
516 ((DRAWNS, 'extrusion-depth'), None): cnv_double,
517 ((DRAWNS, 'extrusion-diffusion'), None): cnv_string,
518 ((DRAWNS, 'extrusion-first-light-direction'), None): cnv_string,
519 ((DRAWNS, 'extrusion-first-light-harsh'), None): cnv_boolean,
520 ((DRAWNS, 'extrusion-first-light-level'), None): cnv_string,
521 ((DRAWNS, 'extrusion-light-face'), None): cnv_boolean,
522 ((DRAWNS, 'extrusion-metal'), None): cnv_boolean,
523 ((DRAWNS, 'extrusion-number-of-line-segments'), None): cnv_integer,
524 ((DRAWNS, 'extrusion-origin'), None): cnv_double,
525 ((DRAWNS, 'extrusion-rotation-angle'), None): cnv_double,
526 ((DRAWNS, 'extrusion-rotation-center'), None): cnv_string,
527 ((DRAWNS, 'extrusion-second-light-direction'), None): cnv_string,
528 ((DRAWNS, 'extrusion-second-light-harsh'), None): cnv_boolean,
529 ((DRAWNS, 'extrusion-second-light-level'), None): cnv_string,
530 ((DRAWNS, 'extrusion-shininess'), None): cnv_string,
531 ((DRAWNS, 'extrusion-skew'), None): cnv_double,
532 ((DRAWNS, 'extrusion-specularity'), None): cnv_string,
533 ((DRAWNS, 'extrusion-viewpoint'), None): cnv_string,
534 ((DRAWNS, 'fill'), None): cnv_string,
535 ((DRAWNS, 'fill-color'), None): cnv_string,
536 ((DRAWNS, 'fill-gradient-name'), None): cnv_string,
537 ((DRAWNS, 'fill-hatch-name'), None): cnv_string,
538 ((DRAWNS, 'fill-hatch-solid'), None): cnv_boolean,
539 ((DRAWNS, 'fill-image-height'), None): cnv_lengthorpercent,
540 ((DRAWNS, 'fill-image-name'), None): cnv_DrawNameRef,
541 ((DRAWNS, 'fill-image-ref-point'), None): cnv_string,
542 ((DRAWNS, 'fill-image-ref-point-x'), None): cnv_string,
543 ((DRAWNS, 'fill-image-ref-point-y'), None): cnv_string,
544 ((DRAWNS, 'fill-image-width'), None): cnv_lengthorpercent,
545 ((DRAWNS, 'filter-name'), None): cnv_string,
546 ((DRAWNS, 'fit-to-contour'), None): cnv_boolean,
547 ((DRAWNS, 'fit-to-size'), None): cnv_boolean,
548 ((DRAWNS, 'formula'), None): cnv_string,
549 ((DRAWNS, 'frame-display-border'), None): cnv_boolean,
550 ((DRAWNS, 'frame-display-scrollbar'), None): cnv_boolean,
551 ((DRAWNS, 'frame-margin-horizontal'), None): cnv_string,
552 ((DRAWNS, 'frame-margin-vertical'), None): cnv_string,
553 ((DRAWNS, 'frame-name'), None): cnv_string,
554 ((DRAWNS, 'gamma'), None): cnv_string,
555 ((DRAWNS, 'glue-point-leaving-directions'), None): cnv_string,
556 ((DRAWNS, 'glue-point-type'), None): cnv_string,
557 ((DRAWNS, 'glue-points'), None): cnv_string,
558 ((DRAWNS, 'gradient-step-count'), None): cnv_string,
559 ((DRAWNS, 'green'), None): cnv_string,
560 ((DRAWNS, 'guide-distance'), None): cnv_string,
561 ((DRAWNS, 'guide-overhang'), None): cnv_length,
562 ((DRAWNS, 'handle-mirror-horizontal'), None): cnv_boolean,
563 ((DRAWNS, 'handle-mirror-vertical'), None): cnv_boolean,
564 ((DRAWNS, 'handle-polar'), None): cnv_string,
565 ((DRAWNS, 'handle-position'), None): cnv_string,
566 ((DRAWNS, 'handle-radius-range-maximum'), None): cnv_string,
567 ((DRAWNS, 'handle-radius-range-minimum'), None): cnv_string,
568 ((DRAWNS, 'handle-range-x-maximum'), None): cnv_string,
569 ((DRAWNS, 'handle-range-x-minimum'), None): cnv_string,
570 ((DRAWNS, 'handle-range-y-maximum'), None): cnv_string,
571 ((DRAWNS, 'handle-range-y-minimum'), None): cnv_string,
572 ((DRAWNS, 'handle-switched'), None): cnv_boolean,
573 # ((DRAWNS,'id'), None): cnv_ID,
574 # ((DRAWNS,'id'), None): cnv_nonNegativeInteger, # ?? line 6581 in RNG
575 ((DRAWNS, 'id'), None): cnv_string,
576 ((DRAWNS, 'image-opacity'), None): cnv_string,
577 ((DRAWNS, 'kind'), None): cnv_string,
578 ((DRAWNS, 'layer'), None): cnv_string,
579 ((DRAWNS, 'line-distance'), None): cnv_string,
580 ((DRAWNS, 'line-skew'), None): cnv_string,
581 ((DRAWNS, 'luminance'), None): cnv_string,
582 ((DRAWNS, 'marker-end-center'), None): cnv_boolean,
583 ((DRAWNS, 'marker-end'), None): cnv_string,
584 ((DRAWNS, 'marker-end-width'), None): cnv_length,
585 ((DRAWNS, 'marker-start-center'), None): cnv_boolean,
586 ((DRAWNS, 'marker-start'), None): cnv_string,
587 ((DRAWNS, 'marker-start-width'), None): cnv_length,
588 ((DRAWNS, 'master-page-name'), None): cnv_StyleNameRef,
589 ((DRAWNS, 'may-script'), None): cnv_boolean,
590 ((DRAWNS, 'measure-align'), None): cnv_string,
591 ((DRAWNS, 'measure-vertical-align'), None): cnv_string,
592 ((DRAWNS, 'mime-type'), None): cnv_string,
593 ((DRAWNS, 'mirror-horizontal'), None): cnv_boolean,
594 ((DRAWNS, 'mirror-vertical'), None): cnv_boolean,
595 ((DRAWNS, 'modifiers'), None): cnv_string,
596 ((DRAWNS, 'name'), None): cnv_NCName,
597 # ((DRAWNS,'name'), None): cnv_string,
598 ((DRAWNS, 'nav-order'), None): cnv_IDREF,
599 ((DRAWNS, 'nohref'), None): cnv_string,
600 ((DRAWNS, 'notify-on-update-of-ranges'), None): cnv_string,
601 ((DRAWNS, 'object'), None): cnv_string,
602 ((DRAWNS, 'ole-draw-aspect'), None): cnv_string,
603 ((DRAWNS, 'opacity'), None): cnv_string,
604 ((DRAWNS, 'opacity-name'), None): cnv_string,
605 ((DRAWNS, 'page-number'), None): cnv_positiveInteger,
606 ((DRAWNS, 'parallel'), None): cnv_boolean,
607 ((DRAWNS, 'path-stretchpoint-x'), None): cnv_double,
608 ((DRAWNS, 'path-stretchpoint-y'), None): cnv_double,
609 ((DRAWNS, 'placing'), None): cnv_string,
610 ((DRAWNS, 'points'), None): cnv_points,
611 ((DRAWNS, 'protected'), None): cnv_boolean,
612 ((DRAWNS, 'recreate-on-edit'), None): cnv_boolean,
613 ((DRAWNS, 'red'), None): cnv_string,
614 ((DRAWNS, 'rotation'), None): cnv_integer,
615 ((DRAWNS, 'secondary-fill-color'), None): cnv_string,
616 ((DRAWNS, 'shadow'), None): cnv_string,
617 ((DRAWNS, 'shadow-color'), None): cnv_string,
618 ((DRAWNS, 'shadow-offset-x'), None): cnv_length,
619 ((DRAWNS, 'shadow-offset-y'), None): cnv_length,
620 ((DRAWNS, 'shadow-opacity'), None): cnv_string,
621 ((DRAWNS, 'shape-id'), None): cnv_IDREF,
622 ((DRAWNS, 'sharpness'), None): cnv_string,
623 ((DRAWNS, 'show-unit'), None): cnv_boolean,
624 ((DRAWNS, 'start-angle'), None): cnv_double,
625 ((DRAWNS, 'start'), None): cnv_string,
626 ((DRAWNS, 'start-color'), None): cnv_string,
627 ((DRAWNS, 'start-glue-point'), None): cnv_nonNegativeInteger,
628 ((DRAWNS, 'start-guide'), None): cnv_length,
629 ((DRAWNS, 'start-intensity'), None): cnv_string,
630 ((DRAWNS, 'start-line-spacing-horizontal'), None): cnv_string,
631 ((DRAWNS, 'start-line-spacing-vertical'), None): cnv_string,
632 ((DRAWNS, 'start-shape'), None): cnv_IDREF,
633 ((DRAWNS, 'stroke'), None): cnv_string,
634 ((DRAWNS, 'stroke-dash'), None): cnv_string,
635 ((DRAWNS, 'stroke-dash-names'), None): cnv_string,
636 ((DRAWNS, 'stroke-linejoin'), None): cnv_string,
637 ((DRAWNS, 'style'), None): cnv_string,
638 ((DRAWNS, 'style-name'), None): cnv_StyleNameRef,
639 ((DRAWNS, 'symbol-color'), None): cnv_string,
640 ((DRAWNS, 'text-areas'), None): cnv_string,
641 ((DRAWNS, 'text-path-allowed'), None): cnv_boolean,
642 ((DRAWNS, 'text-path'), None): cnv_boolean,
643 ((DRAWNS, 'text-path-mode'), None): cnv_string,
644 ((DRAWNS, 'text-path-same-letter-heights'), None): cnv_boolean,
645 ((DRAWNS, 'text-path-scale'), None): cnv_string,
646 ((DRAWNS, 'text-rotate-angle'), None): cnv_double,
647 ((DRAWNS, 'text-style-name'), None): cnv_StyleNameRef,
648 ((DRAWNS, 'textarea-horizontal-align'), None): cnv_string,
649 ((DRAWNS, 'textarea-vertical-align'), None): cnv_string,
650 ((DRAWNS, 'tile-repeat-offset'), None): cnv_string,
651 ((DRAWNS, 'transform'), None): cnv_string,
652 ((DRAWNS, 'type'), None): cnv_string,
653 ((DRAWNS, 'unit'), None): cnv_string,
654 ((DRAWNS, 'value'), None): cnv_string,
655 ((DRAWNS, 'visible-area-height'), None): cnv_string,
656 ((DRAWNS, 'visible-area-left'), None): cnv_string,
657 ((DRAWNS, 'visible-area-top'), None): cnv_string,
658 ((DRAWNS, 'visible-area-width'), None): cnv_string,
659 ((DRAWNS, 'wrap-influence-on-position'), None): cnv_string,
660 ((DRAWNS, 'z-index'), None): cnv_nonNegativeInteger,
661 ((FONS, 'background-color'), None): cnv_string,
662 ((FONS, 'border-bottom'), None): cnv_string,
663 ((FONS, 'border'), None): cnv_string,
664 ((FONS, 'border-left'), None): cnv_string,
665 ((FONS, 'border-right'), None): cnv_string,
666 ((FONS, 'border-top'), None): cnv_string,
667 ((FONS, 'break-after'), None): cnv_string,
668 ((FONS, 'break-before'), None): cnv_string,
669 ((FONS, 'clip'), None): cnv_string,
670 ((FONS, 'color'), None): cnv_string,
671 ((FONS, 'column-count'), None): cnv_positiveInteger,
672 ((FONS, 'column-gap'), None): cnv_length,
673 ((FONS, 'country'), None): cnv_token,
674 ((FONS, 'end-indent'), None): cnv_length,
675 ((FONS, 'font-family'), None): cnv_string,
676 ((FONS, 'font-size'), None): cnv_string,
677 ((FONS, 'font-style'), None): cnv_string,
678 ((FONS, 'font-variant'), None): cnv_string,
679 ((FONS, 'font-weight'), None): cnv_string,
680 ((FONS, 'height'), None): cnv_string,
681 ((FONS, 'hyphenate'), None): cnv_boolean,
682 ((FONS, 'hyphenation-keep'), None): cnv_string,
683 ((FONS, 'hyphenation-ladder-count'), None): cnv_string,
684 ((FONS, 'hyphenation-push-char-count'), None): cnv_string,
685 ((FONS, 'hyphenation-remain-char-count'), None): cnv_string,
686 ((FONS, 'keep-together'), None): cnv_string,
687 ((FONS, 'keep-with-next'), None): cnv_string,
688 ((FONS, 'language'), None): cnv_token,
689 ((FONS, 'letter-spacing'), None): cnv_string,
690 ((FONS, 'line-height'), None): cnv_string,
691 ((FONS, 'margin-bottom'), None): cnv_string,
692 ((FONS, 'margin'), None): cnv_string,
693 ((FONS, 'margin-left'), None): cnv_string,
694 ((FONS, 'margin-right'), None): cnv_string,
695 ((FONS, 'margin-top'), None): cnv_string,
696 ((FONS, 'max-height'), None): cnv_string,
697 ((FONS, 'max-width'), None): cnv_string,
698 ((FONS, 'min-height'), None): cnv_lengthorpercent,
699 ((FONS, 'min-width'), None): cnv_string,
700 ((FONS, 'orphans'), None): cnv_string,
701 ((FONS, 'padding-bottom'), None): cnv_string,
702 ((FONS, 'padding'), None): cnv_string,
703 ((FONS, 'padding-left'), None): cnv_string,
704 ((FONS, 'padding-right'), None): cnv_string,
705 ((FONS, 'padding-top'), None): cnv_string,
706 ((FONS, 'page-height'), None): cnv_length,
707 ((FONS, 'page-width'), None): cnv_length,
708 ((FONS, 'space-after'), None): cnv_length,
709 ((FONS, 'space-before'), None): cnv_length,
710 ((FONS, 'start-indent'), None): cnv_length,
711 ((FONS, 'text-align'), None): cnv_string,
712 ((FONS, 'text-align-last'), None): cnv_string,
713 ((FONS, 'text-indent'), None): cnv_string,
714 ((FONS, 'text-shadow'), None): cnv_string,
715 ((FONS, 'text-transform'), None): cnv_string,
716 ((FONS, 'widows'), None): cnv_string,
717 ((FONS, 'width'), None): cnv_string,
718 ((FONS, 'wrap-option'), None): cnv_string,
719 ((FORMNS, 'allow-deletes'), None): cnv_boolean,
720 ((FORMNS, 'allow-inserts'), None): cnv_boolean,
721 ((FORMNS, 'allow-updates'), None): cnv_boolean,
722 ((FORMNS, 'apply-design-mode'), None): cnv_boolean,
723 ((FORMNS, 'apply-filter'), None): cnv_boolean,
724 ((FORMNS, 'auto-complete'), None): cnv_boolean,
725 ((FORMNS, 'automatic-focus'), None): cnv_boolean,
726 ((FORMNS, 'bound-column'), None): cnv_string,
727 ((FORMNS, 'button-type'), None): cnv_string,
728 ((FORMNS, 'command'), None): cnv_string,
729 ((FORMNS, 'command-type'), None): cnv_string,
730 ((FORMNS, 'control-implementation'), None): cnv_namespacedToken,
731 ((FORMNS, 'convert-empty-to-null'), None): cnv_boolean,
732 ((FORMNS, 'current-selected'), None): cnv_boolean,
733 ((FORMNS, 'current-state'), None): cnv_string,
734 # ((FORMNS,'current-value'), None): cnv_date,
735 # ((FORMNS,'current-value'), None): cnv_double,
736 ((FORMNS, 'current-value'), None): cnv_string,
737 # ((FORMNS,'current-value'), None): cnv_time,
738 ((FORMNS, 'data-field'), None): cnv_string,
739 ((FORMNS, 'datasource'), None): cnv_string,
740 ((FORMNS, 'default-button'), None): cnv_boolean,
741 ((FORMNS, 'delay-for-repeat'), None): cnv_duration,
742 ((FORMNS, 'detail-fields'), None): cnv_string,
743 ((FORMNS, 'disabled'), None): cnv_boolean,
744 ((FORMNS, 'dropdown'), None): cnv_boolean,
745 ((FORMNS, 'echo-char'), None): cnv_string,
746 ((FORMNS, 'enctype'), None): cnv_string,
747 ((FORMNS, 'escape-processing'), None): cnv_boolean,
748 ((FORMNS, 'filter'), None): cnv_string,
749 ((FORMNS, 'focus-on-click'), None): cnv_boolean,
750 ((FORMNS, 'for'), None): cnv_string,
751 ((FORMNS, 'id'), None): cnv_ID,
752 ((FORMNS, 'ignore-result'), None): cnv_boolean,
753 ((FORMNS, 'image-align'), None): cnv_string,
754 ((FORMNS, 'image-data'), None): cnv_anyURI,
755 ((FORMNS, 'image-position'), None): cnv_string,
756 ((FORMNS, 'is-tristate'), None): cnv_boolean,
757 ((FORMNS, 'label'), None): cnv_string,
758 ((FORMNS, 'list-source'), None): cnv_string,
759 ((FORMNS, 'list-source-type'), None): cnv_string,
760 ((FORMNS, 'master-fields'), None): cnv_string,
761 ((FORMNS, 'max-length'), None): cnv_nonNegativeInteger,
762 # ((FORMNS,'max-value'), None): cnv_date,
763 # ((FORMNS,'max-value'), None): cnv_double,
764 ((FORMNS, 'max-value'), None): cnv_string,
765 # ((FORMNS,'max-value'), None): cnv_time,
766 ((FORMNS, 'method'), None): cnv_string,
767 # ((FORMNS,'min-value'), None): cnv_date,
768 # ((FORMNS,'min-value'), None): cnv_double,
769 ((FORMNS, 'min-value'), None): cnv_string,
770 # ((FORMNS,'min-value'), None): cnv_time,
771 ((FORMNS, 'multi-line'), None): cnv_boolean,
772 ((FORMNS, 'multiple'), None): cnv_boolean,
773 ((FORMNS, 'name'), None): cnv_string,
774 ((FORMNS, 'navigation-mode'), None): cnv_string,
775 ((FORMNS, 'order'), None): cnv_string,
776 ((FORMNS, 'orientation'), None): cnv_string,
777 ((FORMNS, 'page-step-size'), None): cnv_positiveInteger,
778 ((FORMNS, 'printable'), None): cnv_boolean,
779 ((FORMNS, 'property-name'), None): cnv_string,
780 ((FORMNS, 'readonly'), None): cnv_boolean,
781 ((FORMNS, 'selected'), None): cnv_boolean,
782 ((FORMNS, 'size'), None): cnv_nonNegativeInteger,
783 ((FORMNS, 'state'), None): cnv_string,
784 ((FORMNS, 'step-size'), None): cnv_positiveInteger,
785 ((FORMNS, 'tab-cycle'), None): cnv_string,
786 ((FORMNS, 'tab-index'), None): cnv_nonNegativeInteger,
787 ((FORMNS, 'tab-stop'), None): cnv_boolean,
788 ((FORMNS, 'text-style-name'), None): cnv_StyleNameRef,
789 ((FORMNS, 'title'), None): cnv_string,
790 ((FORMNS, 'toggle'), None): cnv_boolean,
791 ((FORMNS, 'validation'), None): cnv_boolean,
792 # ((FORMNS,'value'), None): cnv_date,
793 # ((FORMNS,'value'), None): cnv_double,
794 ((FORMNS, 'value'), None): cnv_string,
795 # ((FORMNS,'value'), None): cnv_time,
796 ((FORMNS, 'visual-effect'), None): cnv_string,
797 ((FORMNS, 'xforms-list-source'), None): cnv_string,
798 ((FORMNS, 'xforms-submission'), None): cnv_string,
799 ((MANIFESTNS, 'algorithm-name'), None): cnv_string,
800 ((MANIFESTNS, 'checksum'), None): cnv_string,
801 ((MANIFESTNS, 'checksum-type'), None): cnv_string,
802 ((MANIFESTNS, 'full-path'), None): cnv_string,
803 ((MANIFESTNS, 'initialisation-vector'), None): cnv_string,
804 ((MANIFESTNS, 'iteration-count'), None): cnv_nonNegativeInteger,
805 ((MANIFESTNS, 'key-derivation-name'), None): cnv_string,
806 ((MANIFESTNS, 'media-type'), None): cnv_string,
807 ((MANIFESTNS, 'salt'), None): cnv_string,
808 ((MANIFESTNS, 'size'), None): cnv_nonNegativeInteger,
809 ((METANS, 'cell-count'), None): cnv_nonNegativeInteger,
810 ((METANS, 'character-count'), None): cnv_nonNegativeInteger,
811 ((METANS, 'date'), None): cnv_dateTime,
812 ((METANS, 'delay'), None): cnv_duration,
813 ((METANS, 'draw-count'), None): cnv_nonNegativeInteger,
814 ((METANS, 'frame-count'), None): cnv_nonNegativeInteger,
815 ((METANS, 'image-count'), None): cnv_nonNegativeInteger,
816 ((METANS, 'name'), None): cnv_string,
817 ((METANS, 'non-whitespace-character-count'), None): cnv_nonNegativeInteger,
818 ((METANS, 'object-count'), None): cnv_nonNegativeInteger,
819 ((METANS, 'ole-object-count'), None): cnv_nonNegativeInteger,
820 ((METANS, 'page-count'), None): cnv_nonNegativeInteger,
821 ((METANS, 'paragraph-count'), None): cnv_nonNegativeInteger,
822 ((METANS, 'row-count'), None): cnv_nonNegativeInteger,
823 ((METANS, 'sentence-count'), None): cnv_nonNegativeInteger,
824 ((METANS, 'syllable-count'), None): cnv_nonNegativeInteger,
825 ((METANS, 'table-count'), None): cnv_nonNegativeInteger,
826 ((METANS, 'value-type'), None): cnv_metavaluetype,
827 ((METANS, 'word-count'), None): cnv_nonNegativeInteger,
828 ((NUMBERNS, 'automatic-order'), None): cnv_boolean,
829 ((NUMBERNS, 'calendar'), None): cnv_string,
830 ((NUMBERNS, 'country'), None): cnv_token,
831 ((NUMBERNS, 'decimal-places'), None): cnv_integer,
832 ((NUMBERNS, 'decimal-replacement'), None): cnv_string,
833 ((NUMBERNS, 'denominator-value'), None): cnv_integer,
834 ((NUMBERNS, 'display-factor'), None): cnv_double,
835 ((NUMBERNS, 'format-source'), None): cnv_string,
836 ((NUMBERNS, 'grouping'), None): cnv_boolean,
837 ((NUMBERNS, 'language'), None): cnv_token,
838 ((NUMBERNS, 'min-denominator-digits'), None): cnv_integer,
839 ((NUMBERNS, 'min-exponent-digits'), None): cnv_integer,
840 ((NUMBERNS, 'min-integer-digits'), None): cnv_integer,
841 ((NUMBERNS, 'min-numerator-digits'), None): cnv_integer,
842 ((NUMBERNS, 'position'), None): cnv_integer,
843 ((NUMBERNS, 'possessive-form'), None): cnv_boolean,
844 ((NUMBERNS, 'style'), None): cnv_string,
845 ((NUMBERNS, 'textual'), None): cnv_boolean,
846 ((NUMBERNS, 'title'), None): cnv_string,
847 ((NUMBERNS, 'transliteration-country'), None): cnv_token,
848 ((NUMBERNS, 'transliteration-format'), None): cnv_string,
849 ((NUMBERNS, 'transliteration-language'), None): cnv_token,
850 ((NUMBERNS, 'transliteration-style'), None): cnv_string,
851 ((NUMBERNS, 'truncate-on-overflow'), None): cnv_boolean,
852 ((OFFICENS, 'automatic-update'), None): cnv_boolean,
853 ((OFFICENS, 'boolean-value'), None): cnv_boolean,
854 ((OFFICENS, 'conversion-mode'), None): cnv_string,
855 ((OFFICENS, 'currency'), None): cnv_string,
856 ((OFFICENS, 'date-value'), None): cnv_dateTime,
857 ((OFFICENS, 'dde-application'), None): cnv_string,
858 ((OFFICENS, 'dde-item'), None): cnv_string,
859 ((OFFICENS, 'dde-topic'), None): cnv_string,
860 ((OFFICENS, 'display'), None): cnv_boolean,
861 ((OFFICENS, 'mimetype'), None): cnv_string,
862 ((OFFICENS, 'name'), None): cnv_string,
863 ((OFFICENS, 'process-content'), None): cnv_boolean,
864 ((OFFICENS, 'server-map'), None): cnv_boolean,
865 ((OFFICENS, 'string-value'), None): cnv_string,
866 ((OFFICENS, 'target-frame'), None): cnv_string,
867 ((OFFICENS, 'target-frame-name'), None): cnv_string,
868 ((OFFICENS, 'time-value'), None): cnv_duration,
869 ((OFFICENS, 'title'), None): cnv_string,
870 ((OFFICENS, 'value'), None): cnv_double,
871 ((OFFICENS, 'value-type'), None): cnv_string,
872 ((OFFICENS, 'version'), None): cnv_string,
873 ((PRESENTATIONNS, 'action'), None): cnv_string,
874 ((PRESENTATIONNS, 'animations'), None): cnv_string,
875 ((PRESENTATIONNS, 'background-objects-visible'), None): cnv_boolean,
876 ((PRESENTATIONNS, 'background-visible'), None): cnv_boolean,
877 ((PRESENTATIONNS, 'class'), None): cnv_string,
878 ((PRESENTATIONNS, 'class-names'), None): cnv_NCNames,
879 ((PRESENTATIONNS, 'delay'), None): cnv_duration,
880 ((PRESENTATIONNS, 'direction'), None): cnv_string,
881 ((PRESENTATIONNS, 'display-date-time'), None): cnv_boolean,
882 ((PRESENTATIONNS, 'display-footer'), None): cnv_boolean,
883 ((PRESENTATIONNS, 'display-header'), None): cnv_boolean,
884 ((PRESENTATIONNS, 'display-page-number'), None): cnv_boolean,
885 ((PRESENTATIONNS, 'duration'), None): cnv_string,
886 ((PRESENTATIONNS, 'effect'), None): cnv_string,
887 ((PRESENTATIONNS, 'endless'), None): cnv_boolean,
888 ((PRESENTATIONNS, 'force-manual'), None): cnv_boolean,
889 ((PRESENTATIONNS, 'full-screen'), None): cnv_boolean,
890 ((PRESENTATIONNS, 'group-id'), None): cnv_string,
891 ((PRESENTATIONNS, 'master-element'), None): cnv_IDREF,
892 ((PRESENTATIONNS, 'mouse-as-pen'), None): cnv_boolean,
893 ((PRESENTATIONNS, 'mouse-visible'), None): cnv_boolean,
894 ((PRESENTATIONNS, 'name'), None): cnv_string,
895 ((PRESENTATIONNS, 'node-type'), None): cnv_string,
896 ((PRESENTATIONNS, 'object'), None): cnv_string,
897 ((PRESENTATIONNS, 'pages'), None): cnv_string,
898 ((PRESENTATIONNS, 'path-id'), None): cnv_string,
899 ((PRESENTATIONNS, 'pause'), None): cnv_duration,
900 ((PRESENTATIONNS, 'placeholder'), None): cnv_boolean,
901 ((PRESENTATIONNS, 'play-full'), None): cnv_boolean,
902 ((PRESENTATIONNS, 'presentation-page-layout-name'), None): cnv_StyleNameRef,
903 ((PRESENTATIONNS, 'preset-class'), None): cnv_string,
904 ((PRESENTATIONNS, 'preset-id'), None): cnv_string,
905 ((PRESENTATIONNS, 'preset-sub-type'), None): cnv_string,
906 ((PRESENTATIONNS, 'show'), None): cnv_string,
907 ((PRESENTATIONNS, 'show-end-of-presentation-slide'), None): cnv_boolean,
908 ((PRESENTATIONNS, 'show-logo'), None): cnv_boolean,
909 ((PRESENTATIONNS, 'source'), None): cnv_string,
910 ((PRESENTATIONNS, 'speed'), None): cnv_string,
911 ((PRESENTATIONNS, 'start-page'), None): cnv_string,
912 ((PRESENTATIONNS, 'start-scale'), None): cnv_string,
913 ((PRESENTATIONNS, 'start-with-navigator'), None): cnv_boolean,
914 ((PRESENTATIONNS, 'stay-on-top'), None): cnv_boolean,
915 ((PRESENTATIONNS, 'style-name'), None): cnv_StyleNameRef,
916 ((PRESENTATIONNS, 'transition-on-click'), None): cnv_string,
917 ((PRESENTATIONNS, 'transition-speed'), None): cnv_string,
918 ((PRESENTATIONNS, 'transition-style'), None): cnv_string,
919 ((PRESENTATIONNS, 'transition-type'), None): cnv_string,
920 ((PRESENTATIONNS, 'use-date-time-name'), None): cnv_string,
921 ((PRESENTATIONNS, 'use-footer-name'), None): cnv_string,
922 ((PRESENTATIONNS, 'use-header-name'), None): cnv_string,
923 ((PRESENTATIONNS, 'user-transformed'), None): cnv_boolean,
924 ((PRESENTATIONNS, 'verb'), None): cnv_nonNegativeInteger,
925 ((PRESENTATIONNS, 'visibility'), None): cnv_string,
926 ((SCRIPTNS, 'event-name'), None): cnv_formula,
927 ((SCRIPTNS, 'language'), None): cnv_formula,
928 ((SCRIPTNS, 'macro-name'), None): cnv_string,
929 ((SMILNS, 'accelerate'), None): cnv_double,
930 ((SMILNS, 'accumulate'), None): cnv_string,
931 ((SMILNS, 'additive'), None): cnv_string,
932 ((SMILNS, 'attributeName'), None): cnv_string,
933 ((SMILNS, 'autoReverse'), None): cnv_boolean,
934 ((SMILNS, 'begin'), None): cnv_string,
935 ((SMILNS, 'by'), None): cnv_string,
936 ((SMILNS, 'calcMode'), None): cnv_string,
937 ((SMILNS, 'decelerate'), None): cnv_double,
938 ((SMILNS, 'direction'), None): cnv_string,
939 ((SMILNS, 'dur'), None): cnv_string,
940 ((SMILNS, 'end'), None): cnv_string,
941 ((SMILNS, 'endsync'), None): cnv_string,
942 ((SMILNS, 'fadeColor'), None): cnv_string,
943 ((SMILNS, 'fill'), None): cnv_string,
944 ((SMILNS, 'fillDefault'), None): cnv_string,
945 ((SMILNS, 'from'), None): cnv_string,
946 ((SMILNS, 'keySplines'), None): cnv_string,
947 ((SMILNS, 'keyTimes'), None): cnv_string,
948 ((SMILNS, 'mode'), None): cnv_string,
949 ((SMILNS, 'repeatCount'), None): cnv_nonNegativeInteger,
950 ((SMILNS, 'repeatDur'), None): cnv_string,
951 ((SMILNS, 'restart'), None): cnv_string,
952 ((SMILNS, 'restartDefault'), None): cnv_string,
953 ((SMILNS, 'subtype'), None): cnv_string,
954 ((SMILNS, 'targetElement'), None): cnv_IDREF,
955 ((SMILNS, 'to'), None): cnv_string,
956 ((SMILNS, 'type'), None): cnv_string,
957 ((SMILNS, 'values'), None): cnv_string,
958 ((STYLENS, 'adjustment'), None): cnv_string,
959 ((STYLENS, 'apply-style-name'), None): cnv_StyleNameRef,
960 ((STYLENS, 'auto-text-indent'), None): cnv_boolean,
961 ((STYLENS, 'auto-update'), None): cnv_boolean,
962 ((STYLENS, 'background-transparency'), None): cnv_string,
963 ((STYLENS, 'base-cell-address'), None): cnv_string,
964 ((STYLENS, 'border-line-width-bottom'), None): cnv_string,
965 ((STYLENS, 'border-line-width'), None): cnv_string,
966 ((STYLENS, 'border-line-width-left'), None): cnv_string,
967 ((STYLENS, 'border-line-width-right'), None): cnv_string,
968 ((STYLENS, 'border-line-width-top'), None): cnv_string,
969 ((STYLENS, 'cell-protect'), None): cnv_string,
970 ((STYLENS, 'char'), None): cnv_string,
971 ((STYLENS, 'class'), None): cnv_string,
972 ((STYLENS, 'color'), None): cnv_string,
973 ((STYLENS, 'column-width'), None): cnv_string,
974 ((STYLENS, 'condition'), None): cnv_string,
975 ((STYLENS, 'country-asian'), None): cnv_string,
976 ((STYLENS, 'country-complex'), None): cnv_string,
977 ((STYLENS, 'data-style-name'), None): cnv_StyleNameRef,
978 ((STYLENS, 'decimal-places'), None): cnv_string,
979 ((STYLENS, 'default-outline-level'), None): cnv_positiveInteger,
980 ((STYLENS, 'diagonal-bl-tr'), None): cnv_string,
981 ((STYLENS, 'diagonal-bl-tr-widths'), None): cnv_string,
982 ((STYLENS, 'diagonal-tl-br'), None): cnv_string,
983 ((STYLENS, 'diagonal-tl-br-widths'), None): cnv_string,
984 ((STYLENS, 'direction'), None): cnv_string,
985 ((STYLENS, 'display'), None): cnv_boolean,
986 ((STYLENS, 'display-name'), None): cnv_string,
987 ((STYLENS, 'distance-after-sep'), None): cnv_length,
988 ((STYLENS, 'distance-before-sep'), None): cnv_length,
989 ((STYLENS, 'distance'), None): cnv_length,
990 ((STYLENS, 'dynamic-spacing'), None): cnv_boolean,
991 ((STYLENS, 'editable'), None): cnv_boolean,
992 ((STYLENS, 'family'), None): cnv_family,
993 ((STYLENS, 'filter-name'), None): cnv_string,
994 ((STYLENS, 'first-page-number'), None): cnv_string,
995 ((STYLENS, 'flow-with-text'), None): cnv_boolean,
996 ((STYLENS, 'font-adornments'), None): cnv_string,
997 ((STYLENS, 'font-charset'), None): cnv_string,
998 ((STYLENS, 'font-charset-asian'), None): cnv_string,
999 ((STYLENS, 'font-charset-complex'), None): cnv_string,
1000 ((STYLENS, 'font-family-asian'), None): cnv_string,
1001 ((STYLENS, 'font-family-complex'), None): cnv_string,
1002 ((STYLENS, 'font-family-generic-asian'), None): cnv_string,
1003 ((STYLENS, 'font-family-generic'), None): cnv_string,
1004 ((STYLENS, 'font-family-generic-complex'), None): cnv_string,
1005 ((STYLENS, 'font-independent-line-spacing'), None): cnv_boolean,
1006 ((STYLENS, 'font-name-asian'), None): cnv_string,
1007 ((STYLENS, 'font-name'), None): cnv_string,
1008 ((STYLENS, 'font-name-complex'), None): cnv_string,
1009 ((STYLENS, 'font-pitch-asian'), None): cnv_string,
1010 ((STYLENS, 'font-pitch'), None): cnv_string,
1011 ((STYLENS, 'font-pitch-complex'), None): cnv_string,
1012 ((STYLENS, 'font-relief'), None): cnv_string,
1013 ((STYLENS, 'font-size-asian'), None): cnv_string,
1014 ((STYLENS, 'font-size-complex'), None): cnv_string,
1015 ((STYLENS, 'font-size-rel-asian'), None): cnv_length,
1016 ((STYLENS, 'font-size-rel'), None): cnv_length,
1017 ((STYLENS, 'font-size-rel-complex'), None): cnv_length,
1018 ((STYLENS, 'font-style-asian'), None): cnv_string,
1019 ((STYLENS, 'font-style-complex'), None): cnv_string,
1020 ((STYLENS, 'font-style-name-asian'), None): cnv_string,
1021 ((STYLENS, 'font-style-name'), None): cnv_string,
1022 ((STYLENS, 'font-style-name-complex'), None): cnv_string,
1023 ((STYLENS, 'font-weight-asian'), None): cnv_string,
1024 ((STYLENS, 'font-weight-complex'), None): cnv_string,
1025 ((STYLENS, 'footnote-max-height'), None): cnv_length,
1026 ((STYLENS, 'glyph-orientation-vertical'), None): cnv_string,
1027 ((STYLENS, 'height'), None): cnv_string,
1028 ((STYLENS, 'horizontal-pos'), None): cnv_string,
1029 ((STYLENS, 'horizontal-rel'), None): cnv_string,
1030 ((STYLENS, 'justify-single-word'), None): cnv_boolean,
1031 ((STYLENS, 'language-asian'), None): cnv_string,
1032 ((STYLENS, 'language-complex'), None): cnv_string,
1033 ((STYLENS, 'layout-grid-base-height'), None): cnv_length,
1034 ((STYLENS, 'layout-grid-color'), None): cnv_string,
1035 ((STYLENS, 'layout-grid-display'), None): cnv_boolean,
1036 ((STYLENS, 'layout-grid-lines'), None): cnv_string,
1037 ((STYLENS, 'layout-grid-mode'), None): cnv_string,
1038 ((STYLENS, 'layout-grid-print'), None): cnv_boolean,
1039 ((STYLENS, 'layout-grid-ruby-below'), None): cnv_boolean,
1040 ((STYLENS, 'layout-grid-ruby-height'), None): cnv_length,
1041 ((STYLENS, 'leader-char'), None): cnv_string,
1042 ((STYLENS, 'leader-color'), None): cnv_string,
1043 ((STYLENS, 'leader-style'), None): cnv_string,
1044 ((STYLENS, 'leader-text'), None): cnv_string,
1045 ((STYLENS, 'leader-text-style'), None): cnv_StyleNameRef,
1046 ((STYLENS, 'leader-type'), None): cnv_string,
1047 ((STYLENS, 'leader-width'), None): cnv_string,
1048 ((STYLENS, 'legend-expansion-aspect-ratio'), None): cnv_double,
1049 ((STYLENS, 'legend-expansion'), None): cnv_string,
1050 ((STYLENS, 'length'), None): cnv_positiveInteger,
1051 ((STYLENS, 'letter-kerning'), None): cnv_boolean,
1052 ((STYLENS, 'line-break'), None): cnv_string,
1053 ((STYLENS, 'line-height-at-least'), None): cnv_string,
1054 ((STYLENS, 'line-spacing'), None): cnv_length,
1055 ((STYLENS, 'line-style'), None): cnv_string,
1056 ((STYLENS, 'lines'), None): cnv_positiveInteger,
1057 ((STYLENS, 'list-style-name'), None): cnv_StyleNameRef,
1058 ((STYLENS, 'master-page-name'), None): cnv_StyleNameRef,
1059 ((STYLENS, 'may-break-between-rows'), None): cnv_boolean,
1060 ((STYLENS, 'min-row-height'), None): cnv_string,
1061 ((STYLENS, 'mirror'), None): cnv_string,
1062 ((STYLENS, 'name'), None): cnv_NCName,
1063 ((STYLENS, 'name'), (STYLENS, 'font-face')): cnv_string,
1064 ((STYLENS, 'next-style-name'), None): cnv_StyleNameRef,
1065 ((STYLENS, 'num-format'), None): cnv_string,
1066 ((STYLENS, 'num-letter-sync'), None): cnv_boolean,
1067 ((STYLENS, 'num-prefix'), None): cnv_string,
1068 ((STYLENS, 'num-suffix'), None): cnv_string,
1069 ((STYLENS, 'number-wrapped-paragraphs'), None): cnv_string,
1070 ((STYLENS, 'overflow-behavior'), None): cnv_string,
1071 ((STYLENS, 'page-layout-name'), None): cnv_StyleNameRef,
1072 ((STYLENS, 'page-number'), None): cnv_string,
1073 ((STYLENS, 'page-usage'), None): cnv_string,
1074 ((STYLENS, 'paper-tray-name'), None): cnv_string,
1075 ((STYLENS, 'parent-style-name'), None): cnv_StyleNameRef,
1076 ((STYLENS, 'position'), (STYLENS, 'tab-stop')): cnv_length,
1077 ((STYLENS, 'position'), None): cnv_string,
1078 ((STYLENS, 'print'), None): cnv_string,
1079 ((STYLENS, 'print-content'), None): cnv_boolean,
1080 ((STYLENS, 'print-orientation'), None): cnv_string,
1081 ((STYLENS, 'print-page-order'), None): cnv_string,
1082 ((STYLENS, 'protect'), None): cnv_boolean,
1083 ((STYLENS, 'punctuation-wrap'), None): cnv_string,
1084 ((STYLENS, 'register-true'), None): cnv_boolean,
1085 ((STYLENS, 'register-truth-ref-style-name'), None): cnv_string,
1086 ((STYLENS, 'rel-column-width'), None): cnv_string,
1087 ((STYLENS, 'rel-height'), None): cnv_string,
1088 ((STYLENS, 'rel-width'), None): cnv_string,
1089 ((STYLENS, 'repeat'), None): cnv_string,
1090 ((STYLENS, 'repeat-content'), None): cnv_boolean,
1091 ((STYLENS, 'rotation-align'), None): cnv_string,
1092 ((STYLENS, 'rotation-angle'), None): cnv_string,
1093 ((STYLENS, 'row-height'), None): cnv_string,
1094 ((STYLENS, 'ruby-align'), None): cnv_string,
1095 ((STYLENS, 'ruby-position'), None): cnv_string,
1096 ((STYLENS, 'run-through'), None): cnv_string,
1097 ((STYLENS, 'scale-to'), None): cnv_string,
1098 ((STYLENS, 'scale-to-pages'), None): cnv_string,
1099 ((STYLENS, 'script-type'), None): cnv_string,
1100 ((STYLENS, 'shadow'), None): cnv_string,
1101 ((STYLENS, 'shrink-to-fit'), None): cnv_boolean,
1102 ((STYLENS, 'snap-to-layout-grid'), None): cnv_boolean,
1103 ((STYLENS, 'style'), None): cnv_string,
1104 ((STYLENS, 'style-name'), None): cnv_StyleNameRef,
1105 ((STYLENS, 'tab-stop-distance'), None): cnv_string,
1106 ((STYLENS, 'table-centering'), None): cnv_string,
1107 ((STYLENS, 'text-align-source'), None): cnv_string,
1108 ((STYLENS, 'text-autospace'), None): cnv_string,
1109 ((STYLENS, 'text-blinking'), None): cnv_boolean,
1110 ((STYLENS, 'text-combine'), None): cnv_string,
1111 ((STYLENS, 'text-combine-end-char'), None): cnv_string,
1112 ((STYLENS, 'text-combine-start-char'), None): cnv_string,
1113 ((STYLENS, 'text-emphasize'), None): cnv_string,
1114 ((STYLENS, 'text-line-through-color'), None): cnv_string,
1115 ((STYLENS, 'text-line-through-mode'), None): cnv_string,
1116 ((STYLENS, 'text-line-through-style'), None): cnv_string,
1117 ((STYLENS, 'text-line-through-text'), None): cnv_string,
1118 ((STYLENS, 'text-line-through-text-style'), None): cnv_string,
1119 ((STYLENS, 'text-line-through-type'), None): cnv_string,
1120 ((STYLENS, 'text-line-through-width'), None): cnv_string,
1121 ((STYLENS, 'text-outline'), None): cnv_boolean,
1122 ((STYLENS, 'text-position'), None): cnv_string,
1123 ((STYLENS, 'text-rotation-angle'), None): cnv_string,
1124 ((STYLENS, 'text-rotation-scale'), None): cnv_string,
1125 ((STYLENS, 'text-scale'), None): cnv_string,
1126 ((STYLENS, 'text-underline-color'), None): cnv_string,
1127 ((STYLENS, 'text-underline-mode'), None): cnv_string,
1128 ((STYLENS, 'text-underline-style'), None): cnv_string,
1129 ((STYLENS, 'text-underline-type'), None): cnv_string,
1130 ((STYLENS, 'text-underline-width'), None): cnv_string,
1131 ((STYLENS, 'type'), None): cnv_string,
1132 ((STYLENS, 'use-optimal-column-width'), None): cnv_boolean,
1133 ((STYLENS, 'use-optimal-row-height'), None): cnv_boolean,
1134 ((STYLENS, 'use-window-font-color'), None): cnv_boolean,
1135 ((STYLENS, 'vertical-align'), None): cnv_string,
1136 ((STYLENS, 'vertical-pos'), None): cnv_string,
1137 ((STYLENS, 'vertical-rel'), None): cnv_string,
1138 ((STYLENS, 'volatile'), None): cnv_boolean,
1139 ((STYLENS, 'width'), None): cnv_string,
1140 ((STYLENS, 'wrap'), None): cnv_string,
1141 ((STYLENS, 'wrap-contour'), None): cnv_boolean,
1142 ((STYLENS, 'wrap-contour-mode'), None): cnv_string,
1143 ((STYLENS, 'wrap-dynamic-threshold'), None): cnv_length,
1144 ((STYLENS, 'writing-mode-automatic'), None): cnv_boolean,
1145 ((STYLENS, 'writing-mode'), None): cnv_string,
1146 ((SVGNS, 'accent-height'), None): cnv_integer,
1147 ((SVGNS, 'alphabetic'), None): cnv_integer,
1148 ((SVGNS, 'ascent'), None): cnv_integer,
1149 ((SVGNS, 'bbox'), None): cnv_string,
1150 ((SVGNS, 'cap-height'), None): cnv_integer,
1151 ((SVGNS, 'cx'), None): cnv_string,
1152 ((SVGNS, 'cy'), None): cnv_string,
1153 ((SVGNS, 'd'), None): cnv_string,
1154 ((SVGNS, 'descent'), None): cnv_integer,
1155 ((SVGNS, 'fill-rule'), None): cnv_string,
1156 ((SVGNS, 'font-family'), None): cnv_string,
1157 ((SVGNS, 'font-size'), None): cnv_string,
1158 ((SVGNS, 'font-stretch'), None): cnv_string,
1159 ((SVGNS, 'font-style'), None): cnv_string,
1160 ((SVGNS, 'font-variant'), None): cnv_string,
1161 ((SVGNS, 'font-weight'), None): cnv_string,
1162 ((SVGNS, 'fx'), None): cnv_string,
1163 ((SVGNS, 'fy'), None): cnv_string,
1164 ((SVGNS, 'gradientTransform'), None): cnv_string,
1165 ((SVGNS, 'gradientUnits'), None): cnv_string,
1166 ((SVGNS, 'hanging'), None): cnv_integer,
1167 ((SVGNS, 'height'), None): cnv_length,
1168 ((SVGNS, 'ideographic'), None): cnv_integer,
1169 ((SVGNS, 'mathematical'), None): cnv_integer,
1170 ((SVGNS, 'name'), None): cnv_string,
1171 ((SVGNS, 'offset'), None): cnv_string,
1172 ((SVGNS, 'origin'), None): cnv_string,
1173 ((SVGNS, 'overline-position'), None): cnv_integer,
1174 ((SVGNS, 'overline-thickness'), None): cnv_integer,
1175 ((SVGNS, 'panose-1'), None): cnv_string,
1176 ((SVGNS, 'path'), None): cnv_string,
1177 ((SVGNS, 'r'), None): cnv_length,
1178 ((SVGNS, 'rx'), None): cnv_length,
1179 ((SVGNS, 'ry'), None): cnv_length,
1180 ((SVGNS, 'slope'), None): cnv_integer,
1181 ((SVGNS, 'spreadMethod'), None): cnv_string,
1182 ((SVGNS, 'stemh'), None): cnv_integer,
1183 ((SVGNS, 'stemv'), None): cnv_integer,
1184 ((SVGNS, 'stop-color'), None): cnv_string,
1185 ((SVGNS, 'stop-opacity'), None): cnv_double,
1186 ((SVGNS, 'strikethrough-position'), None): cnv_integer,
1187 ((SVGNS, 'strikethrough-thickness'), None): cnv_integer,
1188 ((SVGNS, 'string'), None): cnv_string,
1189 ((SVGNS, 'stroke-color'), None): cnv_string,
1190 ((SVGNS, 'stroke-opacity'), None): cnv_string,
1191 ((SVGNS, 'stroke-width'), None): cnv_length,
1192 ((SVGNS, 'type'), None): cnv_string,
1193 ((SVGNS, 'underline-position'), None): cnv_integer,
1194 ((SVGNS, 'underline-thickness'), None): cnv_integer,
1195 ((SVGNS, 'unicode-range'), None): cnv_string,
1196 ((SVGNS, 'units-per-em'), None): cnv_integer,
1197 ((SVGNS, 'v-alphabetic'), None): cnv_integer,
1198 ((SVGNS, 'v-hanging'), None): cnv_integer,
1199 ((SVGNS, 'v-ideographic'), None): cnv_integer,
1200 ((SVGNS, 'v-mathematical'), None): cnv_integer,
1201 ((SVGNS, 'viewBox'), None): cnv_viewbox,
1202 ((SVGNS, 'width'), None): cnv_length,
1203 ((SVGNS, 'widths'), None): cnv_string,
1204 ((SVGNS, 'x'), None): cnv_length,
1205 ((SVGNS, 'x-height'), None): cnv_integer,
1206 ((SVGNS, 'x1'), None): cnv_lengthorpercent,
1207 ((SVGNS, 'x2'), None): cnv_lengthorpercent,
1208 ((SVGNS, 'y'), None): cnv_length,
1209 ((SVGNS, 'y1'), None): cnv_lengthorpercent,
1210 ((SVGNS, 'y2'), None): cnv_lengthorpercent,
1211 ((TABLENS, 'acceptance-state'), None): cnv_string,
1212 ((TABLENS, 'add-empty-lines'), None): cnv_boolean,
1213 ((TABLENS, 'algorithm'), None): cnv_formula,
1214 ((TABLENS, 'align'), None): cnv_string,
1215 ((TABLENS, 'allow-empty-cell'), None): cnv_boolean,
1216 ((TABLENS, 'application-data'), None): cnv_string,
1217 ((TABLENS, 'automatic-find-labels'), None): cnv_boolean,
1218 ((TABLENS, 'base-cell-address'), None): cnv_string,
1219 ((TABLENS, 'bind-styles-to-content'), None): cnv_boolean,
1220 ((TABLENS, 'border-color'), None): cnv_string,
1221 ((TABLENS, 'border-model'), None): cnv_string,
1222 ((TABLENS, 'buttons'), None): cnv_string,
1223 # ((TABLENS,'case-sensitive'), None): cnv_boolean,
1224 ((TABLENS, 'case-sensitive'), None): cnv_string,
1225 ((TABLENS, 'cell-address'), None): cnv_string,
1226 ((TABLENS, 'cell-range-address'), None): cnv_string,
1227 ((TABLENS, 'cell-range'), None): cnv_string,
1228 ((TABLENS, 'column'), None): cnv_integer,
1229 ((TABLENS, 'comment'), None): cnv_string,
1230 ((TABLENS, 'condition'), None): cnv_formula,
1231 ((TABLENS, 'condition-source'), None): cnv_string,
1232 ((TABLENS, 'condition-source-range-address'), None): cnv_string,
1233 ((TABLENS, 'contains-error'), None): cnv_boolean,
1234 ((TABLENS, 'contains-header'), None): cnv_boolean,
1235 ((TABLENS, 'content-validation-name'), None): cnv_string,
1236 ((TABLENS, 'copy-back'), None): cnv_boolean,
1237 ((TABLENS, 'copy-formulas'), None): cnv_boolean,
1238 ((TABLENS, 'copy-styles'), None): cnv_boolean,
1239 ((TABLENS, 'count'), None): cnv_positiveInteger,
1240 ((TABLENS, 'country'), None): cnv_token,
1241 ((TABLENS, 'data-cell-range-address'), None): cnv_string,
1242 ((TABLENS, 'data-field'), None): cnv_string,
1243 ((TABLENS, 'data-type'), None): cnv_string,
1244 ((TABLENS, 'database-name'), None): cnv_string,
1245 ((TABLENS, 'database-table-name'), None): cnv_string,
1246 ((TABLENS, 'date-end'), None): cnv_string,
1247 ((TABLENS, 'date-start'), None): cnv_string,
1248 ((TABLENS, 'date-value'), None): cnv_date,
1249 ((TABLENS, 'default-cell-style-name'), None): cnv_StyleNameRef,
1250 ((TABLENS, 'direction'), None): cnv_string,
1251 ((TABLENS, 'display-border'), None): cnv_boolean,
1252 ((TABLENS, 'display'), None): cnv_boolean,
1253 ((TABLENS, 'display-duplicates'), None): cnv_boolean,
1254 ((TABLENS, 'display-filter-buttons'), None): cnv_boolean,
1255 ((TABLENS, 'display-list'), None): cnv_string,
1256 ((TABLENS, 'display-member-mode'), None): cnv_string,
1257 ((TABLENS, 'drill-down-on-double-click'), None): cnv_boolean,
1258 ((TABLENS, 'enabled'), None): cnv_boolean,
1259 ((TABLENS, 'end-cell-address'), None): cnv_string,
1260 ((TABLENS, 'end'), None): cnv_string,
1261 ((TABLENS, 'end-column'), None): cnv_integer,
1262 ((TABLENS, 'end-position'), None): cnv_integer,
1263 ((TABLENS, 'end-row'), None): cnv_integer,
1264 ((TABLENS, 'end-table'), None): cnv_integer,
1265 ((TABLENS, 'end-x'), None): cnv_length,
1266 ((TABLENS, 'end-y'), None): cnv_length,
1267 ((TABLENS, 'execute'), None): cnv_boolean,
1268 ((TABLENS, 'expression'), None): cnv_formula,
1269 ((TABLENS, 'field-name'), None): cnv_string,
1270 # ((TABLENS,'field-number'), None): cnv_nonNegativeInteger,
1271 ((TABLENS, 'field-number'), None): cnv_string,
1272 ((TABLENS, 'filter-name'), None): cnv_string,
1273 ((TABLENS, 'filter-options'), None): cnv_string,
1274 ((TABLENS, 'formula'), None): cnv_formula,
1275 ((TABLENS, 'function'), None): cnv_string,
1276 ((TABLENS, 'grand-total'), None): cnv_string,
1277 ((TABLENS, 'group-by-field-number'), None): cnv_nonNegativeInteger,
1278 ((TABLENS, 'grouped-by'), None): cnv_string,
1279 ((TABLENS, 'has-persistent-data'), None): cnv_boolean,
1280 ((TABLENS, 'id'), None): cnv_string,
1281 ((TABLENS, 'identify-categories'), None): cnv_boolean,
1282 ((TABLENS, 'ignore-empty-rows'), None): cnv_boolean,
1283 ((TABLENS, 'index'), None): cnv_nonNegativeInteger,
1284 ((TABLENS, 'is-active'), None): cnv_boolean,
1285 ((TABLENS, 'is-data-layout-field'), None): cnv_string,
1286 ((TABLENS, 'is-selection'), None): cnv_boolean,
1287 ((TABLENS, 'is-sub-table'), None): cnv_boolean,
1288 ((TABLENS, 'label-cell-range-address'), None): cnv_string,
1289 ((TABLENS, 'language'), None): cnv_token,
1290 ((TABLENS, 'last-column-spanned'), None): cnv_positiveInteger,
1291 ((TABLENS, 'last-row-spanned'), None): cnv_positiveInteger,
1292 ((TABLENS, 'layout-mode'), None): cnv_string,
1293 ((TABLENS, 'link-to-source-data'), None): cnv_boolean,
1294 ((TABLENS, 'marked-invalid'), None): cnv_boolean,
1295 ((TABLENS, 'matrix-covered'), None): cnv_boolean,
1296 ((TABLENS, 'maximum-difference'), None): cnv_double,
1297 ((TABLENS, 'member-count'), None): cnv_nonNegativeInteger,
1298 ((TABLENS, 'member-name'), None): cnv_string,
1299 ((TABLENS, 'member-type'), None): cnv_string,
1300 ((TABLENS, 'message-type'), None): cnv_string,
1301 ((TABLENS, 'mode'), None): cnv_string,
1302 ((TABLENS, 'multi-deletion-spanned'), None): cnv_integer,
1303 ((TABLENS, 'name'), None): cnv_string,
1304 ((TABLENS, 'null-year'), None): cnv_positiveInteger,
1305 ((TABLENS, 'number-columns-repeated'), None): cnv_positiveInteger,
1306 ((TABLENS, 'number-columns-spanned'), None): cnv_positiveInteger,
1307 ((TABLENS, 'number-matrix-columns-spanned'), None): cnv_positiveInteger,
1308 ((TABLENS, 'number-matrix-rows-spanned'), None): cnv_positiveInteger,
1309 ((TABLENS, 'number-rows-repeated'), None): cnv_positiveInteger,
1310 ((TABLENS, 'number-rows-spanned'), None): cnv_positiveInteger,
1311 ((TABLENS, 'object-name'), None): cnv_string,
1312 ((TABLENS, 'on-update-keep-size'), None): cnv_boolean,
1313 ((TABLENS, 'on-update-keep-styles'), None): cnv_boolean,
1314 ((TABLENS, 'operator'), None): cnv_string,
1315 ((TABLENS, 'order'), None): cnv_string,
1316 ((TABLENS, 'orientation'), None): cnv_string,
1317 ((TABLENS, 'page-breaks-on-group-change'), None): cnv_boolean,
1318 ((TABLENS, 'parse-sql-statement'), None): cnv_boolean,
1319 ((TABLENS, 'password'), None): cnv_string,
1320 ((TABLENS, 'position'), None): cnv_integer,
1321 ((TABLENS, 'precision-as-shown'), None): cnv_boolean,
1322 ((TABLENS, 'print'), None): cnv_boolean,
1323 ((TABLENS, 'print-ranges'), None): cnv_string,
1324 ((TABLENS, 'protect'), None): cnv_boolean,
1325 ((TABLENS, 'protected'), None): cnv_boolean,
1326 ((TABLENS, 'protection-key'), None): cnv_string,
1327 ((TABLENS, 'query-name'), None): cnv_string,
1328 ((TABLENS, 'range-usable-as'), None): cnv_string,
1329 # ((TABLENS,'refresh-delay'), None): cnv_boolean,
1330 ((TABLENS, 'refresh-delay'), None): cnv_duration,
1331 ((TABLENS, 'rejecting-change-id'), None): cnv_string,
1332 ((TABLENS, 'row'), None): cnv_integer,
1333 ((TABLENS, 'scenario-ranges'), None): cnv_string,
1334 ((TABLENS, 'search-criteria-must-apply-to-whole-cell'), None): cnv_boolean,
1335 ((TABLENS, 'selected-page'), None): cnv_string,
1336 ((TABLENS, 'show-details'), None): cnv_boolean,
1337 # ((TABLENS,'show-empty'), None): cnv_boolean,
1338 ((TABLENS, 'show-empty'), None): cnv_string,
1339 ((TABLENS, 'show-filter-button'), None): cnv_boolean,
1340 ((TABLENS, 'sort-mode'), None): cnv_string,
1341 ((TABLENS, 'source-cell-range-addresses'), None): cnv_string,
1342 ((TABLENS, 'source-field-name'), None): cnv_string,
1343 ((TABLENS, 'source-name'), None): cnv_string,
1344 ((TABLENS, 'sql-statement'), None): cnv_string,
1345 ((TABLENS, 'start'), None): cnv_string,
1346 ((TABLENS, 'start-column'), None): cnv_integer,
1347 ((TABLENS, 'start-position'), None): cnv_integer,
1348 ((TABLENS, 'start-row'), None): cnv_integer,
1349 ((TABLENS, 'start-table'), None): cnv_integer,
1350 ((TABLENS, 'status'), None): cnv_string,
1351 ((TABLENS, 'step'), None): cnv_double,
1352 ((TABLENS, 'steps'), None): cnv_positiveInteger,
1353 ((TABLENS, 'structure-protected'), None): cnv_boolean,
1354 ((TABLENS, 'style-name'), None): cnv_StyleNameRef,
1355 ((TABLENS, 'table-background'), None): cnv_boolean,
1356 ((TABLENS, 'table'), None): cnv_integer,
1357 ((TABLENS, 'table-name'), None): cnv_string,
1358 ((TABLENS, 'target-cell-address'), None): cnv_string,
1359 ((TABLENS, 'target-range-address'), None): cnv_string,
1360 ((TABLENS, 'title'), None): cnv_string,
1361 ((TABLENS, 'track-changes'), None): cnv_boolean,
1362 ((TABLENS, 'type'), None): cnv_string,
1363 ((TABLENS, 'use-labels'), None): cnv_string,
1364 ((TABLENS, 'use-regular-expressions'), None): cnv_boolean,
1365 ((TABLENS, 'used-hierarchy'), None): cnv_integer,
1366 ((TABLENS, 'user-name'), None): cnv_string,
1367 ((TABLENS, 'value'), None): cnv_string,
1368 ((TABLENS, 'value-type'), None): cnv_string,
1369 ((TABLENS, 'visibility'), None): cnv_string,
1370 ((TEXTNS, 'active'), None): cnv_boolean,
1371 ((TEXTNS, 'address'), None): cnv_string,
1372 ((TEXTNS, 'alphabetical-separators'), None): cnv_boolean,
1373 ((TEXTNS, 'anchor-page-number'), None): cnv_positiveInteger,
1374 ((TEXTNS, 'anchor-type'), None): cnv_string,
1375 ((TEXTNS, 'animation'), None): cnv_string,
1376 ((TEXTNS, 'animation-delay'), None): cnv_string,
1377 ((TEXTNS, 'animation-direction'), None): cnv_string,
1378 ((TEXTNS, 'animation-repeat'), None): cnv_string,
1379 ((TEXTNS, 'animation-start-inside'), None): cnv_boolean,
1380 ((TEXTNS, 'animation-steps'), None): cnv_length,
1381 ((TEXTNS, 'animation-stop-inside'), None): cnv_boolean,
1382 ((TEXTNS, 'annote'), None): cnv_string,
1383 ((TEXTNS, 'author'), None): cnv_string,
1384 ((TEXTNS, 'bibliography-data-field'), None): cnv_string,
1385 ((TEXTNS, 'bibliography-type'), None): cnv_string,
1386 ((TEXTNS, 'booktitle'), None): cnv_string,
1387 ((TEXTNS, 'bullet-char'), None): cnv_string,
1388 ((TEXTNS, 'bullet-relative-size'), None): cnv_string,
1389 ((TEXTNS, 'c'), None): cnv_nonNegativeInteger,
1390 ((TEXTNS, 'capitalize-entries'), None): cnv_boolean,
1391 ((TEXTNS, 'caption-sequence-format'), None): cnv_string,
1392 ((TEXTNS, 'caption-sequence-name'), None): cnv_string,
1393 ((TEXTNS, 'change-id'), None): cnv_IDREF,
1394 ((TEXTNS, 'chapter'), None): cnv_string,
1395 ((TEXTNS, 'citation-body-style-name'), None): cnv_StyleNameRef,
1396 ((TEXTNS, 'citation-style-name'), None): cnv_StyleNameRef,
1397 ((TEXTNS, 'class-names'), None): cnv_NCNames,
1398 ((TEXTNS, 'column-name'), None): cnv_string,
1399 ((TEXTNS, 'combine-entries'), None): cnv_boolean,
1400 ((TEXTNS, 'combine-entries-with-dash'), None): cnv_boolean,
1401 ((TEXTNS, 'combine-entries-with-pp'), None): cnv_boolean,
1402 ((TEXTNS, 'comma-separated'), None): cnv_boolean,
1403 ((TEXTNS, 'cond-style-name'), None): cnv_StyleNameRef,
1404 ((TEXTNS, 'condition'), None): cnv_formula,
1405 ((TEXTNS, 'connection-name'), None): cnv_string,
1406 ((TEXTNS, 'consecutive-numbering'), None): cnv_boolean,
1407 ((TEXTNS, 'continue-numbering'), None): cnv_boolean,
1408 ((TEXTNS, 'copy-outline-levels'), None): cnv_boolean,
1409 ((TEXTNS, 'count-empty-lines'), None): cnv_boolean,
1410 ((TEXTNS, 'count-in-text-boxes'), None): cnv_boolean,
1411 ((TEXTNS, 'current-value'), None): cnv_boolean,
1412 ((TEXTNS, 'custom1'), None): cnv_string,
1413 ((TEXTNS, 'custom2'), None): cnv_string,
1414 ((TEXTNS, 'custom3'), None): cnv_string,
1415 ((TEXTNS, 'custom4'), None): cnv_string,
1416 ((TEXTNS, 'custom5'), None): cnv_string,
1417 ((TEXTNS, 'database-name'), None): cnv_string,
1418 ((TEXTNS, 'date-adjust'), None): cnv_duration,
1419 ((TEXTNS, 'date-value'), None): cnv_date,
1420 # ((TEXTNS,'date-value'), None): cnv_dateTime,
1421 ((TEXTNS, 'default-style-name'), None): cnv_StyleNameRef,
1422 ((TEXTNS, 'description'), None): cnv_string,
1423 ((TEXTNS, 'display'), None): cnv_string,
1424 ((TEXTNS, 'display-levels'), None): cnv_positiveInteger,
1425 ((TEXTNS, 'display-outline-level'), None): cnv_nonNegativeInteger,
1426 ((TEXTNS, 'dont-balance-text-columns'), None): cnv_boolean,
1427 ((TEXTNS, 'duration'), None): cnv_duration,
1428 ((TEXTNS, 'edition'), None): cnv_string,
1429 ((TEXTNS, 'editor'), None): cnv_string,
1430 ((TEXTNS, 'filter-name'), None): cnv_string,
1431 ((TEXTNS, 'first-row-end-column'), None): cnv_string,
1432 ((TEXTNS, 'first-row-start-column'), None): cnv_string,
1433 ((TEXTNS, 'fixed'), None): cnv_boolean,
1434 ((TEXTNS, 'footnotes-position'), None): cnv_string,
1435 ((TEXTNS, 'formula'), None): cnv_formula,
1436 ((TEXTNS, 'global'), None): cnv_boolean,
1437 ((TEXTNS, 'howpublished'), None): cnv_string,
1438 ((TEXTNS, 'id'), None): cnv_ID,
1439 # ((TEXTNS,'id'), None): cnv_string,
1440 ((TEXTNS, 'identifier'), None): cnv_string,
1441 ((TEXTNS, 'ignore-case'), None): cnv_boolean,
1442 ((TEXTNS, 'increment'), None): cnv_nonNegativeInteger,
1443 ((TEXTNS, 'index-name'), None): cnv_string,
1444 ((TEXTNS, 'index-scope'), None): cnv_string,
1445 ((TEXTNS, 'institution'), None): cnv_string,
1446 ((TEXTNS, 'is-hidden'), None): cnv_boolean,
1447 ((TEXTNS, 'is-list-header'), None): cnv_boolean,
1448 ((TEXTNS, 'isbn'), None): cnv_string,
1449 ((TEXTNS, 'issn'), None): cnv_string,
1450 ((TEXTNS, 'journal'), None): cnv_string,
1451 ((TEXTNS, 'key'), None): cnv_string,
1452 ((TEXTNS, 'key1'), None): cnv_string,
1453 ((TEXTNS, 'key1-phonetic'), None): cnv_string,
1454 ((TEXTNS, 'key2'), None): cnv_string,
1455 ((TEXTNS, 'key2-phonetic'), None): cnv_string,
1456 ((TEXTNS, 'kind'), None): cnv_string,
1457 ((TEXTNS, 'label'), None): cnv_string,
1458 ((TEXTNS, 'last-row-end-column'), None): cnv_string,
1459 ((TEXTNS, 'last-row-start-column'), None): cnv_string,
1460 ((TEXTNS, 'level'), None): cnv_positiveInteger,
1461 ((TEXTNS, 'line-break'), None): cnv_boolean,
1462 ((TEXTNS, 'line-number'), None): cnv_string,
1463 ((TEXTNS, 'main-entry'), None): cnv_boolean,
1464 ((TEXTNS, 'main-entry-style-name'), None): cnv_StyleNameRef,
1465 ((TEXTNS, 'master-page-name'), None): cnv_StyleNameRef,
1466 ((TEXTNS, 'min-label-distance'), None): cnv_string,
1467 ((TEXTNS, 'min-label-width'), None): cnv_string,
1468 ((TEXTNS, 'month'), None): cnv_string,
1469 ((TEXTNS, 'name'), None): cnv_string,
1470 ((TEXTNS, 'note-class'), None): cnv_textnoteclass,
1471 ((TEXTNS, 'note'), None): cnv_string,
1472 ((TEXTNS, 'number'), None): cnv_string,
1473 ((TEXTNS, 'number-lines'), None): cnv_boolean,
1474 ((TEXTNS, 'number-position'), None): cnv_string,
1475 ((TEXTNS, 'numbered-entries'), None): cnv_boolean,
1476 ((TEXTNS, 'offset'), None): cnv_string,
1477 ((TEXTNS, 'organizations'), None): cnv_string,
1478 ((TEXTNS, 'outline-level'), None): cnv_string,
1479 ((TEXTNS, 'page-adjust'), None): cnv_integer,
1480 ((TEXTNS, 'pages'), None): cnv_string,
1481 ((TEXTNS, 'paragraph-style-name'), None): cnv_StyleNameRef,
1482 ((TEXTNS, 'placeholder-type'), None): cnv_string,
1483 ((TEXTNS, 'prefix'), None): cnv_string,
1484 ((TEXTNS, 'protected'), None): cnv_boolean,
1485 ((TEXTNS, 'protection-key'), None): cnv_string,
1486 ((TEXTNS, 'publisher'), None): cnv_string,
1487 ((TEXTNS, 'ref-name'), None): cnv_string,
1488 ((TEXTNS, 'reference-format'), None): cnv_string,
1489 ((TEXTNS, 'relative-tab-stop-position'), None): cnv_boolean,
1490 ((TEXTNS, 'report-type'), None): cnv_string,
1491 ((TEXTNS, 'restart-numbering'), None): cnv_boolean,
1492 ((TEXTNS, 'restart-on-page'), None): cnv_boolean,
1493 ((TEXTNS, 'row-number'), None): cnv_nonNegativeInteger,
1494 ((TEXTNS, 'school'), None): cnv_string,
1495 ((TEXTNS, 'section-name'), None): cnv_string,
1496 ((TEXTNS, 'select-page'), None): cnv_string,
1497 ((TEXTNS, 'separation-character'), None): cnv_string,
1498 ((TEXTNS, 'series'), None): cnv_string,
1499 ((TEXTNS, 'sort-algorithm'), None): cnv_string,
1500 ((TEXTNS, 'sort-ascending'), None): cnv_boolean,
1501 ((TEXTNS, 'sort-by-position'), None): cnv_boolean,
1502 ((TEXTNS, 'space-before'), None): cnv_string,
1503 ((TEXTNS, 'start-numbering-at'), None): cnv_string,
1504 # ((TEXTNS,'start-value'), None): cnv_nonNegativeInteger,
1505 ((TEXTNS, 'start-value'), None): cnv_positiveInteger,
1506 ((TEXTNS, 'string-value'), None): cnv_string,
1507 ((TEXTNS, 'string-value-if-false'), None): cnv_string,
1508 ((TEXTNS, 'string-value-if-true'), None): cnv_string,
1509 ((TEXTNS, 'string-value-phonetic'), None): cnv_string,
1510 ((TEXTNS, 'style-name'), None): cnv_StyleNameRef,
1511 ((TEXTNS, 'suffix'), None): cnv_string,
1512 ((TEXTNS, 'tab-ref'), None): cnv_nonNegativeInteger,
1513 ((TEXTNS, 'table-name'), None): cnv_string,
1514 ((TEXTNS, 'table-type'), None): cnv_string,
1515 ((TEXTNS, 'time-adjust'), None): cnv_duration,
1516 # ((TEXTNS,'time-value'), None): cnv_dateTime,
1517 ((TEXTNS, 'time-value'), None): cnv_time,
1518 ((TEXTNS, 'title'), None): cnv_string,
1519 ((TEXTNS, 'track-changes'), None): cnv_boolean,
1520 ((TEXTNS, 'url'), None): cnv_string,
1521 ((TEXTNS, 'use-caption'), None): cnv_boolean,
1522 ((TEXTNS, 'use-chart-objects'), None): cnv_boolean,
1523 ((TEXTNS, 'use-draw-objects'), None): cnv_boolean,
1524 ((TEXTNS, 'use-floating-frames'), None): cnv_boolean,
1525 ((TEXTNS, 'use-graphics'), None): cnv_boolean,
1526 ((TEXTNS, 'use-index-marks'), None): cnv_boolean,
1527 ((TEXTNS, 'use-index-source-styles'), None): cnv_boolean,
1528 ((TEXTNS, 'use-keys-as-entries'), None): cnv_boolean,
1529 ((TEXTNS, 'use-math-objects'), None): cnv_boolean,
1530 ((TEXTNS, 'use-objects'), None): cnv_boolean,
1531 ((TEXTNS, 'use-other-objects'), None): cnv_boolean,
1532 ((TEXTNS, 'use-outline-level'), None): cnv_boolean,
1533 ((TEXTNS, 'use-soft-page-breaks'), None): cnv_boolean,
1534 ((TEXTNS, 'use-spreadsheet-objects'), None): cnv_boolean,
1535 ((TEXTNS, 'use-tables'), None): cnv_boolean,
1536 ((TEXTNS, 'value'), None): cnv_nonNegativeInteger,
1537 ((TEXTNS, 'visited-style-name'), None): cnv_StyleNameRef,
1538 ((TEXTNS, 'volume'), None): cnv_string,
1539 ((TEXTNS, 'year'), None): cnv_string,
1540 ((XFORMSNS, 'bind'), None): cnv_string,
1541 ((XLINKNS, 'actuate'), None): cnv_string,
1542 ((XLINKNS, 'href'), None): cnv_anyURI,
1543 ((XLINKNS, 'show'), None): cnv_xlinkshow,
1544 ((XLINKNS, 'title'), None): cnv_string,
1545 ((XLINKNS, 'type'), None): cnv_string,
1546 }
1547
1548
1549 class AttrConverters:
1550 def convert(self, attribute, value, element):
1551 """Based on the element, figures out how to check/convert the attribute value
1552 All values are converted to string
1553 """
1554 conversion = attrconverters.get((attribute, element.qname), None)
1555 if conversion is not None:
1556 return conversion(attribute, value, element)
1557 else:
1558 conversion = attrconverters.get((attribute, None), None)
1559 if conversion is not None:
1560 return conversion(attribute, value, element)
1561 return str(value)