Fix #338: re.sub() flag argument at wrong position.
[docutils.git] / sandbox / rst2wordml / tests / test4.py
blob42e99854b7edd466e45280a0965df85e5cfcfd3b
1 #!C:/dev/python25/python.exe
2 # coding: utf-8
4 """
5 >>> test_wordml('''
6 ... ----------
7 ... Table Test
8 ... ----------
9 ...
10 ... This document contains a table and is meant to test the spans and what not.
11 ...
12 ... Title
13 ... -----
14 ...
15 ... +---------+--------+--------+--------+
16 ... | Cell 1 | Cell 2 | Cell 3 | Cell 4 |
17 ... +---------+--------+--------+--------+
18 ... | This | is a test of | joined |
19 ... + +--------+--------+--------+
20 ... | cells | and ho | they | work |
21 ... +---------+--------+--------+--------+
22 ...
23 ... This is some closing text just to surround the table with something for effect.
24 ...
25 ... This is *emphasized text*.
26 ...
27 ... This is a footnote reference [#]_.
28 ...
29 ... .. [#] This is a footnote text.
30 ... ''')
31 <w:wordDocument xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:embeddedObjPresent="no" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:v="urn:schemas-microsoft-com:vml" xml:space="preserve" w:ocxPresent="no" xmlns:w10="urn:schemas-microsoft-com:office:word" w:macrosPresent="no" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" >
32 <w:ignoreElements w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2" ></w:ignoreElements>
33 <w:fonts >
34 <w:defaultFonts w:h-ansi="Times New Roman" w:fareast="Times New Roman" w:cs="Times New Roman" w:ascii="Times New Roman" ></w:defaultFonts>
35 <w:font w:name="Wingdings" >
36 <w:panose-1 w:val="05000000000000000000" ></w:panose-1>
37 <w:charset w:val="02" ></w:charset>
38 <w:family w:val="Auto" ></w:family>
39 <w:pitch w:val="variable" ></w:pitch>
40 <w:sig w:csb-1="00000000" w:csb-0="80000000" w:usb-3="00000000" w:usb-2="00000000" w:usb-1="10000000" w:usb-0="00000000" ></w:sig>
41 </w:font>
42 </w:fonts>
43 <w:lists >
44 <w:listDef w:listDefId="0" >
45 <w:plt w:val="HybridMultilevel" ></w:plt>
46 <w:tmpl w:val="9C26005E" ></w:tmpl>
47 <w:lvl w:ilvl="0" w:tplc="0409000F" >
48 <w:start w:val="1" ></w:start>
49 <w:lvlText w:val="%1." ></w:lvlText>
50 <w:lvlJc w:val="left" ></w:lvlJc>
51 <w:pPr >
52 <w:tabs >
53 <w:tab w:val="list" w:pos="720" ></w:tab>
54 </w:tabs>
55 <w:ind w:hanging="360" w:left="720" ></w:ind>
56 </w:pPr>
57 </w:lvl>
58 <w:lvl w:ilvl="1" w:tplc="04090019" >
59 <w:start w:val="1" ></w:start>
60 <w:nfc w:val="4" ></w:nfc>
61 <w:lvlText w:val="%2." ></w:lvlText>
62 <w:lvlJc w:val="left" ></w:lvlJc>
63 <w:pPr >
64 <w:tabs >
65 <w:tab w:val="list" w:pos="1440" ></w:tab>
66 </w:tabs>
67 <w:ind w:hanging="360" w:left="1440" ></w:ind>
68 </w:pPr>
69 </w:lvl>
70 <w:lvl w:ilvl="2" w:tplc="0409001B" >
71 <w:start w:val="1" ></w:start>
72 <w:nfc w:val="2" ></w:nfc>
73 <w:lvlText w:val="%3." ></w:lvlText>
74 <w:lvlJc w:val="right" ></w:lvlJc>
75 <w:pPr >
76 <w:tabs >
77 <w:tab w:val="list" w:pos="2160" ></w:tab>
78 </w:tabs>
79 <w:ind w:hanging="180" w:left="2160" ></w:ind>
80 </w:pPr>
81 </w:lvl>
82 <w:lvl w:ilvl="3" w:tplc="0409000F" >
83 <w:start w:val="1" ></w:start>
84 <w:lvlText w:val="%4." ></w:lvlText>
85 <w:lvlJc w:val="left" ></w:lvlJc>
86 <w:pPr >
87 <w:tabs >
88 <w:tab w:val="list" w:pos="2880" ></w:tab>
89 </w:tabs>
90 <w:ind w:hanging="360" w:left="2880" ></w:ind>
91 </w:pPr>
92 </w:lvl>
93 <w:lvl w:ilvl="4" w:tplc="04090019" >
94 <w:start w:val="1" ></w:start>
95 <w:nfc w:val="4" ></w:nfc>
96 <w:lvlText w:val="%5." ></w:lvlText>
97 <w:lvlJc w:val="left" ></w:lvlJc>
98 <w:pPr >
99 <w:tabs >
100 <w:tab w:val="list" w:pos="3600" ></w:tab>
101 </w:tabs>
102 <w:ind w:hanging="360" w:left="3600" ></w:ind>
103 </w:pPr>
104 </w:lvl>
105 <w:lvl w:ilvl="5" w:tplc="0409001B" >
106 <w:start w:val="1" ></w:start>
107 <w:nfc w:val="2" ></w:nfc>
108 <w:lvlText w:val="%6." ></w:lvlText>
109 <w:lvlJc w:val="right" ></w:lvlJc>
110 <w:pPr >
111 <w:tabs >
112 <w:tab w:val="list" w:pos="4320" ></w:tab>
113 </w:tabs>
114 <w:ind w:hanging="180" w:left="4320" ></w:ind>
115 </w:pPr>
116 </w:lvl>
117 <w:lvl w:ilvl="6" w:tplc="0409000F" >
118 <w:start w:val="1" ></w:start>
119 <w:lvlText w:val="%7." ></w:lvlText>
120 <w:lvlJc w:val="left" ></w:lvlJc>
121 <w:pPr >
122 <w:tabs >
123 <w:tab w:val="list" w:pos="5040" ></w:tab>
124 </w:tabs>
125 <w:ind w:hanging="360" w:left="5040" ></w:ind>
126 </w:pPr>
127 </w:lvl>
128 <w:lvl w:ilvl="7" w:tplc="04090019" >
129 <w:start w:val="1" ></w:start>
130 <w:nfc w:val="4" ></w:nfc>
131 <w:lvlText w:val="%8." ></w:lvlText>
132 <w:lvlJc w:val="left" ></w:lvlJc>
133 <w:pPr >
134 <w:tabs >
135 <w:tab w:val="list" w:pos="5760" ></w:tab>
136 </w:tabs>
137 <w:ind w:hanging="360" w:left="5760" ></w:ind>
138 </w:pPr>
139 </w:lvl>
140 <w:lvl w:ilvl="8" w:tentative="on" w:tplc="0409001B" >
141 <w:start w:val="1" ></w:start>
142 <w:nfc w:val="2" ></w:nfc>
143 <w:lvlText w:val="%9." ></w:lvlText>
144 <w:lvlJc w:val="right" ></w:lvlJc>
145 <w:pPr >
146 <w:tabs >
147 <w:tab w:val="list" w:pos="6480" ></w:tab>
148 </w:tabs>
149 <w:ind w:hanging="180" w:left="6480" ></w:ind>
150 </w:pPr>
151 </w:lvl>
152 </w:listDef>
153 <w:listDef w:listDefId="1" >
154 <w:plt w:val="HybridMultilevel" ></w:plt>
155 <w:tmpl w:val="6DBC60EA" ></w:tmpl>
156 <w:lvl w:ilvl="0" w:tplc="04090001" >
157 <w:start w:val="1" ></w:start>
158 <w:nfc w:val="23" ></w:nfc>
159 <w:lvlText w:val="" ></w:lvlText>
160 <w:lvlJc w:val="left" ></w:lvlJc>
161 <w:pPr >
162 <w:tabs >
163 <w:tab w:val="list" w:pos="720" ></w:tab>
164 </w:tabs>
165 <w:ind w:hanging="360" w:left="720" ></w:ind>
166 </w:pPr>
167 <w:rPr >
168 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
169 </w:rPr>
170 </w:lvl>
171 <w:lvl w:ilvl="1" w:tplc="04090003" >
172 <w:start w:val="1" ></w:start>
173 <w:nfc w:val="23" ></w:nfc>
174 <w:lvlText w:val="o" ></w:lvlText>
175 <w:lvlJc w:val="left" ></w:lvlJc>
176 <w:pPr >
177 <w:tabs >
178 <w:tab w:val="list" w:pos="1440" ></w:tab>
179 </w:tabs>
180 <w:ind w:hanging="360" w:left="1440" ></w:ind>
181 </w:pPr>
182 <w:rPr >
183 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
184 </w:rPr>
185 </w:lvl>
186 <w:lvl w:ilvl="2" w:tplc="04090005" >
187 <w:start w:val="1" ></w:start>
188 <w:nfc w:val="23" ></w:nfc>
189 <w:lvlText w:val="" ></w:lvlText>
190 <w:lvlJc w:val="left" ></w:lvlJc>
191 <w:pPr >
192 <w:tabs >
193 <w:tab w:val="list" w:pos="2160" ></w:tab>
194 </w:tabs>
195 <w:ind w:hanging="360" w:left="2160" ></w:ind>
196 </w:pPr>
197 <w:rPr >
198 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
199 </w:rPr>
200 </w:lvl>
201 <w:lvl w:ilvl="3" w:tplc="04090001" >
202 <w:start w:val="1" ></w:start>
203 <w:nfc w:val="23" ></w:nfc>
204 <w:lvlText w:val="" ></w:lvlText>
205 <w:lvlJc w:val="left" ></w:lvlJc>
206 <w:pPr >
207 <w:tabs >
208 <w:tab w:val="list" w:pos="2880" ></w:tab>
209 </w:tabs>
210 <w:ind w:hanging="360" w:left="2880" ></w:ind>
211 </w:pPr>
212 <w:rPr >
213 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
214 </w:rPr>
215 </w:lvl>
216 <w:lvl w:ilvl="4" w:tplc="04090003" >
217 <w:start w:val="1" ></w:start>
218 <w:nfc w:val="23" ></w:nfc>
219 <w:lvlText w:val="o" ></w:lvlText>
220 <w:lvlJc w:val="left" ></w:lvlJc>
221 <w:pPr >
222 <w:tabs >
223 <w:tab w:val="list" w:pos="3600" ></w:tab>
224 </w:tabs>
225 <w:ind w:hanging="360" w:left="3600" ></w:ind>
226 </w:pPr>
227 <w:rPr >
228 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
229 </w:rPr>
230 </w:lvl>
231 <w:lvl w:ilvl="5" w:tplc="04090005" >
232 <w:start w:val="1" ></w:start>
233 <w:nfc w:val="23" ></w:nfc>
234 <w:lvlText w:val="" ></w:lvlText>
235 <w:lvlJc w:val="left" ></w:lvlJc>
236 <w:pPr >
237 <w:tabs >
238 <w:tab w:val="list" w:pos="4320" ></w:tab>
239 </w:tabs>
240 <w:ind w:hanging="360" w:left="4320" ></w:ind>
241 </w:pPr>
242 <w:rPr >
243 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
244 </w:rPr>
245 </w:lvl>
246 <w:lvl w:ilvl="6" w:tplc="04090001" >
247 <w:start w:val="1" ></w:start>
248 <w:nfc w:val="23" ></w:nfc>
249 <w:lvlText w:val="" ></w:lvlText>
250 <w:lvlJc w:val="left" ></w:lvlJc>
251 <w:pPr >
252 <w:tabs >
253 <w:tab w:val="list" w:pos="5040" ></w:tab>
254 </w:tabs>
255 <w:ind w:hanging="360" w:left="5040" ></w:ind>
256 </w:pPr>
257 <w:rPr >
258 <w:rFonts w:h-ansi="Symbol" w:hint="default" w:ascii="Symbol" ></w:rFonts>
259 </w:rPr>
260 </w:lvl>
261 <w:lvl w:ilvl="7" w:tplc="04090003" >
262 <w:start w:val="1" ></w:start>
263 <w:nfc w:val="23" ></w:nfc>
264 <w:lvlText w:val="o" ></w:lvlText>
265 <w:lvlJc w:val="left" ></w:lvlJc>
266 <w:pPr >
267 <w:tabs >
268 <w:tab w:val="list" w:pos="5760" ></w:tab>
269 </w:tabs>
270 <w:ind w:hanging="360" w:left="5760" ></w:ind>
271 </w:pPr>
272 <w:rPr >
273 <w:rFonts w:h-ansi="Courier New" w:cs="Courier New" w:hint="default" w:ascii="Courier New" ></w:rFonts>
274 </w:rPr>
275 </w:lvl>
276 <w:lvl w:ilvl="8" w:tplc="04090005" >
277 <w:start w:val="1" ></w:start>
278 <w:nfc w:val="23" ></w:nfc>
279 <w:lvlText w:val="" ></w:lvlText>
280 <w:lvlJc w:val="left" ></w:lvlJc>
281 <w:pPr >
282 <w:tabs >
283 <w:tab w:val="list" w:pos="6480" ></w:tab>
284 </w:tabs>
285 <w:ind w:hanging="360" w:left="6480" ></w:ind>
286 </w:pPr>
287 <w:rPr >
288 <w:rFonts w:h-ansi="Wingdings" w:hint="default" w:ascii="Wingdings" ></w:rFonts>
289 </w:rPr>
290 </w:lvl>
291 </w:listDef>
292 <BLANKLINE>
293 <BLANKLINE>
294 </w:lists>
295 <w:styles >
296 <w:versionOfBuiltInStylenames w:val="4" ></w:versionOfBuiltInStylenames>
297 <w:latentStyles w:latentStyleCount="156" w:defLockedState="off" ></w:latentStyles>
298 <w:style w:styleId="Normal" w:type="paragraph" w:default="on" >
299 <w:name w:val="Normal" ></w:name>
300 <w:pPr >
301 <w:spacing w:after="120" ></w:spacing>
302 </w:pPr>
303 <w:rPr >
304 <wx:font wx:val="Times New Roman" ></wx:font>
305 <w:sz-cs w:val="24" ></w:sz-cs>
306 <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" ></w:lang>
307 </w:rPr>
308 </w:style>
309 <w:style w:styleId="Hyperlink" w:type="character" >
310 <w:name w:val="Hyperlink" ></w:name>
311 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
312 <w:rPr >
313 <w:color w:val="0000FF" ></w:color>
314 <w:u w:val="single" ></w:u>
315 </w:rPr>
316 </w:style>
317 <w:style w:styleId="LiteralBlock" w:type="paragraph" >
318 <w:name w:val="LiteralBlock" ></w:name>
319 <w:basedOn w:val="Normal" ></w:basedOn>
320 <w:next w:val="Normal" ></w:next>
321 <w:pPr >
322 <w:pStyle w:val="LiteralBlock" ></w:pStyle>
323 <w:ind w:right="720" w:left="720" ></w:ind>
324 </w:pPr>
325 <w:rPr >
326 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
327 <wx:font wx:val="Courier New" ></wx:font><w:sz w:val="20" ></w:sz>
328 </w:rPr>
329 </w:style>
330 <w:style w:styleId="Heading1" w:type="paragraph" >
331 <w:name w:val="heading 1" ></w:name>
332 <wx:uiName wx:val="Heading 1" ></wx:uiName>
333 <w:basedOn w:val="Normal" ></w:basedOn>
334 <w:next w:val="Normal" ></w:next>
335 <w:pPr >
336 <w:pStyle w:val="Heading1" ></w:pStyle>
337 <w:keepNext ></w:keepNext>
338 <w:spacing w:before="240" w:after="60" ></w:spacing>
339 <w:outlineLvl w:val="0" ></w:outlineLvl>
340 </w:pPr>
341 <w:rPr >
342 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
343 <wx:font wx:val="Arial" ></wx:font>
344 <w:b ></w:b>
345 <w:b-cs ></w:b-cs>
346 <w:kern w:val="32" ></w:kern>
347 <w:sz w:val="32" ></w:sz>
348 <w:sz-cs w:val="32" ></w:sz-cs>
349 </w:rPr>
350 </w:style>
351 <w:style w:styleId="Heading2" w:type="paragraph" >
352 <w:name w:val="heading 2" ></w:name>
353 <wx:uiName wx:val="Heading 2" ></wx:uiName>
354 <w:basedOn w:val="Normal" ></w:basedOn>
355 <w:next w:val="Normal" ></w:next>
356 <w:pPr >
357 <w:pStyle w:val="Heading2" ></w:pStyle>
358 <w:keepNext ></w:keepNext>
359 <w:spacing w:before="240" w:after="60" ></w:spacing>
360 <w:outlineLvl w:val="1" ></w:outlineLvl>
361 </w:pPr>
362 <w:rPr >
363 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
364 <wx:font wx:val="Arial" ></wx:font>
365 <w:b ></w:b>
366 <w:b-cs ></w:b-cs>
367 <w:i ></w:i>
368 <w:i-cs ></w:i-cs>
369 <w:sz w:val="28" ></w:sz>
370 <w:sz-cs w:val="28" ></w:sz-cs>
371 </w:rPr>
372 </w:style>
373 <w:style w:styleId="Heading3" w:type="paragraph" >
374 <w:name w:val="heading 3" ></w:name>
375 <wx:uiName wx:val="Heading 3" ></wx:uiName>
376 <w:basedOn w:val="Normal" ></w:basedOn>
377 <w:next w:val="Normal" ></w:next>
378 <w:pPr >
379 <w:pStyle w:val="Heading3" ></w:pStyle>
380 <w:keepNext ></w:keepNext>
381 <w:spacing w:before="240" w:after="60" ></w:spacing>
382 <w:outlineLvl w:val="2" ></w:outlineLvl>
383 </w:pPr>
384 <w:rPr >
385 <w:rFonts w:h-ansi="Arial" w:cs="Arial" w:ascii="Arial" ></w:rFonts>
386 <wx:font wx:val="Arial" ></wx:font>
387 <w:b ></w:b>
388 <w:b-cs ></w:b-cs>
389 <w:sz w:val="26" ></w:sz>
390 <w:sz-cs w:val="26" ></w:sz-cs>
391 </w:rPr>
392 </w:style>
393 <w:style w:styleId="DefaultParagraphFont" w:type="character" w:default="on" >
394 <w:name w:val="Default Paragraph Font" ></w:name>
395 <w:semiHidden ></w:semiHidden>
396 </w:style>
397 <w:style w:styleId="TableNormal" w:type="table" w:default="on" >
398 <w:name w:val="Normal Table" ></w:name>
399 <wx:uiName wx:val="Table Normal" ></wx:uiName>
400 <w:semiHidden ></w:semiHidden>
401 <w:rPr >
402 <wx:font wx:val="Times New Roman" ></wx:font>
403 </w:rPr>
404 <w:tblPr >
405 <w:tblInd w:w="0" w:type="dxa" ></w:tblInd>
406 <w:tblCellMar >
407 <w:top w:w="0" w:type="dxa" ></w:top>
408 <w:left w:w="108" w:type="dxa" ></w:left>
409 <w:bottom w:w="0" w:type="dxa" ></w:bottom>
410 <w:right w:w="108" w:type="dxa" ></w:right>
411 </w:tblCellMar>
412 </w:tblPr>
413 </w:style>
414 <w:style w:styleId="NoList" w:type="list" w:default="on" >
415 <w:name w:val="No List" ></w:name>
416 <w:semiHidden ></w:semiHidden>
417 </w:style>
418 <w:style w:styleId="Literal" w:type="character" >
419 <w:name w:val="Literal" ></w:name>
420 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
421 <w:rPr >
422 <w:rFonts w:h-ansi="Courier New" w:ascii="Courier New" ></w:rFonts>
423 </w:rPr>
424 </w:style>
425 <w:style w:styleId="EndnoteText" w:type="paragraph" >
426 <w:name w:val="endnote text" ></w:name>
427 <wx:uiName wx:val="Endnote Text" ></wx:uiName>
428 <w:basedOn w:val="Normal" ></w:basedOn>
429 <w:semiHidden ></w:semiHidden>
430 <w:pPr >
431 <w:pStyle w:val="EndnoteText" ></w:pStyle>
432 </w:pPr>
433 <w:rPr >
434 <wx:font wx:val="Times New Roman" ></wx:font>
435 <w:sz w:val="20" ></w:sz>
436 <w:sz-cs w:val="20" ></w:sz-cs>
437 </w:rPr>
438 </w:style>
439 <w:style w:styleId="EndnoteReference" w:type="character" >
440 <w:name w:val="endnote reference" ></w:name>
441 <wx:uiName wx:val="Endnote Reference" ></wx:uiName>
442 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
443 <w:semiHidden ></w:semiHidden>
444 <w:rPr >
445 <w:vertAlign w:val="superscript" ></w:vertAlign>
446 </w:rPr>
447 </w:style>
448 <w:style w:styleId="AuthorName" w:type="paragraph" >
449 <w:name w:val="AuthorName" ></w:name>
450 <w:basedOn w:val="Normal" ></w:basedOn>
451 <w:next w:val="Normal" ></w:next>
452 <w:pPr >
453 <w:pStyle w:val="AuthorName" ></w:pStyle>
454 <w:spacing w:before="240" w:after="240" ></w:spacing>
455 <w:jc w:val="center" ></w:jc>
456 </w:pPr>
457 <w:rPr >
458 <w:b ></w:b>
459 </w:rPr>
460 </w:style>
461 <w:style w:styleId="AuthorContact" w:type="paragraph" >
462 <w:name w:val="AuthorContact" ></w:name>
463 <w:basedOn w:val="Normal" ></w:basedOn>
464 <w:next w:val="Normal" ></w:next>
465 <w:pPr >
466 <w:pStyle w:val="AuthorContact" ></w:pStyle>
467 <w:spacing w:before="240" w:after="240" ></w:spacing>
468 <w:jc w:val="center" ></w:jc>
469 </w:pPr>
470 <w:rPr >
471 <wx:font wx:val="Times New Roman" ></wx:font>
472 <w:b ></w:b>
473 </w:rPr>
474 </w:style>
475 <w:style w:styleId="BibliographMatter" w:type="paragraph" >
476 <w:name w:val="BibliographMatter" ></w:name>
477 <w:basedOn w:val="Normal" ></w:basedOn>
478 <w:next w:val="Normal" ></w:next>
479 <w:pPr >
480 <w:pStyle w:val="BibliographMatter" ></w:pStyle>
481 <w:spacing w:before="240" w:after="240" ></w:spacing>
482 <w:jc w:val="center" ></w:jc>
483 </w:pPr>
484 <w:rPr >
485 <w:b ></w:b>
486 </w:rPr>
487 </w:style>
488 <w:style w:styleId="DefinitionTerm" w:type="paragraph" >
489 <w:name w:val="DefinitionTerm" ></w:name>
490 <w:basedOn w:val="Normal" ></w:basedOn>
491 <w:next w:val="Normal" ></w:next>
492 <w:pPr >
493 <w:pStyle w:val="DefinitionTerm" ></w:pStyle>
494 </w:pPr>
495 <w:rPr >
496 <w:b ></w:b>
497 </w:rPr>
498 </w:style>
499 <w:style w:styleId="Definition" w:type="paragraph" >
500 <w:name w:val="Definition" ></w:name>
501 <w:basedOn w:val="Normal" ></w:basedOn>
502 <w:next w:val="Normal" ></w:next>
503 <w:pPr >
504 <w:pStyle w:val="Definition" ></w:pStyle>
505 </w:pPr>
506 </w:style>
507 <w:style w:styleId="CitationReference" w:type="character" >
508 <w:name w:val="CitationReference" ></w:name>
509 <w:basedOn w:val="DefaultParagraphFont" ></w:basedOn>
510 </w:style>
511 <w:style w:styleId="Topic" w:type="paragraph" >
512 <w:name w:val="Topic" ></w:name>
513 <w:basedOn w:val="Normal" ></w:basedOn>
514 <w:next w:val="Normal" ></w:next>
515 <w:pPr >
516 <w:pStyle w:val="Topic" ></w:pStyle>
517 <w:ind w:right="1440" w:left="1440" ></w:ind>
518 <w:jc w:val="both" ></w:jc>
519 </w:pPr>
520 </w:style>
521 </w:styles>
522 <w:docPr >
523 <w:view w:val="print" ></w:view>
524 <w:zoom w:percent="100" ></w:zoom>
525 <w:doNotEmbedSystemFonts ></w:doNotEmbedSystemFonts>
526 <w:proofState w:grammar="clean" w:spelling="clean" ></w:proofState>
527 <w:attachedTemplate w:val="" ></w:attachedTemplate>
528 <w:defaultTabStop w:val="720" ></w:defaultTabStop>
529 <w:punctuationKerning ></w:punctuationKerning>
530 <w:characterSpacingControl w:val="DontCompress" ></w:characterSpacingControl>
531 <w:optimizeForBrowser ></w:optimizeForBrowser>
532 <w:validateAgainstSchema ></w:validateAgainstSchema>
533 <w:saveInvalidXML w:val="off" ></w:saveInvalidXML>
534 <w:ignoreMixedContent w:val="off" ></w:ignoreMixedContent>
535 <w:alwaysShowPlaceholderText w:val="off" ></w:alwaysShowPlaceholderText>
536 <w:compat >
537 <w:breakWrappedTables ></w:breakWrappedTables>
538 <w:snapToGridInCell ></w:snapToGridInCell>
539 <w:wrapTextWithPunct ></w:wrapTextWithPunct>
540 <w:useAsianBreakRules ></w:useAsianBreakRules>
541 <w:useWord2002TableStyleRules ></w:useWord2002TableStyleRules>
542 </w:compat>
543 <w:footnotePr >
544 <w:footnote w:type="separator" >
545 <w:p >
546 <w:r >
547 <w:separator ></w:separator>
548 </w:r>
549 </w:p>
550 </w:footnote>
551 <w:footnote w:type="continuation-separator" >
552 <w:p >
553 <w:r >
554 <w:continuationSeparator ></w:continuationSeparator>
555 </w:r>
556 </w:p>
557 </w:footnote>
558 </w:footnotePr>
559 <w:endnotePr >
560 <w:numFmt w:val="decimal" ></w:numFmt>
561 <w:endnote w:type="separator" >
562 <w:p >
563 <w:r >
564 <w:separator ></w:separator>
565 </w:r>
566 </w:p>
567 </w:endnote>
568 <w:endnote w:type="continuation-separator" >
569 <w:p >
570 <w:r >
571 <w:continuationSeparator ></w:continuationSeparator>
572 </w:r>
573 </w:p>
574 </w:endnote>
575 </w:endnotePr>
576 </w:docPr>
577 <w:body >
578 <wx:sect >
579 <w:p>
580 <w:pPr>
581 <w:pStyle w:val="Heading1">
582 </w:pStyle>
583 </w:pPr>
584 <w:r>
585 <w:t>Table Test</w:t>
586 </w:r>
587 </w:p>
588 <w:p>
589 <w:r>
590 <w:t>This document contains a table and is meant to test the spans and what not.</w:t>
591 </w:r>
592 </w:p>
593 <aml:annotation aml:id="1001" w:name="title" w:type="Word.Bookmark.Start">
594 </aml:annotation>
595 <aml:annotation aml:id="1001" w:name="title" w:type="Word.Bookmark.End">
596 </aml:annotation>
597 <w:p>
598 <w:pPr>
599 <w:pStyle w:val="Heading2">
600 </w:pStyle>
601 </w:pPr>
602 <w:r>
603 <w:t>Title</w:t>
604 </w:r>
605 </w:p>
606 <w:tbl>
607 <w:tblPr>
608 <w:tblStyle w:val="Normal">
609 </w:tblStyle>
610 <w:tblW w:type="pct" w:w="5000">
611 </w:tblW>
612 <w:tblBorders>
613 <w:top w:space="0" w:val="single" wx:bdrwidth="10" w:sz="4" w:color="auto">
614 </w:top>
615 <w:left w:space="0" w:val="single" wx:bdrwidth="10" w:sz="4" w:color="auto">
616 </w:left>
617 <w:bottom w:space="0" w:val="single" wx:bdrwidth="10" w:sz="4" w:color="auto">
618 </w:bottom>
619 <w:right w:space="0" w:val="single" wx:bdrwidth="10" w:sz="4" w:color="auto">
620 </w:right>
621 <w:insideH w:space="0" w:val="single" wx:bdrwidth="15" w:sz="6" w:color="auto">
622 </w:insideH>
623 <w:insideV w:space="0" w:val="single" wx:bdrwidth="15" w:sz="6" w:color="auto">
624 </w:insideV>
625 </w:tblBorders>
626 <w:tblLook w:val="000001e0">
627 </w:tblLook>
628 </w:tblPr>
629 <w:tr>
630 <w:tc>
631 <w:tcPr>
632 <w:tcW w:type="pct" w="27">
633 </w:tcW>
634 </w:tcPr>
635 <w:p>
636 <w:r>
637 <w:t>Cell 1</w:t>
638 </w:r>
639 </w:p>
640 </w:tc>
641 <w:tc>
642 <w:tcPr>
643 <w:tcW w:type="pct" w="24">
644 </w:tcW>
645 </w:tcPr>
646 <w:p>
647 <w:r>
648 <w:t>Cell 2</w:t>
649 </w:r>
650 </w:p>
651 </w:tc>
652 <w:tc>
653 <w:tcPr>
654 <w:tcW w:type="pct" w="24">
655 </w:tcW>
656 </w:tcPr>
657 <w:p>
658 <w:r>
659 <w:t>Cell 3</w:t>
660 </w:r>
661 </w:p>
662 </w:tc>
663 <w:tc>
664 <w:tcPr>
665 <w:tcW w:type="pct" w="24">
666 </w:tcW>
667 </w:tcPr>
668 <w:p>
669 <w:r>
670 <w:t>Cell 4</w:t>
671 </w:r>
672 </w:p>
673 </w:tc>
674 </w:tr>
675 <w:tr>
676 <w:tc>
677 <w:tcPr>
678 <w:tcW w:type="pct" w="27">
679 </w:tcW>
680 <w:vmerge w:val="restart">
681 </w:vmerge>
682 </w:tcPr>
683 <w:p>
684 <w:r>
685 <w:t>This</w:t>
686 </w:r>
687 </w:p>
688 <w:p>
689 <w:r>
690 <w:t>cells</w:t>
691 </w:r>
692 </w:p>
693 </w:tc>
694 <w:tc>
695 <w:tcPr>
696 <w:tcW w:type="pct" w="24">
697 </w:tcW>
698 <w:hmerge w:val="restart">
699 </w:hmerge>
700 </w:tcPr>
701 <w:p>
702 <w:r>
703 <w:t>is a test of</w:t>
704 </w:r>
705 </w:p>
706 </w:tc>
707 <w:tc>
708 <w:tcPr>
709 <w:tcW w:type="pct" w="24">
710 <w:hmerge>
711 </w:hmerge>
712 </w:tcW>
713 </w:tcPr>
714 <w:p>
715 </w:p>
716 </w:tc>
717 <w:tc>
718 <w:tcPr>
719 <w:tcW w:type="pct" w="24">
720 </w:tcW>
721 </w:tcPr>
722 <w:p>
723 <w:r>
724 <w:t>joined</w:t>
725 </w:r>
726 </w:p>
727 </w:tc>
728 </w:tr>
729 <w:tr>
730 <w:tc>
731 <w:tcPr>
732 <w:tcW w:type="pct" w="27">
733 <w:vmerge>
734 </w:vmerge>
735 </w:tcW>
736 </w:tcPr>
737 <w:p>
738 </w:p>
739 </w:tc>
740 <w:tc>
741 <w:tcPr>
742 <w:tcW w:type="pct" w="24">
743 </w:tcW>
744 </w:tcPr>
745 <w:p>
746 <w:r>
747 <w:t>and ho</w:t>
748 </w:r>
749 </w:p>
750 </w:tc>
751 <w:tc>
752 <w:tcPr>
753 <w:tcW w:type="pct" w="24">
754 </w:tcW>
755 </w:tcPr>
756 <w:p>
757 <w:r>
758 <w:t>they</w:t>
759 </w:r>
760 </w:p>
761 </w:tc>
762 <w:tc>
763 <w:tcPr>
764 <w:tcW w:type="pct" w="24">
765 </w:tcW>
766 </w:tcPr>
767 <w:p>
768 <w:r>
769 <w:t>work</w:t>
770 </w:r>
771 </w:p>
772 </w:tc>
773 </w:tr>
774 </w:tbl>
775 <w:p>
776 </w:p>
777 <w:p>
778 <w:r>
779 <w:t>This is some closing text just to surround the table with something for effect.</w:t>
780 </w:r>
781 </w:p>
782 <w:p>
783 <w:r>
784 <w:t>This is </w:t>
785 </w:r>
786 <w:r>
787 <w:rPr>
788 <w:i>
789 </w:i>
790 </w:rPr>
791 <w:t>emphasized text</w:t>
792 </w:r>
793 <w:r>
794 <w:t>.</w:t>
795 </w:r>
796 </w:p>
797 <w:p>
798 <w:r>
799 <w:t>This is a footnote reference </w:t>
800 </w:r>
801 <w:r>
802 <w:rPr>
803 <w:rStyle w:val="EndnoteReference">
804 </w:rStyle>
805 </w:rPr>
806 <w:endnote>
807 <w:p>
808 <w:pPr>
809 <w:pStyle w:val="EndnoteText">
810 </w:pStyle>
811 </w:pPr>
812 <w:r>
813 <w:rPr>
814 <w:rStyle w:val="EndnoteReference">
815 </w:rStyle>
816 </w:rPr>
817 <w:endnoteRef>
818 </w:endnoteRef>
819 </w:r>
820 <w:r>
821 <w:t>This is a footnote text.</w:t>
822 </w:r>
823 </w:p>
824 </w:endnote>
825 </w:r>
826 <w:r>
827 <w:t>.</w:t>
828 </w:r>
829 </w:p>
830 <w:p>
831 </w:p>
832 <BLANKLINE>
833 <w:sectPr >
834 <w:endnotePr >
835 <w:numFmt w:val="decimal" ></w:numFmt>
836 </w:endnotePr>
837 <w:pgSz w:w="12240" w:h="15840" ></w:pgSz>
838 <w:pgMar w:header="720" w:gutter="0" w:right="1800" w:top="1440" w:bottom="1440" w:footer="720" w:left="1800" ></w:pgMar>
839 <w:cols w:space="720" ></w:cols>
840 <w:docGrid w:line-pitch="360" ></w:docGrid>
841 </w:sectPr>
842 </wx:sect>
843 </w:body>
844 </w:wordDocument>
847 from docutils import core, io
849 def test_wordml( input_string ):
850 overrides = { 'template' : '../template.xml' }
851 parts = core.publish_string( input_string, writer_name='docutils_wordml', settings_overrides=overrides )
852 print parts
854 def _test():
855 import doctest
856 doctest.testmod()
858 if __name__ == "__main__":
859 _test()