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