propaganda 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/fop_test.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'helper'
2
+
3
+ class FopTest < Test::Unit::TestCase
4
+ should "render a formatting object document to pdf" do
5
+ File.delete('test/samples/sample.pdf') rescue nil
6
+ assert File.exists?('test/samples/sample.html')
7
+ text = IO.read('test/samples/sample.html')
8
+ fop = Propaganda::Fop.new(true)
9
+ fop.render(text, 'test/samples/sample.pdf')
10
+ assert File.exists?('test/samples/sample.pdf'), Propaganda::Fop::Errors.toString
11
+ end
12
+
13
+ should "get the version" do
14
+ fop = Propaganda::Fop.new
15
+ assert fop.version
16
+ end
17
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'propaganda'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -0,0 +1,574 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:html="http://www.w3.org/1999/xhtml" writing-mode="lr-tb" hyphenate="false" text-align="start" role="html:html">
3
+ <fo:layout-master-set>
4
+ <fo:simple-page-master page-width="auto" page-height="auto" master-name="all-pages">
5
+ <fo:region-body column-gap="12pt" column-count="1" margin-left="1in" margin-bottom="1in" margin-right="1in" margin-top="1in"/>
6
+ <fo:region-before display-align="before" extent="1in" region-name="page-header"/>
7
+ <fo:region-after display-align="after" extent="1in" region-name="page-footer"/>
8
+ <fo:region-start extent="1in"/>
9
+ <fo:region-end extent="1in"/>
10
+ </fo:simple-page-master>
11
+ </fo:layout-master-set>
12
+
13
+ <fo:page-sequence master-reference="all-pages">
14
+ <fo:title>Your Ad Here </fo:title>
15
+ <fo:static-content flow-name="page-header">
16
+ <fo:block font-size="small" text-align="center" space-before="0.5in" space-before.conditionality="retain">Your Ad Here </fo:block>
17
+ </fo:static-content>
18
+ <fo:static-content flow-name="page-footer">
19
+ <fo:block font-size="small" text-align="center" space-after="0.5in" space-after.conditionality="retain">- <fo:page-number/> -</fo:block>
20
+ </fo:static-content>
21
+ <fo:flow flow-name="xsl-region-body">
22
+ <fo:block role="html:body">
23
+ <fo:block font-size="2em" font-weight="700" space-before="0.67em" space-after="0.67em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h1"> This is Heading 1 </fo:block>
24
+ <fo:block space-before="1em" space-after="1em" role="html:p">
25
+ <fo:inline role="html:span">This sample is made based on the <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.w3.org/StyleSheets/Core/preview')">original HTML Element Sampler.</fo:basic-link> We add some more samples of list and table to the original sampler. </fo:inline>
26
+ </fo:block>
27
+
28
+
29
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. This sentence contains <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.w3.org/')">a link</fo:basic-link> to W3C, which you have probably visited. This sentence contains a link to <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.foo.net/')">someplace else</fo:basic-link>. This is <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.htmlhelp.com/')">an offsite link</fo:basic-link>. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.</fo:block>
30
+
31
+ <fo:block font-size="1.5em" font-weight="700" space-before="0.83em" space-after="0.83em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h2"> I'm Heading 2 </fo:block>
32
+
33
+ <fo:block space-before="1em" space-after="1em" role="html:p">
34
+ This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
35
+
36
+ <fo:block font-size="1.17em" font-weight="700" space-before="1em" space-after="1em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h3">Heading 3 here </fo:block>
37
+
38
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.</fo:block>
39
+
40
+ <fo:block font-size="1em" font-weight="700" space-before="1.17em" space-after="1.17em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h4">Heading 4: the final insult </fo:block>
41
+
42
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
43
+
44
+ <fo:block font-size="0.83em" font-weight="700" space-before="1.33em" space-after="1.33em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h5">Heading 5 I Am said Sam. In the Mosaic browser default stylesheet, I'm one step smaller than normal paragraph text. In the Core Style Project, I am still one step larger.
45
+ </fo:block>
46
+
47
+ <fo:block space-before="1em" space-after="1em" role="html:p">
48
+ This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
49
+
50
+ <fo:block font-size="0.67em" font-weight="700" space-before="1.67em" space-after="1.67em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h6">Heading 6, extended to produce a line break, so as to be able to determine line-height. This ought to do it, what? In the Mosaic browser default stylesheet,
51
+ </fo:block>
52
+
53
+ <fo:block space-before="1em" space-after="1em" role="html:p">This sentence contains <fo:inline font-style="italic" role="html:em">This sentence contains </fo:inline>. This sentence contains <fo:inline font-weight="700" role="html:strong">a strongly emphasized</fo:inline>phrase. This sentence contains <fo:inline font-style="italic" role="html:em">a strongly emphasized bit <fo:inline font-weight="700" font-style="italic" role="html:strong">within</fo:inline> an emphasized phrase</fo:inline>
54
+ <fo:inline font-weight="700" role="html:strong">This sentence has the class "warning".</fo:inline>
55
+ </fo:block>
56
+
57
+ <fo:block space-before="1em" space-after="1em" role="html:p">
58
+ <fo:inline font-size="larger" role="html:big">This is big.</fo:inline>
59
+ <fo:inline font-size="smaller" role="html:small">This is small.</fo:inline>
60
+ <fo:inline font-family="monospace" role="html:samp">This is SAMP.</fo:inline>
61
+ <fo:inline baseline-shift="sub" font-size="smaller" role="html:sub">This is sub.</fo:inline>
62
+ <fo:inline baseline-shift="super" font-size="smaller" role="html:sup">This is sup.</fo:inline>
63
+ <fo:inline text-decoration="line-through" role="html:s">This is S.</fo:inline>
64
+ <fo:inline text-decoration="line-through" role="html:strike" keep-together.within-line="always">This is strike.</fo:inline>
65
+ <fo:inline font-family="monospace" role="html:tt">This is tt.</fo:inline>
66
+ <fo:inline text-decoration="underline" role="html:u">This is U.</fo:inline>
67
+ <fo:inline font-style="italic" role="html:cite">This is cite.</fo:inline>
68
+
69
+ <fo:inline text-decoration="underline" role="html:ins">This is INS</fo:inline>
70
+
71
+ <fo:inline text-decoration="line-through" role="html:del">This is DEL</fo:inline>
72
+ <fo:inline role="html:abbr">This is DEL</fo:inline>. This sentence contains an acronym: <fo:inline role="html:acronym">Nato</fo:inline>In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
73
+
74
+ <fo:block font-size="1.5em" font-weight="700" space-before="0.83em" space-after="0.83em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h2" break-before="page">Heading 2 </fo:block>
75
+
76
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph with the class "initial". In an indented paragraph scheme, I generally won't be. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
77
+
78
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
79
+
80
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph with the "small thematic break" (stb) class. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
81
+
82
+ <fo:block space-before="1em" space-after="1em" role="html:p">
83
+ This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
84
+
85
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph with the "medium thematic break" (mtb) class. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
86
+
87
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
88
+
89
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
90
+
91
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph with the "large thematic break" (ltb) class. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
92
+
93
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
94
+
95
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
96
+
97
+ <fo:block font-size="1.5em" font-weight="700" space-before="0.83em" space-after="0.83em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h2">Heading 2 </fo:block>
98
+
99
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
100
+
101
+ <fo:block start-indent="inherited-property-value(start-indent) + 24pt" end-indent="inherited-property-value(end-indent) + 24pt" space-before="1em" space-after="1em" role="html:blockquote">This is a blockquote. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. I'll keep this up a bit longer and then move on. I've read more substantial greeting cards than this.</fo:block>
102
+
103
+ <fo:block font-size="1.17em" font-weight="700" space-before="1em" space-after="1em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h3">Heading 3 </fo:block>
104
+
105
+ <fo:block space-before="1em" space-after="1em" role="html:p">
106
+ This is a paragraph. It's just something I threw together. This sentence contains <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.w3.org/')">a link</fo:basic-link> to W3C, which you have probably visited. This sentence contains a link to <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.foo.net/')">someplace else</fo:basic-link>. This is <fo:basic-link text-decoration="underline" color="blue" role="html:a" external-destination="url('http://www.unpronounceable.com/')">an offsite link</fo:basic-link>. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
107
+ </fo:block>
108
+
109
+
110
+ <fo:list-block space-before="1em" space-after="1em" role="html:ol">
111
+ <fo:list-item relative-align="baseline" role="html:li">
112
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
113
+ <fo:block>
114
+ <fo:inline>1.</fo:inline>
115
+ </fo:block>
116
+ </fo:list-item-label>
117
+ <fo:list-item-body start-indent="body-start()">
118
+ <fo:block>this is an ordered list item. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
119
+ </fo:list-item-body>
120
+ </fo:list-item>
121
+
122
+ <fo:list-item relative-align="baseline" role="html:li">
123
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
124
+ <fo:block>
125
+ <fo:inline>2.</fo:inline>
126
+ </fo:block>
127
+ </fo:list-item-label>
128
+ <fo:list-item-body start-indent="body-start()">
129
+ <fo:block>
130
+ this is another ordered list item
131
+
132
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ul">
133
+ <fo:list-item relative-align="baseline" role="html:li">
134
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
135
+ <fo:block>
136
+ <fo:inline font="1em serif">•</fo:inline>
137
+ </fo:block>
138
+ </fo:list-item-label>
139
+ <fo:list-item-body start-indent="body-start()">
140
+ <fo:block>。This is an unordered list within an ordered one.</fo:block>
141
+ </fo:list-item-body>
142
+ </fo:list-item>
143
+
144
+ <fo:list-item relative-align="baseline" role="html:li">
145
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
146
+ <fo:block>
147
+ <fo:inline font="1em serif">•</fo:inline>
148
+ </fo:block>
149
+ </fo:list-item-label>
150
+ <fo:list-item-body start-indent="body-start()">
151
+ <fo:block>This is another unordered list item.
152
+
153
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ol">
154
+ <fo:list-item relative-align="baseline" role="html:li">
155
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
156
+ <fo:block>
157
+ <fo:inline>a.</fo:inline>
158
+ </fo:block>
159
+ </fo:list-item-label>
160
+ <fo:list-item-body start-indent="body-start()">
161
+ <fo:block>Just to be mean, here's another ordered list - inside the unordered list.</fo:block>
162
+ </fo:list-item-body>
163
+ </fo:list-item>
164
+
165
+ <fo:list-item relative-align="baseline" role="html:li">
166
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
167
+ <fo:block>
168
+ <fo:inline>b.</fo:inline>
169
+ </fo:block>
170
+ </fo:list-item-label>
171
+ <fo:list-item-body start-indent="body-start()">
172
+ <fo:block>...and another list item, to fill space.</fo:block>
173
+ </fo:list-item-body>
174
+ </fo:list-item>
175
+ </fo:list-block>
176
+ </fo:block>
177
+ </fo:list-item-body>
178
+ </fo:list-item>
179
+
180
+ <fo:list-item relative-align="baseline" role="html:li">
181
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
182
+ <fo:block>
183
+ <fo:inline font="1em serif">•</fo:inline>
184
+ </fo:block>
185
+ </fo:list-item-label>
186
+ <fo:list-item-body start-indent="body-start()">
187
+ <fo:block>This is a third item in that unordered list.</fo:block>
188
+ </fo:list-item-body>
189
+ </fo:list-item>
190
+
191
+ <fo:list-item relative-align="baseline" role="html:li">
192
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
193
+ <fo:block>
194
+ <fo:inline font="1em serif">•</fo:inline>
195
+ </fo:block>
196
+ </fo:list-item-label>
197
+ <fo:list-item-body start-indent="body-start()">
198
+ <fo:block>
199
+ This is a fourth.
200
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ul">
201
+ <fo:list-item relative-align="baseline" role="html:li">
202
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
203
+ <fo:block>
204
+ <fo:inline font="0.67em monospace" baseline-shift="0.25em">o</fo:inline>
205
+ </fo:block>
206
+ </fo:list-item-label>
207
+ <fo:list-item-body start-indent="body-start()">
208
+ <fo:block>
209
+ Here's anoter unordered list - nested deeper.
210
+ </fo:block>
211
+ </fo:list-item-body>
212
+ </fo:list-item>
213
+ <fo:list-item relative-align="baseline" role="html:li">
214
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
215
+ <fo:block>
216
+ <fo:inline font="0.67em monospace" baseline-shift="0.25em">o</fo:inline>
217
+ </fo:block>
218
+ </fo:list-item-label>
219
+ <fo:list-item-body start-indent="body-start()">
220
+ <fo:block>
221
+ Here's yet another unordered list.
222
+
223
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ul">
224
+ <fo:list-item relative-align="baseline" role="html:li">
225
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
226
+ <fo:block>
227
+ <fo:inline font-weight="700" font-size="0.9em" font-family="sans-serif" baseline-shift="0.05em">-</fo:inline>
228
+ </fo:block>
229
+ </fo:list-item-label>
230
+ <fo:list-item-body start-indent="body-start()">
231
+ <fo:block>Here's another unordered list - inside the unordered list.
232
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ul">
233
+ <fo:list-item relative-align="baseline" role="html:li">
234
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
235
+ <fo:block>
236
+ <fo:inline font-weight="700" font-size="0.9em" font-family="sans-serif" baseline-shift="0.05em">-</fo:inline>
237
+ </fo:block>
238
+ </fo:list-item-label>
239
+ <fo:list-item-body start-indent="body-start()">
240
+ <fo:block>Here's another unordered list - nested deeper.</fo:block>
241
+ </fo:list-item-body>
242
+ </fo:list-item>
243
+ <fo:list-item relative-align="baseline" role="html:li">
244
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
245
+ <fo:block>
246
+ <fo:inline font-weight="700" font-size="0.9em" font-family="sans-serif" baseline-shift="0.05em">-</fo:inline>
247
+ </fo:block>
248
+ </fo:list-item-label>
249
+ <fo:list-item-body start-indent="body-start()">
250
+ <fo:block>...and another list item, to fill space.</fo:block>
251
+ </fo:list-item-body>
252
+ </fo:list-item>
253
+ </fo:list-block>
254
+ </fo:block>
255
+ </fo:list-item-body>
256
+ </fo:list-item>
257
+ <fo:list-item relative-align="baseline" role="html:li">
258
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
259
+ <fo:block>
260
+ <fo:inline font-weight="700" font-size="0.9em" font-family="sans-serif" baseline-shift="0.05em">-</fo:inline>
261
+ </fo:block>
262
+ </fo:list-item-label>
263
+ <fo:list-item-body start-indent="body-start()">
264
+ <fo:block>...and another list item, to fill space.</fo:block>
265
+ </fo:list-item-body>
266
+ </fo:list-item>
267
+ </fo:list-block>
268
+ </fo:block>
269
+ </fo:list-item-body>
270
+ </fo:list-item>
271
+ </fo:list-block>
272
+
273
+
274
+ </fo:block>
275
+ </fo:list-item-body>
276
+ </fo:list-item>
277
+ </fo:list-block>
278
+ </fo:block>
279
+ </fo:list-item-body>
280
+ </fo:list-item>
281
+
282
+ <fo:list-item relative-align="baseline" role="html:li">
283
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
284
+ <fo:block>
285
+ <fo:inline>3.</fo:inline>
286
+ </fo:block>
287
+ </fo:list-item-label>
288
+ <fo:list-item-body start-indent="body-start()">
289
+ <fo:block>This is item 3 in the initial ordered list.</fo:block>
290
+ </fo:list-item-body>
291
+ </fo:list-item>
292
+
293
+ <fo:list-item relative-align="baseline" role="html:li">
294
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
295
+ <fo:block>
296
+ <fo:inline>4.</fo:inline>
297
+ </fo:block>
298
+ </fo:list-item-label>
299
+ <fo:list-item-body start-indent="body-start()">
300
+ <fo:block>This is item 4.</fo:block>
301
+ </fo:list-item-body>
302
+ </fo:list-item>
303
+ </fo:list-block>
304
+
305
+ <fo:list-block space-before="1em" space-after="1em" role="html:ol" keep-together.within-page="always">
306
+ <fo:list-item relative-align="baseline" role="html:li">
307
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
308
+ <fo:block>
309
+ <fo:inline>1.</fo:inline>
310
+ </fo:block>
311
+ </fo:list-item-label>
312
+ <fo:list-item-body start-indent="body-start()">
313
+ <fo:block>this is an ordered list item. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
314
+
315
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ol">
316
+ <fo:list-item relative-align="baseline" role="html:li">
317
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
318
+ <fo:block>
319
+ <fo:inline>a.</fo:inline>
320
+ </fo:block>
321
+ </fo:list-item-label>
322
+ <fo:list-item-body start-indent="body-start()">
323
+ <fo:block>Here's another ordered list - inside the ordered list.
324
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ol">
325
+ <fo:list-item relative-align="baseline" role="html:li">
326
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
327
+ <fo:block>
328
+ <fo:inline>i.</fo:inline>
329
+ </fo:block>
330
+ </fo:list-item-label>
331
+ <fo:list-item-body start-indent="body-start()">
332
+ <fo:block>Here's yet another ordered list - nested deeper.
333
+ <fo:list-block space-before="0pt" space-after="0pt" role="html:ol">
334
+ <fo:list-item relative-align="baseline" role="html:li">
335
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
336
+ <fo:block>
337
+ <fo:inline>i.</fo:inline>
338
+ </fo:block>
339
+ </fo:list-item-label>
340
+ <fo:list-item-body start-indent="body-start()">
341
+ <fo:block>Here's another ordered list - inside the ordered list.</fo:block>
342
+ </fo:list-item-body>
343
+ </fo:list-item>
344
+ <fo:list-item relative-align="baseline" role="html:li">
345
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
346
+ <fo:block>
347
+ <fo:inline>ii.</fo:inline>
348
+ </fo:block>
349
+ </fo:list-item-label>
350
+ <fo:list-item-body start-indent="body-start()">
351
+ <fo:block>...and another list item, to fill space.</fo:block>
352
+ </fo:list-item-body>
353
+ </fo:list-item>
354
+ </fo:list-block>
355
+
356
+ </fo:block>
357
+ </fo:list-item-body>
358
+ </fo:list-item>
359
+
360
+ <fo:list-item relative-align="baseline" role="html:li">
361
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
362
+ <fo:block>
363
+ <fo:inline>ii.</fo:inline>
364
+ </fo:block>
365
+ </fo:list-item-label>
366
+ <fo:list-item-body start-indent="body-start()">
367
+ <fo:block>...and yet another list item, to fill space.</fo:block>
368
+ </fo:list-item-body>
369
+ </fo:list-item>
370
+ </fo:list-block>
371
+ </fo:block>
372
+ </fo:list-item-body>
373
+ </fo:list-item>
374
+
375
+ <fo:list-item relative-align="baseline" role="html:li">
376
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
377
+ <fo:block>
378
+ <fo:inline>b.</fo:inline>
379
+ </fo:block>
380
+ </fo:list-item-label>
381
+ <fo:list-item-body start-indent="body-start()">
382
+ <fo:block>...and another list item, to fill space.</fo:block>
383
+ </fo:list-item-body>
384
+ </fo:list-item>
385
+ </fo:list-block>
386
+ </fo:block>
387
+ </fo:list-item-body>
388
+ </fo:list-item>
389
+
390
+ <fo:list-item relative-align="baseline" role="html:li">
391
+ <fo:list-item-label wrap-option="no-wrap" text-align="end" end-indent="label-end()">
392
+ <fo:block>
393
+ <fo:inline>2.</fo:inline>
394
+ </fo:block>
395
+ </fo:list-item-label>
396
+ <fo:list-item-body start-indent="body-start()">
397
+ <fo:block>this is another ordered list item </fo:block>
398
+ </fo:list-item-body>
399
+ </fo:list-item>
400
+ </fo:list-block>
401
+
402
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
403
+
404
+ <fo:block font-size="1em" font-weight="700" space-before="1.17em" space-after="1.17em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h4">Heading 4 </fo:block>
405
+
406
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
407
+
408
+ <fo:block space-before="1em" space-after="1em" role="html:dl">
409
+ <fo:block keep-with-next.within-column="always" keep-together.within-column="always" role="html:dt">Definition Term</fo:block>
410
+
411
+ <fo:block start-indent="inherited-property-value(start-indent) + 24pt" role="html:dd">Definition data. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
412
+ </fo:block>
413
+
414
+ <fo:block display-align="center">
415
+ <fo:block start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="center" text-align-last="relative" font-size="smaller" font-style="italic" role="html:caption">
416
+ <fo:block>Table caption</fo:block>
417
+ </fo:block>
418
+ <fo:table table-layout="fixed" width="100%" border-collapse="separate" border-spacing="2px" border="1px" role="html:table">
419
+ <fo:table-header start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:thead">
420
+ <fo:table-row role="html:tr">
421
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" role="html:th">
422
+ <fo:block>Table Head 1</fo:block>
423
+ </fo:table-cell>
424
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" role="html:th">
425
+ <fo:block>Table Head 2</fo:block>
426
+ </fo:table-cell>
427
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" role="html:th">
428
+ <fo:block>Table Head 3</fo:block>
429
+ </fo:table-cell>
430
+ </fo:table-row>
431
+ </fo:table-header>
432
+ <fo:table-body start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:tbody">
433
+ <fo:table-row role="html:tr">
434
+ <fo:table-cell border="1px" padding="1px" role="html:td">
435
+ <fo:block>Here's a text in the cell.</fo:block>
436
+ </fo:table-cell>
437
+ <fo:table-cell border="1px" padding="1px" number-columns-spanned="2" role="html:td">
438
+ <fo:block>This cell spans across 2 columns.</fo:block>
439
+ </fo:table-cell>
440
+ </fo:table-row>
441
+ <fo:table-row role="html:tr">
442
+ <fo:table-cell border="1px" padding="1px" role="html:td">
443
+ <fo:block>1st column in the last low</fo:block>
444
+ </fo:table-cell>
445
+ <fo:table-cell border="1px" padding="1px" role="html:td">
446
+ <fo:block>2nd column in the last low</fo:block>
447
+ </fo:table-cell>
448
+ <fo:table-cell border="1px" padding="1px" role="html:td">
449
+ <fo:block>3rd column in the last low</fo:block>
450
+ </fo:table-cell>
451
+ </fo:table-row>
452
+ </fo:table-body>
453
+ </fo:table>
454
+ </fo:block>
455
+
456
+ <fo:block space-before="1em" space-after="1em" role="html:p">Ordinary, no rules are drawn if nothing specified. If you want to draw rules, do as follows.
457
+ </fo:block>
458
+
459
+ <fo:block display-align="center">
460
+ <fo:block start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="center" text-align-last="relative" font-size="smaller" font-style="italic" role="html:caption">
461
+ <fo:block>Specify border="1" to the table.</fo:block>
462
+ </fo:block>
463
+ <fo:table table-layout="fixed" width="100%" border-collapse="separate" border-spacing="2px" border="1px" border-style="outset" role="html:table">
464
+ <fo:table-header start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:thead">
465
+ <fo:table-row role="html:tr">
466
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
467
+ <fo:block>Table Head 1</fo:block>
468
+ </fo:table-cell>
469
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
470
+ <fo:block>Table Head 2</fo:block>
471
+ </fo:table-cell>
472
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
473
+ <fo:block>Table Head 3</fo:block>
474
+ </fo:table-cell>
475
+ </fo:table-row>
476
+ </fo:table-header>
477
+ <fo:table-body start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:tbody">
478
+ <fo:table-row role="html:tr">
479
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
480
+ <fo:block>Here's a text in the cell.</fo:block>
481
+ </fo:table-cell>
482
+ <fo:table-cell border="1px" padding="1px" number-columns-spanned="2" border-style="inset" role="html:td">
483
+ <fo:block>This cell spans across 2 columns.</fo:block>
484
+ </fo:table-cell>
485
+ </fo:table-row>
486
+ <fo:table-row role="html:tr">
487
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
488
+ <fo:block>1st column in the last low</fo:block>
489
+ </fo:table-cell>
490
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
491
+ <fo:block>2nd column in the last low</fo:block>
492
+ </fo:table-cell>
493
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
494
+ <fo:block>3rd column in the last low</fo:block>
495
+ </fo:table-cell>
496
+ </fo:table-row>
497
+ </fo:table-body>
498
+ </fo:table>
499
+ </fo:block>
500
+
501
+ <fo:block space-before="1em" space-after="1em" role="html:p">
502
+ Table width and column width also can be specified.
503
+ </fo:block>
504
+
505
+ <fo:block display-align="center">
506
+ <fo:block start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="center" text-align-last="relative" font-size="smaller" font-style="italic" role="html:caption">
507
+ <fo:block>
508
+ Specify border="10", width="100%" to the table and specify width="5*", width="2*", width="3*" to the col for each.
509
+ </fo:block>
510
+ </fo:block>
511
+ <fo:table table-layout="fixed" width="100%" border-collapse="separate" border-spacing="2px" border="10px" inline-progression-dimension="100%" border-style="outset" role="html:table">
512
+ <fo:table-column column-width="proportional-column-width(5)" role="html:col"/>
513
+ <fo:table-column column-width="proportional-column-width(2)" role="html:col"/>
514
+ <fo:table-column column-width="proportional-column-width(3)" role="html:col"/>
515
+ <fo:table-header start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:thead">
516
+ <fo:table-row role="html:tr">
517
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
518
+ <fo:block>Table Head 1</fo:block>
519
+ </fo:table-cell>
520
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
521
+ <fo:block>Table Head 2</fo:block>
522
+ </fo:table-cell>
523
+ <fo:table-cell font-weight="700" text-align="center" border="1px" padding="1px" border-style="inset" role="html:th">
524
+ <fo:block>Table Head 3</fo:block>
525
+ </fo:table-cell>
526
+ </fo:table-row>
527
+ </fo:table-header>
528
+ <fo:table-body start-indent="0pt" end-indent="0pt" text-indent="0pt" last-line-end-indent="0pt" text-align="start" text-align-last="relative" role="html:tbody">
529
+ <fo:table-row role="html:tr">
530
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
531
+ <fo:block>Here's a text in the cell.</fo:block>
532
+ </fo:table-cell>
533
+ <fo:table-cell border="1px" padding="1px" number-columns-spanned="2" border-style="inset" role="html:td">
534
+ <fo:block>This cell spans across 2 columns.</fo:block>
535
+ </fo:table-cell>
536
+ </fo:table-row>
537
+ <fo:table-row role="html:tr">
538
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
539
+ <fo:block>1st column in the last low</fo:block>
540
+ </fo:table-cell>
541
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
542
+ <fo:block>2nd column in the last low</fo:block>
543
+ </fo:table-cell>
544
+ <fo:table-cell border="1px" padding="1px" border-style="inset" role="html:td">
545
+ <fo:block>3rd column in the last low</fo:block>
546
+ </fo:table-cell>
547
+ </fo:table-row>
548
+ </fo:table-body>
549
+ </fo:table>
550
+ </fo:block>
551
+
552
+
553
+
554
+
555
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
556
+
557
+ <fo:block font-size="0.83em" font-weight="700" space-before="1.33em" space-after="1.33em" keep-with-next.within-column="always" keep-together.within-column="always" role="html:h5">Heading 5 </fo:block>This is an improperly marked paragraph sequence, with
558
+
559
+ <fo:inline font-family="monospace" role="html:code">&lt;P&gt;</fo:inline> used as a paragraph separator rather than as a container. It's dismaying how common this is. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
560
+
561
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
562
+
563
+ <fo:block border="1px inset" space-before="0.67em" space-after="0.67em" role="html:hr"/>
564
+ <fo:block role="html:div">This is a div preceded by a horizontal rule, which might be hidden. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
565
+
566
+ <fo:block role="html:div">
567
+ <fo:block space-before="1em" space-after="1em" role="html:p">This is a paragraph within a div. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space. </fo:block>
568
+ </fo:block>
569
+
570
+ <fo:block font-style="italic" role="html:address">This is an Address. </fo:block>
571
+ </fo:block>
572
+ </fo:flow>
573
+ </fo:page-sequence>
574
+ </fo:root>