1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
25
26
27 config_uri = 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'
28 dc_uri = 'http://purl.org/dc/elements/1.1/'
29 form_uri = 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'
30 meta_uri = 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'
31 number_uri = 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'
32 office_uri = 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'
33 presentation_uri = 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'
34 text_uri = 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'
35 svg_uri = 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'
36
37 inline_elements = [
38 (text_uri, 'page-count'),
39 (text_uri, 'page-number'),
40
41 (text_uri, 'a'),
42 (text_uri, 'line-break'),
43 (text_uri, 'ruby-base'),
44 (text_uri, 's'),
45 (text_uri, 'span'),
46 (text_uri, 'tab')]
47
48 no_translate_content_elements = [
49
50
51 (config_uri, 'config-item'),
52
53
54 (dc_uri, 'creator'),
55 (dc_uri, 'date'),
56
57 (dc_uri, 'language'),
58
59
60
61
62 (form_uri, 'item'),
63 (form_uri, 'option'),
64
65
66 (meta_uri, 'creation-date'),
67 (meta_uri, 'date-string'),
68 (meta_uri, 'editing-cycles'),
69 (meta_uri, 'editing-duration'),
70 (meta_uri, 'generator'),
71 (meta_uri, 'initial-creator'),
72
73 (meta_uri, 'printed-by'),
74 (meta_uri, 'print-date'),
75 (meta_uri, 'user-defined'),
76
77
78 (number_uri, 'currency-symbol'),
79 (number_uri, 'embedded-text'),
80 (number_uri, 'text'),
81
82
83 (office_uri, 'binary-data'),
84
85
86 (presentation_uri, 'date-time-decl'),
87
88
89
90
91 (text_uri, 'author-initials'),
92 (text_uri, 'author-name'),
93
94 (text_uri, 'bookmark-ref'),
95
96 (text_uri, 'character-count'),
97
98 (text_uri, 'creation-date'),
99 (text_uri, 'creation-time'),
100 (text_uri, 'creator'),
101 (text_uri, 'date'),
102 (text_uri, 'dde-connection'),
103
104 (text_uri, 'editing-cycles'),
105 (text_uri, 'editing-duration'),
106 (text_uri, 'expression'),
107 (text_uri, 'file-name'),
108
109
110 (text_uri, 'image-count'),
111
112 (text_uri, 'index-title-template'),
113 (text_uri, 'initial-creator'),
114
115 (text_uri, 'linenumbering-separator'),
116 (text_uri, 'measure'),
117 (text_uri, 'modification-date'),
118 (text_uri, 'modification-time'),
119
120
121
122 (text_uri, 'note-ref'),
123 (text_uri, 'number'),
124 (text_uri, 'object-count'),
125 (text_uri, 'page-continuation'),
126 (text_uri, 'page-count'),
127 (text_uri, 'page-number'),
128 (text_uri, 'page-variable-get'),
129 (text_uri, 'page-variable-set'),
130 (text_uri, 'paragraph-count'),
131
132 (text_uri, 'print-date'),
133 (text_uri, 'print-time'),
134 (text_uri, 'printed-by'),
135 (text_uri, 'reference-ref'),
136
137 (text_uri, 'script'),
138 (text_uri, 'sender-city'),
139 (text_uri, 'sender-company'),
140 (text_uri, 'sender-country'),
141 (text_uri, 'sender-email'),
142 (text_uri, 'sender-fax'),
143 (text_uri, 'sender-firstname'),
144 (text_uri, 'sender-initials'),
145 (text_uri, 'sender-lastname'),
146 (text_uri, 'sender-phone-private'),
147 (text_uri, 'sender-phone-work'),
148
149 (text_uri, 'sender-postal-code'),
150 (text_uri, 'sender-state-or-province'),
151 (text_uri, 'sender-street'),
152
153 (text_uri, 'sequence'),
154 (text_uri, 'sequence-ref'),
155 (text_uri, 'sheet-name'),
156
157 (text_uri, 'table-count'),
158 (text_uri, 'table-formula'),
159 (text_uri, 'template-name'),
160 (text_uri, 'text-input'),
161 (text_uri, 'time'),
162
163 (text_uri, 'user-defined'),
164 (text_uri, 'user-field-get'),
165 (text_uri, 'user-field-input'),
166 (text_uri, 'variable-get'),
167 (text_uri, 'variable-input'),
168 (text_uri, 'variable-set'),
169 (text_uri, 'word-count'),
170
171
172
173
174
175
176 (text_uri, 'tracked-changes'),
177 ]
178
179 globals()['inline_elements'] = inline_elements
180 globals()['no_translate_content_elements'] = no_translate_content_elements
181
182 try:
183 from itools.odf.schema import inline_elements
184 from itools.odf.schema import no_translate_content_elements
185
186 except:
187 define_tables()
188