metanorma-itu 1.0.13 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -7
  3. data/.github/workflows/ubuntu.yml +12 -9
  4. data/.github/workflows/windows.yml +8 -8
  5. data/lib/asciidoctor/itu/biblio.rng +89 -32
  6. data/lib/asciidoctor/itu/cleanup.rb +80 -71
  7. data/lib/asciidoctor/itu/converter.rb +7 -11
  8. data/lib/asciidoctor/itu/front.rb +47 -18
  9. data/lib/asciidoctor/itu/isodoc.rng +475 -2
  10. data/lib/asciidoctor/itu/reqt.rng +23 -0
  11. data/lib/isodoc/itu/base_convert.rb +66 -16
  12. data/lib/isodoc/itu/html/_coverpage.scss +7 -3
  13. data/lib/isodoc/itu/html/header.html +8 -8
  14. data/lib/isodoc/itu/html/html_itu_titlepage.html +6 -7
  15. data/lib/isodoc/itu/html/htmlstyle.scss +9 -5
  16. data/lib/isodoc/itu/html/itu.scss +28 -1
  17. data/lib/isodoc/itu/html/scripts.html +14 -27
  18. data/lib/isodoc/itu/html/word_itu_intro.html +11 -1
  19. data/lib/isodoc/itu/html/word_itu_titlepage.html +3 -6
  20. data/lib/isodoc/itu/html/wordstyle.scss +6 -5
  21. data/lib/isodoc/itu/html_convert.rb +3 -3
  22. data/lib/isodoc/itu/i18n-en.yaml +2 -1
  23. data/lib/isodoc/itu/itu.recommendation-annex.xsl +3903 -0
  24. data/lib/isodoc/itu/itu.recommendation.xsl +3903 -0
  25. data/lib/isodoc/itu/itu.resolution.xsl +3903 -0
  26. data/lib/isodoc/itu/metadata.rb +16 -6
  27. data/lib/isodoc/itu/pdf_convert.rb +17 -44
  28. data/lib/isodoc/itu/ref.rb +48 -21
  29. data/lib/isodoc/itu/terms.rb +5 -6
  30. data/lib/isodoc/itu/word_convert.rb +10 -8
  31. data/lib/isodoc/itu/xref.rb +27 -16
  32. data/lib/metanorma/itu/processor.rb +8 -0
  33. data/lib/metanorma/itu/version.rb +1 -1
  34. data/metanorma-itu.gemspec +1 -1
  35. metadata +7 -5
  36. data/lib/isodoc/itu/html/scripts.pdf.html +0 -72
@@ -0,0 +1,3903 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
2
+
3
+ <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
+
5
+
6
+
7
+ <xsl:key name="kfn" match="itu:p/itu:fn" use="@reference"/>
8
+
9
+
10
+
11
+ <xsl:variable name="debug">false</xsl:variable>
12
+ <xsl:variable name="pageWidth" select="'210mm'"/>
13
+ <xsl:variable name="pageHeight" select="'297mm'"/>
14
+
15
+ <!-- Rec. ITU-T G.650.1 (03/2018) -->
16
+ <xsl:variable name="footerprefix" select="'Rec. '"/>
17
+ <xsl:variable name="docname">
18
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
19
+ <xsl:text> </xsl:text>
20
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
21
+ <xsl:text> </xsl:text>
22
+ </xsl:variable>
23
+ <xsl:variable name="docdate">
24
+ <xsl:call-template name="formatDate">
25
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
26
+ </xsl:call-template>
27
+ </xsl:variable>
28
+ <xsl:variable name="doctype">
29
+ <xsl:value-of select="translate(substring(/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype,1,1),$lower,$upper)"/>
30
+ <xsl:value-of select="substring(/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype,2)"/>
31
+ </xsl:variable>
32
+
33
+
34
+ <!-- Example:
35
+ <item level="1" id="Foreword" display="true">Foreword</item>
36
+ <item id="term-script" display="false">3.2</item>
37
+ -->
38
+ <xsl:variable name="contents">
39
+ <contents>
40
+ <!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
41
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]" mode="contents"> <!-- @id = 'scope' -->
42
+ <xsl:with-param name="sectionNum" select="'1'"/>
43
+ </xsl:apply-templates>
44
+ <xsl:variable name="numskew" select="count(/itu:itu-standard/itu:bibliography/itu:references[1])"/>
45
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]" mode="contents"> <!-- @id = 'references' -->
46
+ <xsl:with-param name="sectionNum" select="1 + number($numskew)"/>
47
+ </xsl:apply-templates>
48
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]" mode="contents"> <!-- @id != 'scope' -->
49
+ <xsl:with-param name="sectionNumSkew" select="number($numskew)"/>
50
+ </xsl:apply-templates>
51
+ <xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
52
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]" mode="contents"/> <!-- @id = 'bibliography' -->
53
+
54
+ <xsl:apply-templates select="//itu:table" mode="contents"/>
55
+
56
+ </contents>
57
+ </xsl:variable>
58
+
59
+ <xsl:variable name="lang">
60
+ <xsl:call-template name="getLang"/>
61
+ </xsl:variable>
62
+
63
+ <xsl:template match="/">
64
+ <xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
65
+ <fo:root font-family="Times New Roman, STIX2Math" font-size="12pt" xml:lang="{$lang}">
66
+ <fo:layout-master-set>
67
+ <!-- cover page -->
68
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
69
+ <fo:region-body margin-top="19.2mm" margin-bottom="5mm" margin-left="19.2mm" margin-right="19.2mm"/>
70
+ <fo:region-before region-name="cover-page-header" extent="19.2mm" display-align="center"/>
71
+ <fo:region-after/>
72
+ <fo:region-start region-name="cover-left-region" extent="19.2mm"/>
73
+ <fo:region-end region-name="cover-right-region" extent="19.2mm"/>
74
+ </fo:simple-page-master>
75
+ <!-- contents pages -->
76
+ <!-- odd pages Preface -->
77
+ <fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
78
+ <fo:region-body margin-top="19.2mm" margin-bottom="19.2mm" margin-left="19.2mm" margin-right="19.2mm"/>
79
+ <fo:region-before region-name="header-odd" extent="19.2mm" display-align="center"/>
80
+ <fo:region-after region-name="footer-odd" extent="19.2mm"/>
81
+ <fo:region-start region-name="left-region" extent="19.2mm"/>
82
+ <fo:region-end region-name="right-region" extent="19.2mm"/>
83
+ </fo:simple-page-master>
84
+ <!-- even pages Preface -->
85
+ <fo:simple-page-master master-name="even-preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
86
+ <fo:region-body margin-top="19.2mm" margin-bottom="19.2mm" margin-left="19.2mm" margin-right="19.2mm"/>
87
+ <fo:region-before region-name="header-even" extent="19.2mm" display-align="center"/>
88
+ <fo:region-after region-name="footer-even" extent="19.2mm"/>
89
+ <fo:region-start region-name="left-region" extent="19.2mm"/>
90
+ <fo:region-end region-name="right-region" extent="19.2mm"/>
91
+ </fo:simple-page-master>
92
+ <fo:page-sequence-master master-name="document-preface">
93
+ <fo:repeatable-page-master-alternatives>
94
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-preface"/>
95
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-preface"/>
96
+ </fo:repeatable-page-master-alternatives>
97
+ </fo:page-sequence-master>
98
+ <!-- odd pages Body -->
99
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
100
+ <fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="20mm" margin-right="20mm"/>
101
+ <fo:region-before region-name="header-odd" extent="20mm" display-align="center"/>
102
+ <fo:region-after region-name="footer-odd" extent="20mm"/>
103
+ <fo:region-start region-name="left-region" extent="20mm"/>
104
+ <fo:region-end region-name="right-region" extent="20mm"/>
105
+ </fo:simple-page-master>
106
+ <!-- even pages Body -->
107
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}" page-height="{$pageHeight}">
108
+ <fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="20mm" margin-right="20mm"/>
109
+ <fo:region-before region-name="header-even" extent="20mm" display-align="center"/>
110
+ <fo:region-after region-name="footer-even" extent="20mm"/>
111
+ <fo:region-start region-name="left-region" extent="20mm"/>
112
+ <fo:region-end region-name="right-region" extent="20mm"/>
113
+ </fo:simple-page-master>
114
+ <fo:page-sequence-master master-name="document">
115
+ <fo:repeatable-page-master-alternatives>
116
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
117
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
118
+ </fo:repeatable-page-master-alternatives>
119
+ </fo:page-sequence-master>
120
+ </fo:layout-master-set>
121
+
122
+ <fo:declarations>
123
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
124
+ <pdf:dictionary type="normal" key="ViewerPreferences">
125
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
126
+ </pdf:dictionary>
127
+ </pdf:catalog>
128
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
129
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
130
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
131
+ <!-- Dublin Core properties go here -->
132
+ <dc:title><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type='main']"/> </dc:title>
133
+ <dc:creator><xsl:value-of select="/itu:iso-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/></dc:creator>
134
+ <dc:description>
135
+ <xsl:variable name="abstract">
136
+ <xsl:copy-of select="/itu:itu-standard/itu:bibdata/itu:abstract//text()"/>
137
+ </xsl:variable>
138
+ <xsl:value-of select="normalize-space($abstract)"/>
139
+ </dc:description>
140
+ <pdf:Keywords>
141
+ <xsl:call-template name="insertKeywords"/>
142
+ </pdf:Keywords>
143
+ </rdf:Description>
144
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
145
+ <!-- XMP properties go here -->
146
+ <xmp:CreatorTool/>
147
+ </rdf:Description>
148
+ </rdf:RDF>
149
+ </x:xmpmeta>
150
+ </fo:declarations>
151
+
152
+ <!-- cover page -->
153
+ <fo:page-sequence master-reference="cover-page">
154
+ <fo:flow flow-name="xsl-region-body">
155
+
156
+ <fo:block-container absolute-position="fixed" left="148mm" top="265mm">
157
+ <fo:block>
158
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" width="42.6mm" content-height="17.7mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
159
+ </fo:block>
160
+ </fo:block-container>
161
+
162
+ <fo:block-container absolute-position="fixed" left="-7mm" top="0">
163
+ <fo:block>
164
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Fond-Rec))}" width="43.6mm" content-height="299.2mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
165
+ </fo:block>
166
+ </fo:block-container>
167
+ <fo:block-container font-family="Arial">
168
+ <fo:table width="100%" table-layout="fixed"> <!-- 175.4mm-->
169
+ <fo:table-column column-width="25.2mm"/>
170
+ <fo:table-column column-width="44.4mm"/>
171
+ <fo:table-column column-width="35.8mm"/>
172
+ <fo:table-column column-width="67mm"/>
173
+ <fo:table-body>
174
+ <fo:table-row height="37.5mm"> <!-- 42.5mm -->
175
+ <fo:table-cell>
176
+ <fo:block> </fo:block>
177
+ </fo:table-cell>
178
+ <fo:table-cell number-columns-spanned="3">
179
+ <fo:block font-family="Arial" font-size="13pt" font-weight="bold" color="gray"> <!-- margin-top="16pt" letter-spacing="4pt", Helvetica for letter-spacing working -->
180
+ <fo:block><xsl:value-of select="$linebreak"/></fo:block>
181
+ <xsl:call-template name="addLetterSpacing">
182
+ <xsl:with-param name="text" select="/itu:itu-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/>
183
+ </xsl:call-template>
184
+ </fo:block>
185
+ </fo:table-cell>
186
+ </fo:table-row>
187
+ <fo:table-row>
188
+ <fo:table-cell>
189
+ <fo:block> </fo:block>
190
+ </fo:table-cell>
191
+ <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
192
+ <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
193
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
194
+ </fo:block>
195
+ </fo:table-cell>
196
+ <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
197
+ <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
198
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
199
+ </fo:block>
200
+ </fo:table-cell>
201
+ </fo:table-row>
202
+ <fo:table-row height="17.2mm">
203
+ <fo:table-cell>
204
+ <fo:block> </fo:block>
205
+ </fo:table-cell>
206
+ <fo:table-cell font-size="10pt" number-columns-spanned="2" padding-top="1mm">
207
+ <fo:block>
208
+ <xsl:text>TELECOMMUNICATION</xsl:text>
209
+ </fo:block>
210
+ <fo:block>
211
+ <xsl:text>STANDARDIZATION SECTOR</xsl:text>
212
+ </fo:block>
213
+ <fo:block>
214
+ <xsl:text>OF ITU</xsl:text>
215
+ </fo:block>
216
+ </fo:table-cell>
217
+ <fo:table-cell text-align="right">
218
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
219
+ <fo:block font-size="18pt" font-weight="bold">
220
+ <xsl:text>Annex </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
221
+ </fo:block>
222
+ </xsl:if>
223
+ <fo:block font-size="14pt">
224
+ <xsl:call-template name="formatDate">
225
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
226
+ </xsl:call-template>
227
+ </fo:block>
228
+ </fo:table-cell>
229
+ </fo:table-row>
230
+ <fo:table-row height="64mm"> <!-- 59mm -->
231
+ <fo:table-cell>
232
+ <fo:block> </fo:block>
233
+ </fo:table-cell>
234
+ <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" padding-right="2mm" display-align="after">
235
+ <fo:block padding-bottom="7mm">
236
+ <fo:block text-transform="uppercase">
237
+ <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']) != ''">
238
+ <xsl:variable name="title">
239
+ <xsl:text>Series </xsl:text>
240
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']"/>
241
+ </xsl:variable>
242
+ <xsl:value-of select="$title"/>
243
+ </xsl:if>
244
+ </fo:block>
245
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
246
+ <fo:block margin-top="6pt">
247
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
248
+ <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
249
+ <xsl:text> — </xsl:text>
250
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
251
+ </xsl:if>
252
+ </fo:block>
253
+ </xsl:if>
254
+ </fo:block>
255
+ </fo:table-cell>
256
+ </fo:table-row>
257
+ <fo:table-row height="40mm">
258
+ <fo:table-cell>
259
+ <fo:block> </fo:block>
260
+ </fo:table-cell>
261
+ <fo:table-cell font-size="18pt" number-columns-spanned="3">
262
+ <fo:block padding-right="2mm" margin-top="6pt">
263
+ <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en'])">
264
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
265
+ </xsl:if>
266
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
267
+ </fo:block>
268
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
269
+ <fo:block font-weight="bold">
270
+ <xsl:value-of select="."/>
271
+ </fo:block>
272
+ </xsl:for-each>
273
+ </fo:table-cell>
274
+ </fo:table-row>
275
+ <fo:table-row height="40mm">
276
+ <fo:table-cell>
277
+ <fo:block> </fo:block>
278
+ </fo:table-cell>
279
+ <fo:table-cell number-columns-spanned="3">
280
+ <xsl:choose>
281
+ <xsl:when test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
282
+ <xsl:attribute name="border">0.7mm solid black</xsl:attribute>
283
+ <fo:block padding-top="3mm" margin-left="1mm" margin-right="1mm">
284
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
285
+ </fo:block>
286
+ </xsl:when>
287
+ <xsl:otherwise>
288
+ <fo:block> </fo:block>
289
+ </xsl:otherwise>
290
+ </xsl:choose>
291
+ </fo:table-cell>
292
+ </fo:table-row>
293
+ <fo:table-row height="25mm">
294
+ <fo:table-cell>
295
+ <fo:block> </fo:block>
296
+ </fo:table-cell>
297
+ <fo:table-cell number-columns-spanned="3">
298
+ <fo:block font-size="16pt" margin-top="3pt">
299
+ <xsl:value-of select="$doctype"/>
300
+ <xsl:text>  </xsl:text>
301
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
302
+ <xsl:text>-</xsl:text>
303
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
304
+ <xsl:text>  </xsl:text>
305
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
306
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
307
+ <xsl:text> — Annex </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
308
+ </xsl:if>
309
+ </fo:block>
310
+ </fo:table-cell>
311
+ </fo:table-row>
312
+ </fo:table-body>
313
+ </fo:table>
314
+ </fo:block-container>
315
+ </fo:flow>
316
+ </fo:page-sequence>
317
+
318
+
319
+ <fo:page-sequence master-reference="document-preface" initial-page-number="1" format="i" force-page-count="no-force">
320
+ <xsl:call-template name="insertHeaderFooter"/>
321
+ <fo:flow flow-name="xsl-region-body">
322
+ <fo:block-container font-size="14pt" font-weight="bold">
323
+ <fo:block>
324
+ <xsl:value-of select="$doctype"/>
325
+ <xsl:text> </xsl:text>
326
+ <xsl:value-of select="$docname"/>
327
+ </fo:block>
328
+ <fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
329
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
330
+ </fo:block>
331
+ </fo:block-container>
332
+ <!-- Summary, History ... -->
333
+ <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()"/>
334
+
335
+ <!-- Keywords -->
336
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:keyword">
337
+ <fo:block font-size="12pt">
338
+ <xsl:value-of select="$linebreak"/>
339
+ <xsl:value-of select="$linebreak"/>
340
+ </fo:block>
341
+ <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
342
+ <xsl:value-of select="$title-keywords"/>
343
+ </fo:block>
344
+ <fo:block>
345
+ <xsl:call-template name="insertKeywords"/>
346
+ </fo:block>
347
+ </xsl:if>
348
+
349
+ <fo:block break-after="page"/>
350
+
351
+ <!-- FOREWORD -->
352
+ <fo:block font-size="11pt" text-align="justify">
353
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement"/>
354
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:license-statement"/>
355
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:copyright-statement"/>
356
+ </fo:block>
357
+
358
+ <xsl:if test="$debug = 'true'">
359
+ <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
360
+ DEBUG
361
+ contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
362
+ <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
363
+ </xsl:if>
364
+
365
+ <xsl:if test="xalan:nodeset($contents)//item">
366
+ <fo:block break-after="page"/>
367
+ <fo:block-container>
368
+ <fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
369
+ <fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
370
+
371
+ <xsl:for-each select="xalan:nodeset($contents)//item">
372
+ <xsl:if test="@display = 'true'">
373
+ <fo:block>
374
+ <xsl:if test="@level = 1">
375
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
376
+ </xsl:if>
377
+ <xsl:if test="@level = 2">
378
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
379
+ <!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
380
+ </xsl:if>
381
+ <fo:list-block provisional-label-separation="3mm">
382
+ <xsl:attribute name="provisional-distance-between-starts">
383
+ <xsl:choose>
384
+ <xsl:when test="@section != '' and not(@display-section = 'false')">
385
+ <xsl:if test="@level = 1">
386
+ <xsl:choose>
387
+ <xsl:when test="string-length(@section) &gt; 10">27mm</xsl:when>
388
+ <xsl:when test="string-length(@section) &gt; 5">22mm</xsl:when>
389
+ <!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
390
+ <xsl:otherwise>12mm</xsl:otherwise>
391
+ </xsl:choose>
392
+ </xsl:if>
393
+ <xsl:if test="@level = 2">26mm</xsl:if>
394
+ </xsl:when> <!-- -->
395
+ <xsl:otherwise>0mm</xsl:otherwise>
396
+ </xsl:choose>
397
+ </xsl:attribute>
398
+ <fo:list-item>
399
+ <fo:list-item-label end-indent="label-end()">
400
+ <xsl:if test="@level =2">
401
+ <xsl:attribute name="start-indent">12mm</xsl:attribute>
402
+ </xsl:if>
403
+ <fo:block>
404
+ <xsl:if test="@section and not(@display-section = 'false')"> <!-- -->
405
+ <!-- <xsl:if test="@type = 'annex'">
406
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
407
+ </xsl:if> -->
408
+ <xsl:value-of select="@section"/>
409
+ </xsl:if>
410
+ </fo:block>
411
+ </fo:list-item-label>
412
+ <fo:list-item-body start-indent="body-start()">
413
+ <fo:block text-align-last="justify"> <!-- margin-left="12mm" text-indent="-12mm" -->
414
+ <!-- <xsl:if test="@type = 'annex'">
415
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
416
+ </xsl:if> -->
417
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="text()">
418
+ <xsl:value-of select="text()"/>
419
+ <fo:inline keep-together.within-line="always">
420
+ <fo:leader leader-pattern="dots"/>
421
+ <fo:page-number-citation ref-id="{@id}"/>
422
+ </fo:inline>
423
+ </fo:basic-link>
424
+ </fo:block>
425
+ </fo:list-item-body>
426
+ </fo:list-item>
427
+ </fo:list-block>
428
+ </fo:block>
429
+ </xsl:if>
430
+ </xsl:for-each>
431
+ </fo:block-container>
432
+ </xsl:if>
433
+
434
+ </fo:flow>
435
+ </fo:page-sequence>
436
+
437
+ <!-- BODY -->
438
+ <fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="no-force">
439
+
440
+ <fo:static-content flow-name="xsl-footnote-separator">
441
+ <fo:block>
442
+ <fo:leader leader-pattern="rule" leader-length="30%"/>
443
+ </fo:block>
444
+ </fo:static-content>
445
+ <xsl:call-template name="insertHeaderFooter"/>
446
+
447
+ <fo:flow flow-name="xsl-region-body">
448
+
449
+ <fo:block-container font-size="14pt" font-weight="bold">
450
+ <fo:block>
451
+ <xsl:value-of select="$doctype"/>
452
+ <xsl:text> </xsl:text>
453
+ <xsl:value-of select="$docname"/>
454
+ </fo:block>
455
+ <fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
456
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
457
+ </fo:block>
458
+ </fo:block-container>
459
+
460
+
461
+ <!-- Clause(s) -->
462
+ <fo:block>
463
+ <!-- Scope -->
464
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]"> <!-- @id = 'scope' -->
465
+ <xsl:with-param name="sectionNum" select="'1'"/>
466
+ </xsl:apply-templates>
467
+ <!-- References -->
468
+ <xsl:variable name="numskew" select="count(/itu:itu-standard/itu:bibliography/itu:references[1])"/>
469
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]"> <!-- @id = 'references' -->
470
+ <xsl:with-param name="sectionNum" select="1 + number($numskew)"/>
471
+ </xsl:apply-templates>
472
+
473
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]"> <!-- @id != 'scope' -->
474
+ <xsl:with-param name="sectionNumSkew" select="number($numskew)"/>
475
+ </xsl:apply-templates>
476
+
477
+ <xsl:apply-templates select="/itu:itu-standard/itu:annex"/>
478
+
479
+ <!-- Bibliography -->
480
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]"/> <!-- @id = 'bibliography' -->
481
+ </fo:block>
482
+
483
+ </fo:flow>
484
+ </fo:page-sequence>
485
+
486
+
487
+ </fo:root>
488
+ </xsl:template>
489
+
490
+ <!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
491
+ <xsl:template match="node()">
492
+ <xsl:param name="sectionNum"/>
493
+ <xsl:param name="sectionNumSkew"/>
494
+ <xsl:apply-templates>
495
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
496
+ <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
497
+ </xsl:apply-templates>
498
+ </xsl:template>
499
+
500
+ <!-- ============================= -->
501
+ <!-- CONTENTS -->
502
+ <!-- ============================= -->
503
+ <xsl:template match="node()" mode="contents">
504
+ <xsl:param name="sectionNum"/>
505
+ <xsl:param name="sectionNumSkew"/>
506
+ <xsl:apply-templates mode="contents">
507
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
508
+ <xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
509
+ </xsl:apply-templates>
510
+ </xsl:template>
511
+
512
+ <!-- <xsl:template match="itu:itu-standard/itu:preface/*" mode="contents">
513
+ <xsl:apply-templates mode="contents"/>
514
+ </xsl:template> -->
515
+
516
+ <!-- calculate main section number (1,2,3) and pass it deep into templates -->
517
+ <!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
518
+ <xsl:template match="itu:itu-standard/itu:sections/*" mode="contents">
519
+ <xsl:param name="sectionNum"/>
520
+ <xsl:param name="sectionNumSkew" select="-1"/>
521
+ <xsl:variable name="sectionNum_">
522
+ <xsl:choose>
523
+ <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
524
+ <xsl:when test="$sectionNumSkew != -1">
525
+ <xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- itu:sections/itu:clause | itu:sections/itu:terms | ??? -->
526
+ <xsl:value-of select="$number + $sectionNumSkew"/>
527
+ </xsl:when>
528
+ </xsl:choose>
529
+ </xsl:variable>
530
+ <!-- <xsl:message>
531
+ DEBUG sectionNum=<xsl:value-of select="$sectionNum_"/>
532
+ </xsl:message> -->
533
+ <xsl:apply-templates mode="contents">
534
+ <xsl:with-param name="sectionNum" select="$sectionNum_"/>
535
+ </xsl:apply-templates>
536
+ </xsl:template>
537
+
538
+ <!-- Any node with title element - clause, definition, annex,... -->
539
+ <xsl:template match="itu:title | itu:preferred" mode="contents">
540
+ <xsl:param name="sectionNum"/>
541
+ <!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
542
+ <xsl:variable name="id">
543
+ <xsl:call-template name="getId"/>
544
+ </xsl:variable>
545
+
546
+ <xsl:variable name="level">
547
+ <xsl:call-template name="getLevel"/>
548
+ </xsl:variable>
549
+
550
+ <!-- <xsl:message>
551
+ level=<xsl:value-of select="$level"/>=<xsl:value-of select="."/>
552
+ </xsl:message> -->
553
+
554
+ <xsl:variable name="section">
555
+ <xsl:call-template name="getSection">
556
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
557
+ </xsl:call-template>
558
+ </xsl:variable>
559
+
560
+ <xsl:variable name="display">
561
+ <xsl:choose>
562
+ <!-- <xsl:when test="ancestor::itu:annex">true</xsl:when> -->
563
+ <xsl:when test="$level &lt;= 2">true</xsl:when>
564
+ <xsl:otherwise>false</xsl:otherwise>
565
+ </xsl:choose>
566
+ </xsl:variable>
567
+
568
+ <xsl:variable name="type">
569
+ <xsl:value-of select="local-name(..)"/>
570
+ </xsl:variable>
571
+
572
+ <item id="{$id}" level="{$level}" section="{$section}" display="{$display}" type="{$type}">
573
+ <xsl:value-of select="."/>
574
+ </item>
575
+
576
+ <xsl:apply-templates mode="contents">
577
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
578
+ </xsl:apply-templates>
579
+ </xsl:template>
580
+
581
+ <xsl:template match="itu:clause[not(itu:title)]" mode="contents">
582
+ <xsl:param name="sectionNum"/>
583
+ <xsl:variable name="level">
584
+ <xsl:call-template name="getLevel"/>
585
+ </xsl:variable>
586
+ <xsl:variable name="section">
587
+ <xsl:for-each select="*[1]">
588
+ <xsl:call-template name="getSection">
589
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
590
+ </xsl:call-template>
591
+ </xsl:for-each>
592
+ </xsl:variable>
593
+ <item id="{@id}" level="{$level}" section="{$section}" display="false" type="clause">
594
+ <xsl:value-of select="."/>
595
+ </item>
596
+ <xsl:apply-templates mode="contents">
597
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
598
+ </xsl:apply-templates>
599
+ </xsl:template>
600
+
601
+ <xsl:template match="itu:bibitem" mode="contents"/>
602
+
603
+ <xsl:template match="itu:references" mode="contents">
604
+ <xsl:param name="sectionNum"/>
605
+ <xsl:apply-templates mode="contents">
606
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
607
+ </xsl:apply-templates>
608
+ </xsl:template>
609
+
610
+
611
+ <xsl:template match="itu:figure" mode="contents">
612
+ <xsl:param name="sectionNum"/>
613
+ <item level="" id="{@id}" display="false" type="figure">
614
+ <xsl:variable name="title" select="$title-figure"/>
615
+ <xsl:attribute name="section">
616
+ <xsl:call-template name="getSection">
617
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
618
+ </xsl:call-template>
619
+ <!-- <xsl:text>Figure </xsl:text>
620
+ <xsl:call-template name="getItemNumber">
621
+ <xsl:with-param name="brackets" select="'false'"/>
622
+ </xsl:call-template> -->
623
+ </xsl:attribute>
624
+ <xsl:attribute name="topsection">
625
+ <xsl:call-template name="getTopSection">
626
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
627
+ </xsl:call-template>
628
+ </xsl:attribute>
629
+ <xsl:value-of select="$title"/>
630
+ <xsl:call-template name="getItemNumber">
631
+ <xsl:with-param name="brackets" select="'false'"/>
632
+ </xsl:call-template>
633
+ </item>
634
+ <xsl:apply-templates mode="contents">
635
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
636
+ </xsl:apply-templates>
637
+ </xsl:template>
638
+
639
+ <xsl:template match="itu:table" mode="contents">
640
+ <xsl:param name="sectionNum"/>
641
+ <item level="" id="{@id}" display="false" type="table">
642
+ <xsl:variable name="title" select="$title-table"/>
643
+ <xsl:attribute name="section">
644
+ <xsl:call-template name="getSection">
645
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
646
+ </xsl:call-template>
647
+ <!-- <xsl:text>Table </xsl:text>
648
+ <xsl:call-template name="getItemNumber"/> -->
649
+ </xsl:attribute>
650
+ <xsl:attribute name="topsection">
651
+ <xsl:call-template name="getTopSection">
652
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
653
+ </xsl:call-template>
654
+ </xsl:attribute>
655
+ <xsl:value-of select="$title"/>
656
+ <xsl:call-template name="getItemNumber">
657
+ <xsl:with-param name="brackets" select="'false'"/>
658
+ </xsl:call-template>
659
+ </item>
660
+ <xsl:apply-templates mode="contents">
661
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
662
+ </xsl:apply-templates>
663
+ </xsl:template>
664
+
665
+
666
+ <xsl:template match="itu:formula" mode="contents">
667
+ <xsl:param name="sectionNum"/>
668
+ <item level="" id="{@id}" display="false" type="formula">
669
+ <xsl:variable name="title">
670
+ <xsl:choose>
671
+ <xsl:when test="@inequality = 'true'"><xsl:value-of select="$title-inequality"/></xsl:when>
672
+ <xsl:otherwise><xsl:value-of select="$title-equation"/></xsl:otherwise>
673
+ </xsl:choose>
674
+ </xsl:variable>
675
+ <xsl:variable name="section">
676
+ <xsl:call-template name="getSection">
677
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
678
+ </xsl:call-template>
679
+ </xsl:variable>
680
+ <xsl:attribute name="section">
681
+ <xsl:value-of select="$section"/>
682
+ </xsl:attribute>
683
+ <xsl:variable name="parent-element" select="local-name(..)"/>
684
+ <xsl:attribute name="parent">
685
+ <xsl:choose>
686
+ <xsl:when test="$parent-element = 'clause'"><xsl:value-of select="normalize-space($title-clause)"/></xsl:when>
687
+ <xsl:otherwise/>
688
+ </xsl:choose>
689
+ </xsl:attribute>
690
+ <xsl:variable name="itemNumber">
691
+ <xsl:call-template name="getItemNumber">
692
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
693
+ </xsl:call-template>
694
+ </xsl:variable>
695
+ <xsl:attribute name="number">
696
+ <xsl:value-of select="$itemNumber"/>
697
+ </xsl:attribute>
698
+ <xsl:attribute name="topsection">
699
+ <xsl:call-template name="getTopSection">
700
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
701
+ </xsl:call-template>
702
+ </xsl:attribute>
703
+ <xsl:value-of select="$title"/>
704
+ <xsl:value-of select="$itemNumber"/>
705
+ </item>
706
+ <xsl:apply-templates mode="contents">
707
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
708
+ </xsl:apply-templates>
709
+ </xsl:template>
710
+
711
+ <xsl:template name="getItemNumber">
712
+ <xsl:param name="brackets" select="'true'"/>
713
+ <xsl:param name="sectionNum"/>
714
+ <xsl:variable name="name" select="local-name()"/>
715
+ <xsl:choose>
716
+ <xsl:when test="@unnumbered = 'true'"/>
717
+ <xsl:when test="count(//itu:annex) = 1 and ancestor::*[local-name()='annex'] and /itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
718
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
719
+ <xsl:number format="-1" level="any" count="itu:annex//*[local-name()=$name]"/>
720
+ </xsl:when>
721
+ <xsl:when test="ancestor::itu:annex[@obligation = 'informative']">
722
+ <xsl:variable name="annex-id" select="ancestor::itu:annex/@id"/>
723
+ <!-- Annex -->
724
+ <xsl:if test="$brackets = 'true'">
725
+ <xsl:text>(</xsl:text>
726
+ </xsl:if>
727
+ <xsl:number format="I-" count="itu:annex[@obligation = 'informative']"/>
728
+ <xsl:number format="1" level="any" count="*[local-name()=$name][(not(@unnumbered) or @unnumbered != 'true') and ancestor::itu:annex[@id = $annex-id]]"/>
729
+ <xsl:if test="$brackets = 'true'">
730
+ <xsl:text>)</xsl:text>
731
+ </xsl:if>
732
+ </xsl:when>
733
+ <!-- Appendix -->
734
+ <xsl:when test="ancestor::itu:annex[not(@obligation) or @obligation != 'informative']">
735
+ <xsl:variable name="annex-id" select="ancestor::itu:annex/@id"/>
736
+ <xsl:if test="$brackets = 'true'">
737
+ <xsl:text>(</xsl:text>
738
+ </xsl:if>
739
+ <xsl:number format="A-" count="itu:annex[not(@obligation) or @obligation != 'informative']"/>
740
+ <xsl:number format="1" level="any" count="*[local-name()=$name][(not(@unnumbered) or @unnumbered != 'true') and ancestor::itu:annex[@id = $annex-id]]"/>
741
+ <xsl:if test="$brackets = 'true'">
742
+ <xsl:text>)</xsl:text>
743
+ </xsl:if>
744
+ </xsl:when>
745
+ <xsl:when test="ancestor::*[local-name()=$name]"> <!-- figure in figure for example -->
746
+ <xsl:if test="$brackets = 'true'">
747
+ <xsl:text>(</xsl:text>
748
+ </xsl:if>
749
+ <xsl:for-each select="parent::*[1]">
750
+ <xsl:number format="1" level="any" count="*[local-name()=$name][not(parent::*[local-name()=$name])]"/> <!-- itu:figure[not(parent::itu:figure)] -->
751
+ </xsl:for-each>
752
+ <xsl:number format="-a" count="*[local-name()=$name]"/>
753
+ <xsl:if test="$brackets = 'true'">
754
+ <xsl:text>)</xsl:text>
755
+ </xsl:if>
756
+ </xsl:when>
757
+ <xsl:when test="ancestor::itu:sections and $name = 'formula'">
758
+ <xsl:if test="$brackets = 'true'">
759
+ <xsl:text>(</xsl:text>
760
+ </xsl:if>
761
+ <xsl:value-of select="$sectionNum"/>
762
+ <xsl:text>-</xsl:text>
763
+ <xsl:variable name="parent_id" select="ancestor::itu:clause[last()]/@id"/>
764
+ <!-- count equation in current section (1st level) -->
765
+ <xsl:number format="1" level="any" count="*[local-name()=$name][not(@unnumbered) or @unnumbered != 'true'][not(parent::*[local-name()=$name])][ancestor::itu:clause[last()]/@id = $parent_id]"/>
766
+ <xsl:if test="$brackets = 'true'">
767
+ <xsl:text>)</xsl:text>
768
+ </xsl:if>
769
+ </xsl:when>
770
+ <xsl:otherwise>
771
+ <xsl:if test="$brackets = 'true'">
772
+ <xsl:text>(</xsl:text>
773
+ </xsl:if>
774
+ <!-- <xsl:number format="1" level="any" count="itu:figure[not(parent::itu:figure)]"/> -->
775
+ <xsl:number format="1" level="any" count="*[local-name()=$name][not(@unnumbered) or @unnumbered != 'true'][not(parent::*[local-name()=$name])]"/>
776
+ <xsl:if test="$brackets = 'true'">
777
+ <xsl:text>)</xsl:text>
778
+ </xsl:if>
779
+ </xsl:otherwise>
780
+ </xsl:choose>
781
+ </xsl:template>
782
+
783
+
784
+ <xsl:template match="itu:example" mode="contents">
785
+ <xsl:param name="sectionNum"/>
786
+ <xsl:variable name="level">
787
+ <xsl:call-template name="getLevel"/>
788
+ </xsl:variable>
789
+ <xsl:variable name="section">
790
+ <xsl:call-template name="getSection">
791
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
792
+ </xsl:call-template>
793
+ </xsl:variable>
794
+
795
+ <xsl:variable name="parent-element" select="local-name(..)"/>
796
+ <item level="" id="{@id}" display="false" type="example" section="{$section}">
797
+ <xsl:attribute name="parent">
798
+ <xsl:choose>
799
+ <xsl:when test="$parent-element = 'clause'"><xsl:value-of select="normalize-space($title-clause)"/></xsl:when>
800
+ <xsl:otherwise/>
801
+ </xsl:choose>
802
+ </xsl:attribute>
803
+ <xsl:attribute name="topsection">
804
+ <xsl:call-template name="getTopSection">
805
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
806
+ </xsl:call-template>
807
+ </xsl:attribute>
808
+ </item>
809
+ <xsl:apply-templates mode="contents">
810
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
811
+ </xsl:apply-templates>
812
+ </xsl:template>
813
+
814
+ <!-- terms - term - termnote -->
815
+ <xsl:template match="itu:termnote" mode="contents">
816
+ <xsl:param name="sectionNum"/>
817
+ <xsl:variable name="level">
818
+ <xsl:call-template name="getLevel"/>
819
+ </xsl:variable>
820
+ <xsl:variable name="section">
821
+ <xsl:call-template name="getSection">
822
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
823
+ </xsl:call-template>
824
+ </xsl:variable>
825
+ <item level="" id="{@id}" display="false" type="note" section="{$section}">
826
+ <xsl:attribute name="topsection">
827
+ <xsl:call-template name="getTopSection">
828
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
829
+ </xsl:call-template>
830
+ </xsl:attribute>
831
+ <xsl:number/>
832
+ </item>
833
+ <xsl:apply-templates mode="contents">
834
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
835
+ </xsl:apply-templates>
836
+ </xsl:template>
837
+
838
+
839
+ <xsl:template match="itu:note" mode="contents">
840
+ <xsl:param name="sectionNum"/>
841
+ <xsl:variable name="level">
842
+ <xsl:call-template name="getLevel"/>
843
+ </xsl:variable>
844
+ <xsl:variable name="section">
845
+ <xsl:for-each select="ancestor::itu:clause[1]/*[1]">
846
+ <xsl:call-template name="getSection">
847
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
848
+ </xsl:call-template>
849
+ </xsl:for-each>
850
+ </xsl:variable>
851
+ <item level="" id="{@id}" display="false" type="note" section="{$section}">
852
+ <xsl:attribute name="topsection">
853
+ <xsl:call-template name="getTopSection">
854
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
855
+ </xsl:call-template>
856
+ </xsl:attribute>
857
+ <xsl:number/>
858
+ </item>
859
+ <xsl:apply-templates mode="contents">
860
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
861
+ </xsl:apply-templates>
862
+ </xsl:template>
863
+
864
+ <xsl:template match="itu:li" mode="contents">
865
+ <xsl:param name="sectionNum"/>
866
+ <item level="" id="{@id}" display="false" type="li">
867
+ <xsl:attribute name="section">
868
+ <xsl:call-template name="getListItemFormat"/>
869
+ </xsl:attribute>
870
+ </item>
871
+ <xsl:apply-templates mode="contents">
872
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
873
+ </xsl:apply-templates>
874
+ </xsl:template>
875
+
876
+ <xsl:template name="getListItemFormat">
877
+ <xsl:variable name="level">
878
+ <xsl:variable name="numtmp">
879
+ <xsl:number level="multiple" count="itu:ol"/>
880
+ </xsl:variable>
881
+ <!-- level example: 1.1
882
+ calculate counts of '.' in numtmp value - level of nested lists
883
+ -->
884
+ <xsl:value-of select="string-length($numtmp) - string-length(translate($numtmp, '.', '')) + 1"/>
885
+ </xsl:variable>
886
+ <xsl:choose>
887
+ <xsl:when test="local-name(..) = 'ul' and itu:ul and local-name(../../..) != 'ul'">•</xsl:when> <!-- dash &#x2014; -->
888
+ <xsl:when test="local-name(..) = 'ul'">–</xsl:when> <!-- dash &#x2014; -->
889
+ <xsl:otherwise>
890
+ <!-- for Ordered Lists -->
891
+ <xsl:choose>
892
+ <xsl:when test="../@type = 'arabic'">
893
+ <xsl:number format="a)"/>
894
+ </xsl:when>
895
+ <xsl:when test="../@class = 'steps'">
896
+ <xsl:number format="1)"/>
897
+ </xsl:when>
898
+ <xsl:when test="$level = 1">
899
+ <xsl:number format="a)"/>
900
+ </xsl:when>
901
+ <xsl:when test="$level = 2">
902
+ <xsl:number format="i)"/>
903
+ </xsl:when>
904
+ <xsl:otherwise>
905
+ <!-- <xsl:number format="1.)"/> -->
906
+ <!-- https://github.com/metanorma/mn-native-pdf/issues/156 -->
907
+ <xsl:number format="1)"/>
908
+ </xsl:otherwise>
909
+ </xsl:choose>
910
+ </xsl:otherwise>
911
+ </xsl:choose>
912
+ </xsl:template>
913
+
914
+ <xsl:template match="itu:xref" mode="contents">
915
+ <xsl:param name="sectionNum"/>
916
+ <item level="" id="{generate-id()}" display="false" type="xref">
917
+
918
+ <xsl:attribute name="topsection">
919
+ <xsl:call-template name="getTopSection">
920
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
921
+ </xsl:call-template>
922
+ </xsl:attribute>
923
+ </item>
924
+ </xsl:template>
925
+
926
+ <!-- ============================= -->
927
+ <!-- ============================= -->
928
+
929
+
930
+ <!-- ============================= -->
931
+ <!-- PREFACE (Summary, History, ...) -->
932
+ <!-- ============================= -->
933
+
934
+ <!-- Summary -->
935
+ <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']">
936
+ <fo:block font-size="12pt">
937
+ <xsl:value-of select="$linebreak"/>
938
+ <xsl:value-of select="$linebreak"/>
939
+ </fo:block>
940
+ <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
941
+ <xsl:text>Summary</xsl:text>
942
+ </fo:block>
943
+ <xsl:apply-templates/>
944
+ </xsl:template>
945
+
946
+ <xsl:template match="itu:preface/itu:clause">
947
+ <fo:block font-size="12pt">
948
+ <xsl:value-of select="$linebreak"/>
949
+ <xsl:value-of select="$linebreak"/>
950
+ </fo:block>
951
+ <xsl:apply-templates/>
952
+ </xsl:template>
953
+
954
+ <xsl:template match="itu:preface//itu:title">
955
+ <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
956
+ <xsl:apply-templates/>
957
+ </fo:block>
958
+ </xsl:template>
959
+ <!-- ============================= -->
960
+ <!-- ============================= -->
961
+
962
+
963
+ <!-- ============================= -->
964
+ <!-- PARAGRAPHS -->
965
+ <!-- ============================= -->
966
+ <xsl:template match="itu:p | itu:sections/itu:p">
967
+ <xsl:param name="sectionNum"/>
968
+ <fo:block margin-top="6pt">
969
+ <xsl:attribute name="text-align">
970
+ <xsl:choose>
971
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
972
+ <xsl:when test="ancestor::*[1][local-name() = 'td']/@align">
973
+ <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/>
974
+ </xsl:when>
975
+ <xsl:when test="ancestor::*[1][local-name() = 'th']/@align">
976
+ <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/>
977
+ </xsl:when>
978
+ <xsl:otherwise>justify</xsl:otherwise>
979
+ </xsl:choose>
980
+ </xsl:attribute>
981
+ <xsl:apply-templates>
982
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
983
+ </xsl:apply-templates>
984
+ </fo:block>
985
+ </xsl:template>
986
+
987
+ <xsl:template match="itu:note">
988
+ <fo:block id="{@id}">
989
+ <xsl:apply-templates/>
990
+ </fo:block>
991
+ </xsl:template>
992
+
993
+ <xsl:template match="itu:note/itu:p" name="note">
994
+ <xsl:variable name="id" select="ancestor::*[local-name() = 'clause'][1]/@id"/>
995
+ <fo:block font-size="11pt" space-before="4pt" text-align="justify">
996
+ <xsl:if test="ancestor::itu:figure">
997
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
998
+ </xsl:if>
999
+ <xsl:value-of select="$title-note"/>
1000
+ <!-- <xsl:if test="../following-sibling::itu:note or ../preceding-sibling::itu:note"> -->
1001
+ <xsl:if test="count(//itu:note[ancestor::*[local-name() = 'clause'][1][@id = $id] and not (ancestor::itu:table)]) &gt; 1">
1002
+ <xsl:number count="itu:note[ancestor::*[local-name() = 'clause'][1][@id = $id] and not (ancestor::itu:table)]" level="any"/>
1003
+ </xsl:if>
1004
+ <!-- <xsl:number count="itu:note"/> --><xsl:text> </xsl:text>
1005
+ <!-- </xsl:if> -->
1006
+ <xsl:text>– </xsl:text>
1007
+ <xsl:apply-templates/>
1008
+ </fo:block>
1009
+ </xsl:template>
1010
+
1011
+
1012
+ <!-- ============================= -->
1013
+ <!-- ============================= -->
1014
+
1015
+
1016
+ <!-- ============================= -->
1017
+ <!-- Bibliography -->
1018
+ <!-- ============================= -->
1019
+
1020
+ <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
1021
+ <xsl:template match="itu:bibitem">
1022
+ <fo:block id="{@id}" margin-top="6pt" margin-left="14mm" text-indent="-14mm">
1023
+
1024
+ <xsl:choose>
1025
+ <xsl:when test="itu:docidentifier[@type = 'metanorma']">
1026
+ <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
1027
+ <xsl:text> </xsl:text>
1028
+ <xsl:if test="itu:docidentifier[not(@type) or not(@type = 'metanorma')]">
1029
+ <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma')]"/>
1030
+ <xsl:text>, </xsl:text>
1031
+ </xsl:if>
1032
+ </xsl:when>
1033
+ <xsl:otherwise>
1034
+ <fo:inline padding-right="5mm">
1035
+ <xsl:text>[</xsl:text>
1036
+ <xsl:value-of select="itu:docidentifier"/>
1037
+ <xsl:text>] </xsl:text>
1038
+ </fo:inline>
1039
+ <xsl:value-of select="itu:docidentifier"/>
1040
+ <xsl:if test="itu:title">
1041
+ <xsl:text>, </xsl:text>
1042
+ </xsl:if>
1043
+ </xsl:otherwise>
1044
+ </xsl:choose>
1045
+
1046
+ <xsl:if test="itu:title">
1047
+ <fo:inline font-style="italic">
1048
+ <xsl:choose>
1049
+ <xsl:when test="itu:title[@type = 'main' and @language = 'en']">
1050
+ <xsl:value-of select="itu:title[@type = 'main' and @language = 'en']"/>
1051
+ </xsl:when>
1052
+ <xsl:otherwise>
1053
+ <xsl:value-of select="itu:title"/>
1054
+ </xsl:otherwise>
1055
+ </xsl:choose>
1056
+ </fo:inline>
1057
+ </xsl:if>
1058
+ <xsl:if test="itu:formattedref and not(itu:docidentifier[@type = 'metanorma'])">, </xsl:if>
1059
+ <xsl:apply-templates select="itu:formattedref"/>
1060
+ </fo:block>
1061
+ </xsl:template>
1062
+ <xsl:template match="itu:bibitem/itu:docidentifier"/>
1063
+
1064
+ <xsl:template match="itu:bibitem/itu:title"/>
1065
+
1066
+ <xsl:template match="itu:formattedref">
1067
+ <xsl:apply-templates/>
1068
+ </xsl:template>
1069
+
1070
+
1071
+ <!-- ============================= -->
1072
+ <!-- ============================= -->
1073
+
1074
+
1075
+ <xsl:template match="text()">
1076
+ <xsl:value-of select="."/>
1077
+ </xsl:template>
1078
+
1079
+
1080
+ <!-- calculate main section number (1,2,3) and pass it deep into templates -->
1081
+ <!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
1082
+ <xsl:template match="itu:itu-standard/itu:sections/*">
1083
+ <xsl:param name="sectionNum"/>
1084
+ <xsl:param name="sectionNumSkew" select="-1"/>
1085
+ <fo:block>
1086
+ <xsl:variable name="sectionNum_">
1087
+ <xsl:choose>
1088
+ <xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
1089
+ <xsl:when test="$sectionNumSkew != -1">
1090
+ <xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- itu:sections/itu:clause | itu:sections/itu:terms -->
1091
+ <xsl:value-of select="$number + $sectionNumSkew"/>
1092
+ </xsl:when>
1093
+ </xsl:choose>
1094
+ </xsl:variable>
1095
+ <xsl:apply-templates>
1096
+ <xsl:with-param name="sectionNum" select="$sectionNum_"/>
1097
+ </xsl:apply-templates>
1098
+ </fo:block>
1099
+ </xsl:template>
1100
+
1101
+
1102
+ <xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
1103
+ <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center">
1104
+ <xsl:apply-templates/>
1105
+ </fo:block>
1106
+ </xsl:template>
1107
+
1108
+ <xsl:template match="itu:clause[@id='draft-warning']/itu:p" mode="caution">
1109
+ <fo:block font-size="12pt" font-family="Times New Roman" text-align="justify">
1110
+ <xsl:apply-templates/>
1111
+ </fo:block>
1112
+ </xsl:template>
1113
+
1114
+ <xsl:template match="itu:title">
1115
+ <xsl:param name="sectionNum"/>
1116
+
1117
+ <xsl:variable name="id">
1118
+ <xsl:call-template name="getId"/>
1119
+ </xsl:variable>
1120
+
1121
+ <xsl:variable name="parent-name" select="local-name(..)"/>
1122
+ <xsl:variable name="references_num_current">
1123
+ <xsl:number level="any" count="itu:references"/>
1124
+ </xsl:variable>
1125
+
1126
+ <xsl:variable name="level">
1127
+ <xsl:call-template name="getLevel"/>
1128
+ </xsl:variable>
1129
+
1130
+ <xsl:variable name="font-size">
1131
+ <xsl:choose>
1132
+ <xsl:when test="$level = 2">12pt</xsl:when>
1133
+ <xsl:when test="$level &gt;= 3">12pt</xsl:when>
1134
+ <xsl:otherwise>12pt</xsl:otherwise>
1135
+ </xsl:choose>
1136
+ </xsl:variable>
1137
+
1138
+ <xsl:variable name="space-before">
1139
+ <xsl:choose>
1140
+ <xsl:when test="$level = '' or $level = 1">18pt</xsl:when>
1141
+ <xsl:when test="$level = 2">12pt</xsl:when>
1142
+ <xsl:otherwise>6pt</xsl:otherwise>
1143
+ </xsl:choose>
1144
+ </xsl:variable>
1145
+
1146
+ <xsl:variable name="space-after">
1147
+ <xsl:choose>
1148
+ <xsl:when test="$level = 2">6pt</xsl:when>
1149
+ <xsl:otherwise>6pt</xsl:otherwise>
1150
+ </xsl:choose>
1151
+ </xsl:variable>
1152
+
1153
+ <xsl:variable name="section">
1154
+ <xsl:call-template name="getSection">
1155
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1156
+ </xsl:call-template>
1157
+ </xsl:variable>
1158
+
1159
+ <xsl:choose>
1160
+ <xsl:when test="$parent-name = 'annex'">
1161
+ <fo:block id="{$id}" font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
1162
+ <fo:block margin-bottom="18pt">
1163
+ <fo:inline id="{@id}"><xsl:value-of select="$section"/></fo:inline>
1164
+ </fo:block>
1165
+ <fo:block><xsl:apply-templates/></fo:block>
1166
+ <fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
1167
+ <xsl:choose>
1168
+ <xsl:when test="parent::*[@obligation = 'informative']">
1169
+ <xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
1170
+ </xsl:when>
1171
+ <xsl:otherwise>
1172
+ <xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
1173
+ </xsl:otherwise>
1174
+ </xsl:choose>
1175
+ </fo:block>
1176
+ </fo:block>
1177
+ </xsl:when>
1178
+ <xsl:when test="$parent-name = 'references' and $references_num_current != 1">
1179
+ <fo:block id="{$id}" font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
1180
+ <xsl:apply-templates/>
1181
+ </fo:block>
1182
+ </xsl:when>
1183
+ <xsl:otherwise>
1184
+ <fo:block id="{$id}" font-size="{$font-size}" font-weight="bold" space-before="{$space-before}" space-after="{$space-after}" keep-with-next="always">
1185
+ <xsl:value-of select="$section"/>
1186
+ <fo:inline>
1187
+ <xsl:attribute name="padding-right">
1188
+ <xsl:choose>
1189
+ <xsl:when test="$level = 5">6mm</xsl:when>
1190
+ <xsl:when test="$level = 4">9mm</xsl:when>
1191
+ <xsl:when test="$level = 3">5mm</xsl:when>
1192
+ <xsl:when test="$level = 2">8mm</xsl:when>
1193
+ <xsl:otherwise>11mm</xsl:otherwise>
1194
+ </xsl:choose>
1195
+ </xsl:attribute>
1196
+ <xsl:text> </xsl:text>
1197
+ </fo:inline>
1198
+ <xsl:apply-templates/>
1199
+ </fo:block>
1200
+ </xsl:otherwise>
1201
+ </xsl:choose>
1202
+ </xsl:template>
1203
+
1204
+
1205
+ <xsl:template match="itu:legal-statement//itu:title | itu:license-statement//itu:title">
1206
+ <fo:block text-align="center" margin-top="6pt">
1207
+ <xsl:apply-templates/>
1208
+ </fo:block>
1209
+ </xsl:template>
1210
+
1211
+ <xsl:template match="itu:legal-statement//itu:p | itu:license-statement//itu:p">
1212
+ <fo:block margin-top="6pt">
1213
+ <xsl:apply-templates/>
1214
+ </fo:block>
1215
+ <xsl:if test="not(following-sibling::itu:p)"> <!-- last para -->
1216
+ <fo:block margin-top="6pt"> </fo:block>
1217
+ <fo:block margin-top="6pt"> </fo:block>
1218
+ <fo:block margin-top="6pt"> </fo:block>
1219
+ </xsl:if>
1220
+ </xsl:template>
1221
+
1222
+ <xsl:template match="itu:copyright-statement//itu:p">
1223
+ <fo:block>
1224
+ <xsl:if test="not(preceding-sibling::itu:p)"> <!-- first para -->
1225
+ <xsl:attribute name="text-align">center</xsl:attribute>
1226
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1227
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1228
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1229
+ </xsl:if>
1230
+ <xsl:apply-templates/>
1231
+ </fo:block>
1232
+ </xsl:template>
1233
+
1234
+
1235
+ <xsl:template match="itu:preferred">
1236
+ <xsl:param name="sectionNum"/>
1237
+ <!-- DEBUG need -->
1238
+ <fo:block space-before="6pt" text-align="justify">
1239
+ <fo:inline id="{../@id}" padding-right="5mm" font-weight="bold">
1240
+ <!-- <xsl:value-of select="$sectionNum"/><xsl:number format=".1" level="multiple" count="itu:clause/itu:clause | itu:clause/itu:terms | itu:terms/itu:term"/> -->
1241
+ <xsl:variable name="level">
1242
+ <xsl:call-template name="getLevel"/>
1243
+ </xsl:variable>
1244
+ <!-- level=<xsl:value-of select="$level"/> -->
1245
+ <xsl:attribute name="padding-right">
1246
+ <xsl:choose>
1247
+ <xsl:when test="$level = 4">2mm</xsl:when>
1248
+ <xsl:when test="$level = 3">4mm</xsl:when>
1249
+ <xsl:otherwise>5mm</xsl:otherwise>
1250
+ </xsl:choose>
1251
+ </xsl:attribute>
1252
+ <xsl:variable name="section">
1253
+ <xsl:call-template name="getSection">
1254
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1255
+ </xsl:call-template>
1256
+ </xsl:variable>
1257
+ <xsl:value-of select="$section"/>
1258
+ </fo:inline>
1259
+ <fo:inline font-weight="bold">
1260
+ <xsl:apply-templates/>
1261
+ </fo:inline>
1262
+ <xsl:if test="../itu:termsource/itu:origin">
1263
+ <xsl:variable name="citeas" select="../itu:termsource/itu:origin/@citeas"/>
1264
+ <xsl:choose>
1265
+ <xsl:when test="contains($citeas, '[')">
1266
+ <xsl:text> </xsl:text><xsl:value-of select="$citeas" disable-output-escaping="yes"/>
1267
+ </xsl:when>
1268
+ <xsl:otherwise>
1269
+ <xsl:text> [</xsl:text><xsl:value-of select="$citeas"/><xsl:text>]</xsl:text>
1270
+ </xsl:otherwise>
1271
+ </xsl:choose>
1272
+ </xsl:if>
1273
+ <xsl:text>: </xsl:text>
1274
+ <xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/> <!-- -->
1275
+ </fo:block>
1276
+ <!-- <xsl:if test="following-sibling::itu:table">
1277
+ <fo:block space-after="18pt">&#xA0;</fo:block>
1278
+ </xsl:if> -->
1279
+ </xsl:template>
1280
+
1281
+ <xsl:template match="itu:definition/itu:p"/>
1282
+ <xsl:template match="itu:definition/itu:formula"/>
1283
+
1284
+ <xsl:template match="itu:definition/itu:p" mode="process"> <!-- -->
1285
+ <xsl:param name="sectionNum"/>
1286
+ <xsl:choose>
1287
+ <xsl:when test="position() = 1">
1288
+ <fo:inline>
1289
+ <xsl:apply-templates/>
1290
+ </fo:inline>
1291
+ </xsl:when>
1292
+ <xsl:otherwise>
1293
+ <fo:block margin-top="6pt" text-align="justify">
1294
+ <xsl:apply-templates>
1295
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1296
+ </xsl:apply-templates>
1297
+ </fo:block>
1298
+ </xsl:otherwise>
1299
+ </xsl:choose>
1300
+ </xsl:template>
1301
+
1302
+ <xsl:variable name="p_fn">
1303
+ <xsl:for-each select="//itu:p/itu:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
1304
+ <!-- copy unique fn -->
1305
+ <fn gen_id="{generate-id(.)}">
1306
+ <xsl:copy-of select="@*"/>
1307
+ <xsl:copy-of select="node()"/>
1308
+ </fn>
1309
+ </xsl:for-each>
1310
+ </xsl:variable>
1311
+
1312
+ <xsl:template match="itu:p/itu:fn" priority="2">
1313
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
1314
+ <xsl:variable name="reference" select="@reference"/>
1315
+ <xsl:variable name="number">
1316
+ <!-- <xsl:number level="any" count="itu:p/itu:fn"/> -->
1317
+ <xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
1318
+ </xsl:variable>
1319
+ <xsl:choose>
1320
+ <xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
1321
+ <fo:footnote>
1322
+ <fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
1323
+ <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
1324
+ <!-- <xsl:value-of select="@reference"/> -->
1325
+ <xsl:value-of select="$number + count(//itu:bibitem/itu:note)"/>
1326
+ </fo:basic-link>
1327
+ </fo:inline>
1328
+ <fo:footnote-body>
1329
+ <fo:block font-size="11pt" margin-bottom="12pt">
1330
+ <fo:inline id="footnote_{@reference}_{$number}" font-size="85%" padding-right="2mm" keep-with-next.within-line="always" baseline-shift="30%">
1331
+ <xsl:value-of select="$number + count(//itu:bibitem/itu:note)"/>
1332
+ </fo:inline>
1333
+ <xsl:for-each select="itu:p">
1334
+ <xsl:apply-templates/>
1335
+ </xsl:for-each>
1336
+ </fo:block>
1337
+ </fo:footnote-body>
1338
+ </fo:footnote>
1339
+ </xsl:when>
1340
+ <xsl:otherwise>
1341
+ <fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
1342
+ <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
1343
+ <xsl:value-of select="$number + count(//itu:bibitem/itu:note)"/>
1344
+ </fo:basic-link>
1345
+ </fo:inline>
1346
+ </xsl:otherwise>
1347
+ </xsl:choose>
1348
+ </xsl:template>
1349
+
1350
+
1351
+ <xsl:template match="*[local-name()='tt']" priority="2">
1352
+ <xsl:variable name="element-name">
1353
+ <xsl:choose>
1354
+ <xsl:when test="ancestor::itu:dd">fo:inline</xsl:when>
1355
+ <xsl:when test="normalize-space(ancestor::itu:p[1]//text()[not(parent::itu:tt)]) != ''">fo:inline</xsl:when>
1356
+ <xsl:otherwise>fo:block</xsl:otherwise>
1357
+ </xsl:choose>
1358
+ </xsl:variable>
1359
+ <xsl:element name="{$element-name}">
1360
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1361
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1362
+ <xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd)">
1363
+ <xsl:attribute name="text-align">center</xsl:attribute>
1364
+ </xsl:if>
1365
+ <xsl:apply-templates/>
1366
+ </xsl:element>
1367
+ </xsl:template>
1368
+
1369
+
1370
+
1371
+ <xsl:template match="itu:figure">
1372
+ <fo:block-container id="{@id}">
1373
+ <fo:block>
1374
+ <xsl:apply-templates/>
1375
+ </fo:block>
1376
+ <xsl:call-template name="fn_display_figure"/>
1377
+ <xsl:for-each select="itu:note//itu:p">
1378
+ <xsl:call-template name="note"/>
1379
+ </xsl:for-each>
1380
+ <fo:block font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="6pt" keep-with-previous="always">
1381
+ <xsl:variable name="itemnumber">
1382
+ <xsl:call-template name="getItemNumber">
1383
+ <xsl:with-param name="brackets" select="'false'"/>
1384
+ </xsl:call-template>
1385
+ </xsl:variable>
1386
+ <xsl:choose>
1387
+ <xsl:when test="local-name(*) = 'figure' and normalize-space(itu:name) = ''"/><!-- don't show 'Figure' for outer figure without name -->
1388
+ <xsl:when test="$itemnumber != ''">
1389
+ <xsl:value-of select="$title-figure"/>
1390
+ <xsl:value-of select="$itemnumber"/>
1391
+ </xsl:when>
1392
+ </xsl:choose>
1393
+ <xsl:if test="itu:name">
1394
+ <xsl:text> — </xsl:text>
1395
+ <xsl:apply-templates select="itu:name" mode="process"/>
1396
+ </xsl:if>
1397
+ </fo:block>
1398
+ </fo:block-container>
1399
+ </xsl:template>
1400
+
1401
+ <xsl:template match="itu:figure/itu:name" mode="process">
1402
+ <xsl:apply-templates/>
1403
+ </xsl:template>
1404
+
1405
+ <xsl:template match="itu:figure/itu:name"/>
1406
+ <xsl:template match="itu:figure/itu:fn" priority="2"/>
1407
+ <xsl:template match="itu:figure/itu:note"/>
1408
+
1409
+ <!-- itu:figure/itu:image -->
1410
+ <xsl:template match="itu:image">
1411
+ <fo:block text-align="center">
1412
+ <!-- <fo:external-graphic src="{@src}" content-width="75%" content-height="scale-to-fit" scaling="uniform"/> -->
1413
+ <fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}" width="75%" content-height="100%" content-width="scale-to-fit" scaling="uniform"/>
1414
+ </fo:block>
1415
+ </xsl:template>
1416
+
1417
+ <xsl:template match="itu:figure[@class = 'pseudocode']">
1418
+ <fo:block>
1419
+ <xsl:apply-templates/>
1420
+ </fo:block>
1421
+ </xsl:template>
1422
+
1423
+ <xsl:template match="itu:figure[@class = 'pseudocode']//itu:p">
1424
+ <fo:block font-size="10pt" margin-top="6pt" margin-bottom="6pt">
1425
+ <xsl:apply-templates/>
1426
+ </fo:block>
1427
+ </xsl:template>
1428
+
1429
+
1430
+
1431
+ <!-- Examples:
1432
+ [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
1433
+ [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
1434
+ -->
1435
+ <xsl:template match="itu:annex//itu:bibitem">
1436
+ <fo:block margin-top="6pt" margin-left="10mm" text-indent="-10mm">
1437
+ <fo:inline id="{@id}" padding-right="5mm">[<xsl:value-of select="itu:docidentifier"/>]</fo:inline>
1438
+ <xsl:text> </xsl:text>
1439
+ <xsl:apply-templates select="itu:docidentifier" mode="content"/>
1440
+ <xsl:if test="node()[local-name(.) != current()/itu:docidentifier]">, </xsl:if>
1441
+ <xsl:apply-templates/>
1442
+ </fo:block>
1443
+ </xsl:template>
1444
+
1445
+ <xsl:template match="itu:docidentifier" mode="content">
1446
+ <xsl:apply-templates/>
1447
+ </xsl:template>
1448
+ <xsl:template match="itu:docidentifier"/>
1449
+
1450
+
1451
+ <xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol">
1452
+ <xsl:if test="preceding-sibling::*[1][local-name() = 'title']">
1453
+ <fo:block padding-top="-8pt" font-size="1pt"> </fo:block>
1454
+ </xsl:if>
1455
+ <fo:list-block>
1456
+ <xsl:apply-templates/>
1457
+ </fo:list-block>
1458
+ <xsl:apply-templates select="./itu:note" mode="process"/>
1459
+ </xsl:template>
1460
+
1461
+ <xsl:template match="itu:ul//itu:note | itu:ol//itu:note"/>
1462
+ <xsl:template match="itu:ul//itu:note | itu:ol//itu:note" mode="process">
1463
+ <fo:block id="{@id}">
1464
+ <xsl:apply-templates mode="process"/>
1465
+ </fo:block>
1466
+ </xsl:template>
1467
+ <xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process">
1468
+ <xsl:variable name="id" select="ancestor::*[local-name() = 'clause'][1]/@id"/>
1469
+ <fo:block font-size="11pt" margin-top="4pt">
1470
+ <xsl:value-of select="$title-note"/>
1471
+ <!-- <xsl:if test="../following-sibling::itu:note or ../preceding-sibling::itu:note"> -->
1472
+ <xsl:if test="count(//itu:note[ancestor::*[@id = $id] and not (ancestor::itu:table)]) &gt; 1">
1473
+ <xsl:number count="itu:note[ancestor::*[@id = $id] and not (ancestor::itu:table)]" level="any"/>
1474
+ </xsl:if>
1475
+ <!-- <xsl:number count="itu:note"/> --><xsl:text> </xsl:text>
1476
+ <!-- </xsl:if> -->
1477
+ <xsl:text>– </xsl:text>
1478
+ <xsl:apply-templates/>
1479
+ </fo:block>
1480
+ </xsl:template>
1481
+
1482
+ <xsl:template match="itu:li">
1483
+ <fo:list-item id="{@id}">
1484
+ <fo:list-item-label end-indent="label-end()">
1485
+ <fo:block>
1486
+ <xsl:call-template name="getListItemFormat"/>
1487
+ </fo:block>
1488
+ </fo:list-item-label>
1489
+ <fo:list-item-body start-indent="body-start()">
1490
+ <fo:block-container>
1491
+ <xsl:if test="../preceding-sibling::*[1][local-name() = 'title']">
1492
+ <xsl:attribute name="margin-left">18mm</xsl:attribute>
1493
+ </xsl:if>
1494
+ <xsl:if test="local-name(..) = 'ul'">
1495
+ <xsl:attribute name="margin-left">7mm</xsl:attribute><!-- 15mm -->
1496
+ <xsl:if test="ancestor::itu:table">
1497
+ <xsl:attribute name="margin-left">4.5mm</xsl:attribute>
1498
+ </xsl:if>
1499
+ <!-- <xsl:if test="count(ancestor::itu:ol) + count(ancestor::itu:ul) &gt; 1">
1500
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
1501
+ </xsl:if> -->
1502
+ </xsl:if>
1503
+ <fo:block-container margin-left="0mm">
1504
+ <xsl:apply-templates/>
1505
+ <xsl:apply-templates select=".//itu:note" mode="process"/>
1506
+ </fo:block-container>
1507
+ </fo:block-container>
1508
+ </fo:list-item-body>
1509
+ </fo:list-item>
1510
+ </xsl:template>
1511
+
1512
+ <xsl:template match="itu:li//itu:p[not(parent::itu:dd)]">
1513
+ <fo:block margin-bottom="0pt"> <!-- margin-bottom="6pt" -->
1514
+ <!-- <xsl:if test="local-name(ancestor::itu:li[1]/..) = 'ul'">
1515
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1516
+ </xsl:if> -->
1517
+ <xsl:apply-templates/>
1518
+ </fo:block>
1519
+ </xsl:template>
1520
+
1521
+ <xsl:template match="itu:link" priority="2">
1522
+ <fo:inline color="blue">
1523
+ <xsl:if test="local-name(..) = 'formattedref' or ancestor::itu:preface">
1524
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1525
+ <!-- <xsl:attribute name="font-family">Arial</xsl:attribute>
1526
+ <xsl:attribute name="font-size">8pt</xsl:attribute> -->
1527
+ </xsl:if>
1528
+ <xsl:call-template name="link"/>
1529
+ </fo:inline>
1530
+ </xsl:template>
1531
+
1532
+
1533
+ <xsl:template match="itu:termnote">
1534
+ <fo:block id="{@id}" margin-top="4pt">
1535
+ <xsl:value-of select="$title-note"/>
1536
+ <xsl:if test="following-sibling::itu:termnote or preceding-sibling::itu:termnote">
1537
+ <xsl:number/><xsl:text> </xsl:text>
1538
+ </xsl:if>
1539
+ <xsl:text>– </xsl:text>
1540
+ <xsl:apply-templates/>
1541
+ </fo:block>
1542
+ </xsl:template>
1543
+ <xsl:template match="itu:termnote/itu:p">
1544
+ <xsl:apply-templates/>
1545
+ </xsl:template>
1546
+
1547
+
1548
+ <xsl:template match="itu:annex">
1549
+ <fo:block break-after="page"/>
1550
+ <xsl:apply-templates/>
1551
+ </xsl:template>
1552
+
1553
+
1554
+ <xsl:template match="itu:annex/itu:clause">
1555
+ <xsl:apply-templates/>
1556
+ </xsl:template>
1557
+
1558
+ <!-- Clause without title -->
1559
+ <xsl:template match="itu:clause[not(itu:title)]">
1560
+ <xsl:param name="sectionNum"/>
1561
+ <xsl:variable name="section">
1562
+ <xsl:for-each select="*[1]">
1563
+ <xsl:call-template name="getSection">
1564
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1565
+ </xsl:call-template>
1566
+ </xsl:for-each>
1567
+ </xsl:variable>
1568
+ <fo:block space-before="12pt" space-after="18pt" font-weight="bold">
1569
+ <fo:inline id="{@id}"><xsl:value-of select="$section"/></fo:inline>
1570
+ </fo:block>
1571
+ <xsl:apply-templates>
1572
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1573
+ </xsl:apply-templates>
1574
+ </xsl:template>
1575
+
1576
+ <xsl:template match="itu:formula" name="formula">
1577
+ <xsl:param name="sectionNum"/>
1578
+ <fo:block id="{@id}" margin-top="6pt" margin-bottom="6pt"> <!-- text-align="center" -->
1579
+ <xsl:apply-templates/>
1580
+ <fo:inline keep-together.within-line="always">
1581
+ </fo:inline>
1582
+ </fo:block>
1583
+ </xsl:template>
1584
+
1585
+ <xsl:template match="itu:formula/itu:stem">
1586
+ <fo:table table-layout="fixed" width="100%">
1587
+ <fo:table-column column-width="95%"/>
1588
+ <fo:table-column column-width="5%"/>
1589
+ <fo:table-body>
1590
+ <fo:table-row>
1591
+ <fo:table-cell display-align="center">
1592
+ <fo:block text-align="center" margin-left="0mm">
1593
+ <xsl:apply-templates/>
1594
+ </fo:block>
1595
+ </fo:table-cell>
1596
+ <fo:table-cell display-align="center">
1597
+ <fo:block text-align="right" margin-left="0mm">
1598
+ <xsl:value-of select="xalan:nodeset($contents)//item[@id = current()/ancestor::itu:formula[1]/@id]/@number"/>
1599
+ <!-- <xsl:call-template name="getItemNumber">
1600
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1601
+ </xsl:call-template> -->
1602
+ </fo:block>
1603
+ </fo:table-cell>
1604
+ </fo:table-row>
1605
+ </fo:table-body>
1606
+ </fo:table>
1607
+ </xsl:template>
1608
+
1609
+ <xsl:template match="itu:formula" mode="process">
1610
+ <xsl:param name="sectionNum"/>
1611
+ <xsl:call-template name="formula">
1612
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
1613
+ </xsl:call-template>
1614
+ </xsl:template>
1615
+
1616
+ <xsl:template match="mathml:math" priority="2">
1617
+ <fo:inline font-family="STIX2Math" font-size="11pt">
1618
+ <fo:instream-foreign-object fox:alt-text="Math">
1619
+ <xsl:copy-of select="."/>
1620
+ </fo:instream-foreign-object>
1621
+ </fo:inline>
1622
+ </xsl:template>
1623
+
1624
+ <xsl:template match="itu:xref">
1625
+ <xsl:param name="sectionNum"/>
1626
+
1627
+ <xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = current()/@target]/@section"/>
1628
+ <xsl:variable name="topsection" select="xalan:nodeset($contents)//item[@id = current()/@target]/@topsection"/>
1629
+ <xsl:variable name="xref_id" select="generate-id()"/>
1630
+ <xsl:variable name="xreftopsection" select="xalan:nodeset($contents)//item[@id = $xref_id]/@topsection"/>
1631
+
1632
+ <xsl:variable name="text" select="xalan:nodeset($contents)//item[@id = current()/@target]/text()"/>
1633
+
1634
+ <fo:basic-link internal-destination="{@target}" color="blue" text-decoration="underline" fox:alt-text="{@target}">
1635
+ <xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = current()/@target]/@type"/>
1636
+ <xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =current()/@target]/@level"/>
1637
+ <xsl:choose>
1638
+ <xsl:when test="($type = 'clause' or $type = 'term') and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
1639
+ <xsl:when test="($type = 'clause' or $type = 'term') and $level &gt; 1"><xsl:value-of select="translate($title-clause, $upper, $lower)"/></xsl:when>
1640
+ <xsl:when test="$type = 'example'">Example </xsl:when>
1641
+ <xsl:when test="$type = 'figure'"/>
1642
+ <xsl:when test="$type = 'formula'"/>
1643
+ <xsl:when test="$type = 'table'"/>
1644
+ <xsl:when test="$type = 'note'"><xsl:text>Note </xsl:text><xsl:value-of select="xalan:nodeset($contents)//item[@id = current()/@target]/text()"/></xsl:when>
1645
+
1646
+ <xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
1647
+ </xsl:choose>
1648
+
1649
+ <xsl:choose>
1650
+ <xsl:when test="$type = 'example'">
1651
+ <xsl:variable name="currentSection">
1652
+ <xsl:call-template name="getSection"/>
1653
+ </xsl:variable>
1654
+ <xsl:if test="not(contains($section, $currentSection))">
1655
+ <xsl:text>in </xsl:text>
1656
+ <xsl:if test="$level = 1">
1657
+ <xsl:value-of select="xalan:nodeset($contents)//item[@id = current()/@target]/@parent"/>
1658
+ <xsl:text> </xsl:text>
1659
+ </xsl:if>
1660
+ <xsl:value-of select="$section"/>
1661
+ </xsl:if>
1662
+ </xsl:when>
1663
+
1664
+ <xsl:when test="$type = 'figure'">
1665
+ <xsl:value-of select="$text"/>
1666
+ </xsl:when>
1667
+
1668
+ <xsl:when test="$type = 'formula'">
1669
+ <xsl:value-of select="$text"/>
1670
+ <!-- <xsl:variable name="currentSection">
1671
+ <xsl:call-template name="getSection"/>
1672
+ </xsl:variable>
1673
+
1674
+ <xsl:if test="not(contains($section, $currentSection))"> -->
1675
+ <xsl:if test="$topsection != $xreftopsection">
1676
+ <xsl:text> in </xsl:text>
1677
+ <xsl:if test="$level = 1">
1678
+ <xsl:value-of select="xalan:nodeset($contents)//item[@id = current()/@target]/@parent"/>
1679
+ <xsl:text> </xsl:text>
1680
+ </xsl:if>
1681
+ <xsl:value-of select="$section"/>
1682
+ </xsl:if>
1683
+ </xsl:when>
1684
+
1685
+ <xsl:when test="$type = 'table'">
1686
+ <xsl:value-of select="$text"/>
1687
+ </xsl:when>
1688
+
1689
+ <xsl:when test="$type = 'note'">
1690
+ <xsl:variable name="currentSection">
1691
+ <xsl:call-template name="getSection"/>
1692
+ </xsl:variable>
1693
+ <xsl:if test="not(contains($section, $currentSection))">
1694
+ <xsl:text> in </xsl:text>
1695
+ <xsl:choose>
1696
+ <xsl:when test="$level = 1"><xsl:value-of select="$title-clause"/></xsl:when>
1697
+ <xsl:when test="$level &gt; 1"><xsl:value-of select="translate($title-clause, $upper, $lower)"/></xsl:when>
1698
+ </xsl:choose>
1699
+ <xsl:value-of select="$section"/>
1700
+ </xsl:if>
1701
+ </xsl:when>
1702
+ <!-- <xsl:when test="$type = 'formula'">
1703
+
1704
+ <xsl:value-of select="$section"/>
1705
+
1706
+ <xsl:variable name="currentSection">
1707
+ <xsl:call-template name="getSection"/>
1708
+ </xsl:variable>
1709
+ <xsl:variable name="refSection">
1710
+ <xsl:for-each select="//*[@id = @target]/ancestor::itu:clause">
1711
+ <xsl:call-template name="getSection"/>
1712
+ </xsl:for-each>
1713
+ </xsl:variable>
1714
+ currentSection=<xsl:value-of select="$currentSection"/>
1715
+ refSection=<xsl:value-of select="$refSection"/>
1716
+ <xsl:if test="$currentSection != $refSection">
1717
+ <xsl:text>in </xsl:text>
1718
+ <xsl:value-of select="xalan:nodeset($contents)//item[@id = current()/@target]/@parent"/>
1719
+ <xsl:text> </xsl:text>
1720
+ <xsl:value-of select="$refSection"/>
1721
+ </xsl:if>
1722
+ </xsl:when> -->
1723
+ <xsl:otherwise>
1724
+ <xsl:value-of select="$section"/>
1725
+ </xsl:otherwise>
1726
+ </xsl:choose>
1727
+
1728
+ </fo:basic-link>
1729
+ </xsl:template>
1730
+
1731
+
1732
+ <xsl:template match="itu:example">
1733
+ <fo:block id="{@id}" font-size="10pt" margin-top="12pt">
1734
+ <xsl:apply-templates/>
1735
+ </fo:block>
1736
+ </xsl:template>
1737
+
1738
+ <xsl:template match="itu:example/itu:name">
1739
+ <fo:block font-weight="bold">
1740
+ <xsl:value-of select="normalize-space($title-example)"/>
1741
+ <xsl:if test="count(ancestor::itu:clause[1]/itu:example) &gt; 1">
1742
+ <xsl:text> </xsl:text><xsl:number count="itu:example"/>
1743
+ </xsl:if>
1744
+ <xsl:text> — </xsl:text>
1745
+ <xsl:apply-templates/>
1746
+ </fo:block>
1747
+ </xsl:template>
1748
+
1749
+ <xsl:template match="itu:example/itu:p">
1750
+ <fo:block font-size="10pt" margin-top="12pt" margin-bottom="12pt">
1751
+ <xsl:apply-templates/>
1752
+ </fo:block>
1753
+ </xsl:template>
1754
+
1755
+
1756
+ <xsl:template match="itu:eref">
1757
+ <fo:inline>
1758
+ <xsl:if test="@type = 'footnote'">
1759
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
1760
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1761
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1762
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1763
+ </xsl:if>
1764
+ <fo:basic-link internal-destination="{@bibitemid}" color="blue" text-decoration="underline" fox:alt-text="{@citeas}">
1765
+ <xsl:choose>
1766
+ <xsl:when test="contains(@citeas, '[')">
1767
+ <xsl:value-of select="@citeas" disable-output-escaping="yes"/>
1768
+ </xsl:when>
1769
+ <xsl:otherwise>
1770
+ <xsl:text>[</xsl:text><xsl:value-of select="@citeas" disable-output-escaping="yes"/><xsl:text>]</xsl:text>
1771
+ </xsl:otherwise>
1772
+ </xsl:choose>
1773
+
1774
+ <xsl:apply-templates select="itu:localityStack"/>
1775
+
1776
+ </fo:basic-link>
1777
+ </fo:inline>
1778
+ </xsl:template>
1779
+
1780
+ <xsl:template match="itu:locality">
1781
+ <xsl:choose>
1782
+ <xsl:when test="@type ='section'">Section</xsl:when>
1783
+ <xsl:otherwise/>
1784
+ </xsl:choose>
1785
+ <xsl:value-of select="itu:referenceFrom"/>
1786
+ </xsl:template>
1787
+
1788
+ <xsl:template match="itu:references[position() &gt; 1]">
1789
+ <fo:block break-after="page"/>
1790
+ <xsl:apply-templates/>
1791
+ </xsl:template>
1792
+
1793
+ <xsl:template match="itu:quote">
1794
+ <fo:block margin-top="6pt" margin-left="12mm" margin-right="12mm">
1795
+ <xsl:apply-templates select=".//itu:p"/>
1796
+ </fo:block>
1797
+ <xsl:if test="itu:author or itu:source">
1798
+ <fo:block text-align="right">
1799
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
1800
+ <xsl:text>— </xsl:text>
1801
+ <xsl:value-of select="itu:author"/>
1802
+ <xsl:if test="itu:author and itu:source">
1803
+ <xsl:text>, </xsl:text>
1804
+ </xsl:if>
1805
+ <xsl:apply-templates select="itu:source"/>
1806
+ </fo:block>
1807
+ </xsl:if>
1808
+ </xsl:template>
1809
+
1810
+ <xsl:template match="itu:source">
1811
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
1812
+ <xsl:value-of select="@citeas" disable-output-escaping="yes"/>
1813
+ <xsl:apply-templates select="itu:localityStack"/>
1814
+ </fo:basic-link>
1815
+ </xsl:template>
1816
+
1817
+ <xsl:template name="insertHeaderFooter">
1818
+ <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt">
1819
+ <fo:block-container height="19mm" display-align="after">
1820
+ <fo:table table-layout="fixed" width="100%" display-align="after">
1821
+ <fo:table-column column-width="10%"/>
1822
+ <fo:table-column column-width="90%"/>
1823
+ <fo:table-body>
1824
+ <fo:table-row>
1825
+ <fo:table-cell text-align="left" padding-bottom="8mm">
1826
+ <fo:block><fo:page-number/></fo:block>
1827
+ </fo:table-cell>
1828
+ <fo:table-cell font-weight="bold" text-align="left" padding-bottom="8mm">
1829
+ <fo:block>
1830
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1831
+ </fo:block>
1832
+ </fo:table-cell>
1833
+ </fo:table-row>
1834
+ </fo:table-body>
1835
+ </fo:table>
1836
+ </fo:block-container>
1837
+ </fo:static-content>
1838
+ <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt">
1839
+ <fo:block-container height="19mm" display-align="after">
1840
+ <fo:table table-layout="fixed" width="100%" display-align="after">
1841
+ <fo:table-column column-width="90%"/>
1842
+ <fo:table-column column-width="10%"/>
1843
+ <fo:table-body>
1844
+ <fo:table-row>
1845
+ <fo:table-cell font-weight="bold" text-align="right" padding-bottom="8mm">
1846
+ <fo:block>
1847
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1848
+ </fo:block>
1849
+ </fo:table-cell>
1850
+ <fo:table-cell text-align="right" padding-bottom="8mm" padding-right="2mm">
1851
+ <fo:block><fo:page-number/></fo:block>
1852
+ </fo:table-cell>
1853
+ </fo:table-row>
1854
+ </fo:table-body>
1855
+ </fo:table>
1856
+ </fo:block-container>
1857
+ </fo:static-content>
1858
+ </xsl:template>
1859
+
1860
+
1861
+ <xsl:variable name="Image-Fond-Rec">
1862
+ <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAHoAAANLCAMAAAC5SXlDAAADAFBMVEX2kYX1zcLNeITqUw/+7Nnh
1863
+ cnP3yr3/jD72iYD+xZnWY2vwhH7z0MbSW2bCSVzmgX3so5n3vrG5RFy5SGD5wr7+9evUbXH5h0Tz
1864
+ mYz+z6uuLErblZj/ZQD+n1vDUmP3xLiyMU3+qGv4wbTsaze1OlT+eRryraD+lkzDWmvpubPyoZL+
1865
+ vIu9PVT2jILcgoLNVGL1pHfoi4PcfHv2j4TynI7/sn/cChv0lYnyv7Xim5rps67ztqjyqJrmZmv+
1866
+ 4svqlIr/2L/hlJL2iH/2uazyrJ3UdXrynpDypJXVjZPzsKHLZHDrnZPmfHrUhIz//vztwrn+bAna
1867
+ cXPz1MrHS1znoZ7uqqLeior02c/YFyf53drKYW3CRVn//PzjkY72vK6pIkTjiYT+giz0l4r1uKrr
1868
+ fnrkravyppj0183LUF/4cx/LWWXhjouzNVHNaXSzLkupH0LxsabuekzrkIfKXWnzuZ/fo6PCQlfk
1869
+ mJX+2bWuJkb0taapIEP3x7vMc3/ylne4NlDObXj+n1jYhIj00MSkGD/HZXTcZmvkTFLxiIDVaG7+
1870
+ bwzcam7rmY7qpaD2kobmeHbUcHbWen/yopPrenf+7uPzsqLWiY7+snbgbnD++PPnqaXzlYnzmIzz
1871
+ 08fqhX/+1LTGanrzs6XuycD+3cP+17zyqpvjhYDCVWjonpn+dBXwimX+/Pr+9u/1h3/ATmH+aATz
1872
+ 1szyuK/0po3adnjBXm/1lIndf379/fytKUjsgmv0zsLeh4b1longLTe3PVb+0av0s6Tz1cr53NDp
1873
+ XR+pI0X++/f2k4fzm4ziO0T0mIv//f3mc3P0rJv3zcv408TWf4XfJS/feXjGV2b0ppL2rZuuLk32
1874
+ zMDGaHfuglrwi4O6QFjwk5fgp6jwhFrtiYzsr6jcnJ71lIjzl4v1xMPmWF6uJ0fzn4WmIEPgdnbw
1875
+ gXv///7vjoT+/v7+///+//7zz8T+/v/z0MTXX2f00MP9/v30z8P9/f3qcnfhoKDxemHfSRj//v6j
1876
+ GT//ZgD///+kGT9CyJ4iAAAAAWJLR0QAiAUdSAAAAAxjbVBQSkNtcDA3MTIAAAADSABzvAAAVV9J
1877
+ REFUeF7NfQm8nVWR5xNpiLHBsDbLwwAKYUBAECRsatgUaDC2iSh7AIEmItsICqEJdCPNEgREWQWR
1878
+ JUQWTbcgbRi0R0QM9kRw0NF2GoIyytIu/LrVnufDqX8t51Sdb7nfvffl9Zz77vJeHtT77j11qupf
1879
+ /6oa+eOErj+8drzzGvnJT37ysY997PdYF/m/4g+N3/wx/NMf47cses13dVkjh530j5/701997TU/
1880
+ WGPBgsXN4uhfCon5J39wi0SPfmn1sbGxV3suJ3qNBYv8/6Tn65q/8w9/hOgZXQS/+qqI/mu56gWL
1881
+ 5syZc/fdd5+DdRSvY3ndxesNvP48rU+l9QRePfHEp5741J3veMc7Nrjn0C7Cwxs+ffr0Ldc5+uij
1882
+ jz/++G985jOf2Xrrrffaa68T333NNdcccMABG/G66QG+jTx25chjb6Ovt41sz2ufffaZQl/3rf9y
1883
+ F6n8YYzssceHed14442L5tCNrpkv+yi57J3m46JxxwXfdRcu+VPyoFdq14uLfuKJ79JVd1wjj/I6
1884
+ pm6d1886jdd537ys8xqp3Sw9f2jbvdz10OvRJs3eYteweot2SlQ5fVSy+wNaRC+5QbaBPh7aSXSb
1885
+ 9OLfWkRvZzL1eeQ9vD772c8echGvFStWXL3iaqz9eW141V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+7Ue5ht/U/ghvNZoFiXpiLZeEexbx
2253
+ Fdm9rerJIUPhJ950tYi+ow6oZKTSAnlBqTNdWcnKCaBM0GR+YaAlPQOopB6wNUu03YU+BV2ZUmzm
2254
+ kQYsJSPxVGljHqlTrtBGrwPXTHkpOcUmZQhHZzKnTEPY1veeRZGPky1QDs+qEqCy6pE2ATlFA9j1
2255
+ QFfl5q/2yP1fmcBM+L82MkmZAJcM0Jf9ZAGc0ezCqERQx13Ofb9zV1jXD6PSJZtkmM5wmx2Wa7xs
2256
+ Hee2dtpnh8aMz/0dswwNJYPoQgvLNaP0wuoxu2C5brQOsFIMYN1/tbGy0JXP1oIAbfyKzq+p+yu9
2257
+ OINqAW5dXpFdJ7wdiufy6wIutHKXEO4F5epkubhLTK4FYNPlanyspYPOJBCTudtu3h9FRyDVK3UL
2258
+ C7+w2Xb7Eb3o/8qNmGQMnLRiOgtj4OgmE+D4QbowaScm34WpzzFww2/qzparyA1MuOWqRprGNpt9
2259
+ e2wfOBmiVbYRslL9tQ8BUrd6JgExGYgGP2+SBj+gC2zppLgQoH0GxLx7ix3HWQBlaDjfTIMuKwYo
2260
+ 7AdNOpT6a4JR2HSg3ZakAcg368qo/H9lWc/6NFehlQAAAABJRU5ErkJggg==</xsl:text>
2261
+ </xsl:variable>
2262
+
2263
+ <xsl:variable name="Image-Logo">
2264
+ <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAKEAAABDCAMAAADDA5UNAAADAFBMVEX////0oLP50NnqUHPwgJnk
2265
+ IE3nMFnhADP4wM398PPucI3d4u7CyuGHlcS/yN/T2OnoP2b1r7/e5+2Vo8uLnMVpe7WsudXW3ere
2266
+ 5+7c5uvb5uvZ5OrL1+Oks9FKY6ZWa6zi5fHhDz/9/v6jr9I6U589V6C6xtzi6u/h6e7c5+zY4+nV
2267
+ 4ejS3+efsc9yjbhec7ClsNPx8/hRZ6ksRpjk6/Dm7fK/zt6mt9JxhLl7k71JYqbA0N/J2eKarMxi
2268
+ erH74Ob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ELbR5g
2321
+ xtG6s41NNQ8oLtfw9GFKnjMM7TcwfO0RM/6DRfwnA3iPt89S8pV9DILNMorRannIuvpf/ALSiFbW
2322
+ j7bhEV/30c5np5W7D605/H57DBkY4bIwuDYbOxwhY9q/+f7GHLPS7uBrAxbLkR6HwLnzH5rRne9f
2323
+ Dsk/cQyUe/csNosNymIbXv/fePrBJZ7vn5SIRax/qT6H0UhZh0PECPKCy2SQtyfxzSg/kGOzWi2W
2324
+ ET6r7bSQG4DPxbuiri48IyJIsixki8XW19PT02ezXFHJxKP2ujz/LDAC7f1Sr9d/+dhdy/ZMfjYY
2325
+ v0rL9rg7ifF/FLKviJ4tGb0AAAAASUVORK5CYII=</xsl:text>
2326
+ </xsl:variable>
2327
+
2328
+ <!-- convert YYYY-MM-DD to (MM/YYYY) -->
2329
+ <xsl:template name="formatDate">
2330
+ <xsl:param name="date"/>
2331
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
2332
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
2333
+ <xsl:if test="$month != '' and $year != ''">
2334
+ <xsl:text>(</xsl:text><xsl:value-of select="$month"/>/<xsl:value-of select="$year"/><xsl:text>)</xsl:text>
2335
+ </xsl:if>
2336
+ </xsl:template>
2337
+
2338
+ <xsl:template name="getLevel">
2339
+ <xsl:variable name="level_total" select="count(ancestor::*)"/>
2340
+ <xsl:variable name="level">
2341
+ <xsl:choose>
2342
+ <xsl:when test="ancestor::itu:sections">
2343
+ <xsl:value-of select="$level_total - 2"/>
2344
+ </xsl:when>
2345
+ <xsl:when test="ancestor::itu:bibliography">
2346
+ <xsl:value-of select="$level_total - 2"/>
2347
+ </xsl:when>
2348
+ <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
2349
+ <xsl:otherwise>
2350
+ <xsl:value-of select="$level_total - 1"/>
2351
+ </xsl:otherwise>
2352
+ </xsl:choose>
2353
+ </xsl:variable>
2354
+ <xsl:value-of select="$level"/>
2355
+ </xsl:template>
2356
+
2357
+ <xsl:template name="getSection">
2358
+ <xsl:param name="sectionNum"/>
2359
+ <xsl:variable name="level">
2360
+ <xsl:call-template name="getLevel"/>
2361
+ </xsl:variable>
2362
+ <xsl:variable name="section">
2363
+ <xsl:choose>
2364
+ <xsl:when test="ancestor::itu:bibliography">
2365
+ <xsl:value-of select="$sectionNum"/>
2366
+ </xsl:when>
2367
+ <xsl:when test="ancestor::itu:sections">
2368
+ <!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
2369
+ <xsl:choose>
2370
+ <xsl:when test="$level = 1">
2371
+ <xsl:value-of select="$sectionNum"/>
2372
+ </xsl:when>
2373
+ <xsl:when test="$level &gt;= 2">
2374
+ <xsl:variable name="num">
2375
+ <xsl:number format=".1" level="multiple" count="itu:clause/itu:clause | itu:clause/itu:terms | itu:terms/itu:term | itu:clause/itu:term | itu:clause/itu:definitions"/>
2376
+ </xsl:variable>
2377
+ <!-- <xsl:variable name="sectionNum_">
2378
+ <xsl:choose>
2379
+ <xsl:when test="normalize-space($sectionNum) = ''"><xsl:number format="1" count="itu:sections/*"/></xsl:when>
2380
+ <xsl:otherwise>
2381
+ <xsl:value-of select="$sectionNum"/>
2382
+ </xsl:otherwise>
2383
+ </xsl:choose>
2384
+ </xsl:variable> -->
2385
+ <xsl:value-of select="concat($sectionNum, $num)"/>
2386
+ </xsl:when>
2387
+ <xsl:otherwise>
2388
+ <!-- z<xsl:value-of select="$sectionNum"/>z -->
2389
+ </xsl:otherwise>
2390
+ </xsl:choose>
2391
+ </xsl:when>
2392
+ <xsl:when test="ancestor::itu:annex[@obligation = 'informative']">
2393
+ <xsl:choose>
2394
+ <xsl:when test="$level = 1">
2395
+ <xsl:value-of select="$title-appendix"/><xsl:text> </xsl:text>
2396
+ <xsl:number format="I" level="any" count="itu:annex[@obligation = 'informative']"/>
2397
+ </xsl:when>
2398
+ <xsl:otherwise>
2399
+ <xsl:number format="I.1" level="multiple" count="itu:annex[@obligation = 'informative'] | itu:clause"/>
2400
+ </xsl:otherwise>
2401
+ </xsl:choose>
2402
+ </xsl:when>
2403
+ <xsl:when test="ancestor::itu:annex[not(@obligation) or @obligation != 'informative']">
2404
+ <xsl:choose>
2405
+ <xsl:when test="$level = 1">
2406
+ <xsl:value-of select="$title-annex"/>
2407
+ <xsl:choose>
2408
+ <xsl:when test="count(//itu:annex) = 1">
2409
+ <xsl:choose>
2410
+ <xsl:when test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
2411
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
2412
+ </xsl:when>
2413
+ <xsl:otherwise>
2414
+ <xsl:number format="A" level="any" count="itu:annex[not(@obligation) or @obligation != 'informative']"/>
2415
+ </xsl:otherwise>
2416
+ </xsl:choose>
2417
+ </xsl:when>
2418
+ <xsl:otherwise>
2419
+ <xsl:number format="A" level="any" count="itu:annex[not(@obligation) or @obligation != 'informative']"/>
2420
+ </xsl:otherwise>
2421
+ </xsl:choose>
2422
+ </xsl:when>
2423
+ <xsl:otherwise>
2424
+ <xsl:choose>
2425
+ <xsl:when test="count(//itu:annex) = 1">
2426
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/><xsl:number format=".1" level="multiple" count="itu:clause"/> <!-- itu:annex | -->
2427
+ </xsl:when>
2428
+ <xsl:otherwise>
2429
+ <xsl:number format="A.1" level="multiple" count="itu:annex | itu:clause"/>
2430
+ </xsl:otherwise>
2431
+ </xsl:choose>
2432
+ </xsl:otherwise>
2433
+ </xsl:choose>
2434
+ </xsl:when>
2435
+ <xsl:otherwise>
2436
+ </xsl:otherwise>
2437
+ </xsl:choose>
2438
+ </xsl:variable>
2439
+ <xsl:value-of select="$section"/>
2440
+ </xsl:template>
2441
+
2442
+ <xsl:template name="addLetterSpacing">
2443
+ <xsl:param name="text"/>
2444
+ <xsl:if test="string-length($text) &gt; 0">
2445
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
2446
+ <xsl:value-of select="$char"/><fo:inline font-size="15pt"><xsl:value-of select="' '"/></fo:inline>
2447
+ <xsl:call-template name="addLetterSpacing">
2448
+ <xsl:with-param name="text" select="substring($text, 2)"/>
2449
+ </xsl:call-template>
2450
+ </xsl:if>
2451
+ </xsl:template>
2452
+
2453
+ <xsl:template name="getId">
2454
+ <xsl:choose>
2455
+ <xsl:when test="../@id">
2456
+ <xsl:value-of select="../@id"/>
2457
+ </xsl:when>
2458
+ <xsl:otherwise>
2459
+ <xsl:value-of select="concat(local-name(..), '_', text())"/>
2460
+ </xsl:otherwise>
2461
+ </xsl:choose>
2462
+ </xsl:template>
2463
+
2464
+ <xsl:template name="getTopSection">
2465
+ <xsl:param name="sectionNum"/>
2466
+ <xsl:variable name="section">
2467
+ <xsl:call-template name="getSection">
2468
+ <xsl:with-param name="sectionNum" select="$sectionNum"/>
2469
+ </xsl:call-template>
2470
+ </xsl:variable>
2471
+ <xsl:variable name="topsection_" select="normalize-space(translate($section, '().-',' '))"/>
2472
+ <xsl:choose>
2473
+ <xsl:when test="contains($topsection_, ' ')">
2474
+ <xsl:value-of select="substring-before($topsection_, ' ')"/>
2475
+ </xsl:when>
2476
+ <xsl:otherwise>
2477
+ <xsl:value-of select="$topsection_"/>
2478
+ </xsl:otherwise>
2479
+ </xsl:choose>
2480
+ </xsl:template>
2481
+
2482
+ <xsl:variable name="title-table">
2483
+
2484
+ <xsl:text>Table </xsl:text>
2485
+
2486
+
2487
+ </xsl:variable><xsl:variable name="title-note">
2488
+
2489
+ <xsl:text>NOTE </xsl:text>
2490
+
2491
+
2492
+ </xsl:variable><xsl:variable name="title-figure">
2493
+
2494
+ <xsl:text>Figure </xsl:text>
2495
+
2496
+
2497
+ </xsl:variable><xsl:variable name="title-example">
2498
+
2499
+ <xsl:text>EXAMPLE </xsl:text>
2500
+
2501
+
2502
+ </xsl:variable><xsl:variable name="title-inequality">Inequality </xsl:variable><xsl:variable name="title-equation">Equation </xsl:variable><xsl:variable name="title-annex">
2503
+
2504
+ <xsl:text>Annex </xsl:text>
2505
+
2506
+
2507
+ </xsl:variable><xsl:variable name="title-appendix">
2508
+ <xsl:text>Appendix </xsl:text>
2509
+ </xsl:variable><xsl:variable name="title-clause">
2510
+
2511
+ <xsl:text>Clause </xsl:text>
2512
+
2513
+
2514
+ </xsl:variable><xsl:variable name="title-edition">
2515
+ <xsl:text>Edition </xsl:text>
2516
+ </xsl:variable><xsl:variable name="title-toc">
2517
+
2518
+ Table of Contents
2519
+ </xsl:variable><xsl:variable name="title-page">Page</xsl:variable><xsl:variable name="title-key">Key</xsl:variable><xsl:variable name="title-where">where</xsl:variable><xsl:variable name="title-descriptors">Descriptors</xsl:variable><xsl:variable name="title-part-en">Part </xsl:variable><xsl:variable name="title-part-fr">Partie </xsl:variable><xsl:variable name="title-note-to-entry">Note # to entry: </xsl:variable><xsl:variable name="title-modified">modified</xsl:variable><xsl:variable name="title-source">SOURCE</xsl:variable><xsl:variable name="title-keywords">Keywords</xsl:variable><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
2520
+
2521
+
2522
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2523
+
2524
+
2525
+
2526
+
2527
+
2528
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
2529
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2530
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2531
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2532
+
2533
+
2534
+
2535
+
2536
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2537
+
2538
+
2539
+
2540
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
2541
+
2542
+
2543
+
2544
+ </xsl:attribute-set><xsl:template match="text()">
2545
+ <xsl:value-of select="."/>
2546
+ </xsl:template><xsl:template match="*[local-name()='br']">
2547
+ <xsl:value-of select="$linebreak"/>
2548
+ </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2549
+ <!-- <xsl:call-template name="add-zero-spaces"/> -->
2550
+ <xsl:call-template name="add-zero-spaces-java"/>
2551
+ </xsl:template><xsl:template match="*[local-name()='table']">
2552
+
2553
+ <xsl:variable name="simple-table">
2554
+ <!-- <xsl:copy> -->
2555
+ <xsl:call-template name="getSimpleTable"/>
2556
+ <!-- </xsl:copy> -->
2557
+ </xsl:variable>
2558
+
2559
+ <!-- DEBUG -->
2560
+ <!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
2561
+ <!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
2562
+
2563
+ <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2564
+
2565
+ <fo:block space-before="18pt"> </fo:block>
2566
+
2567
+ <!-- <xsl:if test="$namespace = 'iso'">
2568
+ <fo:block space-before="6pt">&#xA0;</fo:block>
2569
+ </xsl:if> -->
2570
+
2571
+ <xsl:choose>
2572
+ <xsl:when test="@unnumbered = 'true'"/>
2573
+ <xsl:otherwise>
2574
+
2575
+
2576
+
2577
+ <fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
2578
+
2579
+
2580
+
2581
+
2582
+
2583
+
2584
+
2585
+
2586
+
2587
+ <xsl:value-of select="$title-table"/>
2588
+
2589
+ <xsl:call-template name="getTableNumber"/>
2590
+
2591
+
2592
+ <xsl:if test="*[local-name()='name']">
2593
+
2594
+
2595
+
2596
+ <xsl:text> — </xsl:text>
2597
+
2598
+ <xsl:apply-templates select="*[local-name()='name']" mode="process"/>
2599
+ </xsl:if>
2600
+ </fo:block>
2601
+
2602
+
2603
+ <xsl:call-template name="fn_name_display"/>
2604
+
2605
+ </xsl:otherwise>
2606
+ </xsl:choose>
2607
+
2608
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2609
+
2610
+ <!-- <xsl:variable name="cols-count">
2611
+ <xsl:choose>
2612
+ <xsl:when test="*[local-name()='thead']">
2613
+ <xsl:call-template name="calculate-columns-numbers">
2614
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2615
+ </xsl:call-template>
2616
+ </xsl:when>
2617
+ <xsl:otherwise>
2618
+ <xsl:call-template name="calculate-columns-numbers">
2619
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2620
+ </xsl:call-template>
2621
+ </xsl:otherwise>
2622
+ </xsl:choose>
2623
+ </xsl:variable> -->
2624
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2625
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2626
+
2627
+
2628
+
2629
+ <xsl:variable name="colwidths">
2630
+ <xsl:call-template name="calculate-column-widths">
2631
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2632
+ <xsl:with-param name="table" select="$simple-table"/>
2633
+ </xsl:call-template>
2634
+ </xsl:variable>
2635
+
2636
+ <!-- <xsl:variable name="colwidths2">
2637
+ <xsl:call-template name="calculate-column-widths">
2638
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2639
+ </xsl:call-template>
2640
+ </xsl:variable> -->
2641
+
2642
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2643
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
2644
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2645
+
2646
+ <xsl:variable name="margin-left">
2647
+ <xsl:choose>
2648
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2649
+ <xsl:otherwise>0</xsl:otherwise>
2650
+ </xsl:choose>
2651
+ </xsl:variable>
2652
+
2653
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2654
+
2655
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2656
+
2657
+
2658
+
2659
+
2660
+
2661
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2662
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2663
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
2664
+
2665
+
2666
+
2667
+
2668
+ <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
2669
+
2670
+
2671
+
2672
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2673
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2674
+
2675
+
2676
+
2677
+
2678
+
2679
+
2680
+
2681
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2682
+
2683
+
2684
+
2685
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2686
+ <xsl:choose>
2687
+ <xsl:when test=". = 1 or . = 0">
2688
+ <fo:table-column column-width="proportional-column-width(2)"/>
2689
+ </xsl:when>
2690
+ <xsl:otherwise>
2691
+ <fo:table-column column-width="proportional-column-width({.})"/>
2692
+ </xsl:otherwise>
2693
+ </xsl:choose>
2694
+ </xsl:for-each>
2695
+ <xsl:apply-templates/>
2696
+ </fo:table>
2697
+
2698
+
2699
+
2700
+ </fo:block-container>
2701
+ </xsl:template><xsl:template name="getTableNumber">
2702
+ <xsl:choose>
2703
+ <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
2704
+ <xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
2705
+ </xsl:when>
2706
+ <xsl:when test="ancestor::*[local-name()='annex']">
2707
+
2708
+
2709
+
2710
+
2711
+ <xsl:choose>
2712
+ <xsl:when test="ancestor::*[local-name()='annex'][@obligation = 'informative']">
2713
+ <xsl:variable name="annex-id" select="ancestor::*[local-name()='annex']/@id"/>
2714
+ <!-- Table in Appendix -->
2715
+ <xsl:number format="I-" count="*[local-name()='annex'][@obligation = 'informative']"/>
2716
+ <xsl:number format="1" level="any" count="*[local-name()='table'][(not(@unnumbered) or @unnumbered != 'true') and ancestor::*[local-name()='annex'][@id = $annex-id]]"/>
2717
+ </xsl:when>
2718
+ <!-- Table in Annex -->
2719
+ <xsl:when test="ancestor::*[local-name()='annex'][not(@obligation) or @obligation != 'informative']">
2720
+ <xsl:variable name="annex-id" select="ancestor::*[local-name()='annex']/@id"/>
2721
+ <xsl:number format="A-" count="*[local-name()='annex'][not(@obligation) or @obligation != 'informative']"/>
2722
+ <xsl:number format="1" level="any" count="*[local-name()='table'][(not(@unnumbered) or @unnumbered != 'true') and ancestor::*[local-name()='annex'][@id = $annex-id]]"/>
2723
+ </xsl:when>
2724
+ </xsl:choose>
2725
+
2726
+
2727
+
2728
+
2729
+
2730
+ </xsl:when>
2731
+ <xsl:otherwise>
2732
+
2733
+
2734
+ <xsl:number format="A." count="*[local-name()='annex']"/>
2735
+ <xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
2736
+
2737
+ </xsl:otherwise>
2738
+ </xsl:choose>
2739
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
2740
+ <xsl:apply-templates/>
2741
+ </xsl:template><xsl:template name="calculate-columns-numbers">
2742
+ <xsl:param name="table-row"/>
2743
+ <xsl:variable name="columns-count" select="count($table-row/*)"/>
2744
+ <xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
2745
+ <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
2746
+ <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
2747
+ </xsl:template><xsl:template name="calculate-column-widths">
2748
+ <xsl:param name="table"/>
2749
+ <xsl:param name="cols-count"/>
2750
+ <xsl:param name="curr-col" select="1"/>
2751
+ <xsl:param name="width" select="0"/>
2752
+
2753
+ <xsl:if test="$curr-col &lt;= $cols-count">
2754
+ <xsl:variable name="widths">
2755
+ <xsl:choose>
2756
+ <xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
2757
+ <xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
2758
+ <xsl:variable name="words">
2759
+ <xsl:call-template name="tokenize">
2760
+ <xsl:with-param name="text" select="translate(*[local-name()='th'][$curr-col],'- —:', ' ')"/>
2761
+ </xsl:call-template>
2762
+ </xsl:variable>
2763
+ <xsl:variable name="max_length">
2764
+ <xsl:call-template name="max_length">
2765
+ <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2766
+ </xsl:call-template>
2767
+ </xsl:variable>
2768
+ <width>
2769
+ <xsl:value-of select="$max_length"/>
2770
+ </width>
2771
+ </xsl:for-each>
2772
+ <xsl:for-each select="*[local-name()='tbody']//*[local-name()='tr']">
2773
+ <xsl:variable name="words">
2774
+ <xsl:call-template name="tokenize">
2775
+ <xsl:with-param name="text" select="translate(*[local-name()='td'][$curr-col],'- —:', ' ')"/>
2776
+ </xsl:call-template>
2777
+ </xsl:variable>
2778
+ <xsl:variable name="max_length">
2779
+ <xsl:call-template name="max_length">
2780
+ <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2781
+ </xsl:call-template>
2782
+ </xsl:variable>
2783
+ <width>
2784
+ <xsl:value-of select="$max_length"/>
2785
+ </width>
2786
+
2787
+ </xsl:for-each>
2788
+ </xsl:when>
2789
+ <xsl:otherwise>
2790
+ <xsl:for-each select="xalan:nodeset($table)//tr">
2791
+ <xsl:variable name="td_text">
2792
+ <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2793
+ </xsl:variable>
2794
+ <xsl:variable name="words">
2795
+ <xsl:variable name="string_with_added_zerospaces">
2796
+ <xsl:call-template name="add-zero-spaces-java">
2797
+ <xsl:with-param name="text" select="$td_text"/>
2798
+ </xsl:call-template>
2799
+ </xsl:variable>
2800
+ <xsl:call-template name="tokenize">
2801
+ <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2802
+ <!-- 2009 thinspace -->
2803
+ <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2804
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​', ' '))"/>
2805
+ </xsl:call-template>
2806
+ </xsl:variable>
2807
+ <xsl:variable name="max_length">
2808
+ <xsl:call-template name="max_length">
2809
+ <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2810
+ </xsl:call-template>
2811
+ </xsl:variable>
2812
+ <width>
2813
+ <xsl:variable name="divider">
2814
+ <xsl:choose>
2815
+ <xsl:when test="td[$curr-col]/@divide">
2816
+ <xsl:value-of select="td[$curr-col]/@divide"/>
2817
+ </xsl:when>
2818
+ <xsl:otherwise>1</xsl:otherwise>
2819
+ </xsl:choose>
2820
+ </xsl:variable>
2821
+ <xsl:value-of select="$max_length div $divider"/>
2822
+ </width>
2823
+
2824
+ </xsl:for-each>
2825
+
2826
+ </xsl:otherwise>
2827
+ </xsl:choose>
2828
+ </xsl:variable>
2829
+
2830
+
2831
+ <column>
2832
+ <xsl:for-each select="xalan:nodeset($widths)//width">
2833
+ <xsl:sort select="." data-type="number" order="descending"/>
2834
+ <xsl:if test="position()=1">
2835
+ <xsl:value-of select="."/>
2836
+ </xsl:if>
2837
+ </xsl:for-each>
2838
+ </column>
2839
+ <xsl:call-template name="calculate-column-widths">
2840
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2841
+ <xsl:with-param name="curr-col" select="$curr-col +1"/>
2842
+ <xsl:with-param name="table" select="$table"/>
2843
+ </xsl:call-template>
2844
+ </xsl:if>
2845
+ </xsl:template><xsl:template match="text()" mode="td_text">
2846
+ <xsl:variable name="zero-space">​</xsl:variable>
2847
+ <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
2848
+ </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
2849
+ <xsl:value-of select="*[local-name()='origin']/@citeas"/>
2850
+ </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2851
+ <xsl:value-of select="@target"/>
2852
+ </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2853
+ <xsl:param name="cols-count"/>
2854
+ <!-- font-weight="bold" -->
2855
+ <fo:table-header>
2856
+
2857
+ <xsl:apply-templates/>
2858
+ </fo:table-header>
2859
+ </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2860
+ <xsl:apply-templates/>
2861
+ </xsl:template><xsl:template name="insertTableFooter">
2862
+ <xsl:param name="cols-count"/>
2863
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2864
+ <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2865
+
2866
+ <fo:table-footer>
2867
+
2868
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2869
+
2870
+ <!-- if there are note(s) or fn(s) then create footer row -->
2871
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2872
+
2873
+
2874
+
2875
+ <fo:table-row>
2876
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2877
+
2878
+
2879
+
2880
+ <xsl:if test="ancestor::*[local-name()='preface']">
2881
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2882
+ </xsl:if>
2883
+
2884
+ <!-- fn will be processed inside 'note' processing -->
2885
+
2886
+
2887
+ <!-- except gb -->
2888
+
2889
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2890
+
2891
+
2892
+ <!-- horizontal row separator -->
2893
+
2894
+
2895
+ <!-- fn processing -->
2896
+ <xsl:call-template name="fn_display"/>
2897
+
2898
+ </fo:table-cell>
2899
+ </fo:table-row>
2900
+
2901
+ </xsl:if>
2902
+ </fo:table-footer>
2903
+
2904
+ </xsl:if>
2905
+ </xsl:template><xsl:template match="*[local-name()='tbody']">
2906
+
2907
+ <xsl:variable name="cols-count">
2908
+ <xsl:choose>
2909
+ <xsl:when test="../*[local-name()='thead']">
2910
+ <xsl:call-template name="calculate-columns-numbers">
2911
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
2912
+ </xsl:call-template>
2913
+ </xsl:when>
2914
+ <xsl:otherwise>
2915
+ <xsl:call-template name="calculate-columns-numbers">
2916
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
2917
+ </xsl:call-template>
2918
+ </xsl:otherwise>
2919
+ </xsl:choose>
2920
+ </xsl:variable>
2921
+
2922
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2923
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2924
+ </xsl:apply-templates>
2925
+
2926
+ <xsl:call-template name="insertTableFooter">
2927
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2928
+ </xsl:call-template>
2929
+
2930
+ <fo:table-body>
2931
+ <xsl:apply-templates/>
2932
+ <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2933
+
2934
+ </fo:table-body>
2935
+
2936
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2937
+ <xsl:variable name="parent-name" select="local-name(..)"/>
2938
+ <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2939
+ <fo:table-row min-height="4mm">
2940
+ <xsl:if test="$parent-name = 'thead'">
2941
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2942
+
2943
+
2944
+
2945
+
2946
+
2947
+ </xsl:if>
2948
+ <xsl:if test="$parent-name = 'tfoot'">
2949
+
2950
+
2951
+ </xsl:if>
2952
+
2953
+
2954
+ <xsl:apply-templates/>
2955
+ </fo:table-row>
2956
+ </xsl:template><xsl:template match="*[local-name()='th']">
2957
+ <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2958
+
2959
+
2960
+
2961
+ <xsl:if test="ancestor::*[local-name()='preface']">
2962
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2963
+ </xsl:if>
2964
+
2965
+
2966
+
2967
+
2968
+
2969
+ <xsl:if test="@colspan">
2970
+ <xsl:attribute name="number-columns-spanned">
2971
+ <xsl:value-of select="@colspan"/>
2972
+ </xsl:attribute>
2973
+ </xsl:if>
2974
+ <xsl:if test="@rowspan">
2975
+ <xsl:attribute name="number-rows-spanned">
2976
+ <xsl:value-of select="@rowspan"/>
2977
+ </xsl:attribute>
2978
+ </xsl:if>
2979
+ <fo:block>
2980
+ <xsl:apply-templates/>
2981
+ </fo:block>
2982
+ </fo:table-cell>
2983
+ </xsl:template><xsl:template match="*[local-name()='td']">
2984
+ <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2985
+
2986
+
2987
+ <xsl:if test="ancestor::*[local-name()='preface']">
2988
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2989
+ </xsl:if>
2990
+ <xsl:attribute name="display-align">before</xsl:attribute>
2991
+
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+ <xsl:if test="@colspan">
3000
+ <xsl:attribute name="number-columns-spanned">
3001
+ <xsl:value-of select="@colspan"/>
3002
+ </xsl:attribute>
3003
+ </xsl:if>
3004
+ <xsl:if test="@rowspan">
3005
+ <xsl:attribute name="number-rows-spanned">
3006
+ <xsl:value-of select="@rowspan"/>
3007
+ </xsl:attribute>
3008
+ </xsl:if>
3009
+ <fo:block>
3010
+
3011
+ <xsl:apply-templates/>
3012
+ </fo:block>
3013
+ <!-- <xsl:choose>
3014
+ <xsl:when test="count(*) = 1 and *[local-name() = 'p']">
3015
+ <xsl:apply-templates />
3016
+ </xsl:when>
3017
+ <xsl:otherwise>
3018
+ <fo:block>
3019
+ <xsl:apply-templates />
3020
+ </fo:block>
3021
+ </xsl:otherwise>
3022
+ </xsl:choose> -->
3023
+
3024
+
3025
+ </fo:table-cell>
3026
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3027
+
3028
+
3029
+ <fo:block font-size="10pt" margin-bottom="12pt">
3030
+
3031
+
3032
+
3033
+
3034
+ <fo:inline padding-right="2mm">
3035
+
3036
+
3037
+ <xsl:value-of select="$title-note"/>
3038
+
3039
+ <xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
3040
+ <xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) &gt; 1">
3041
+ <xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
3042
+ </xsl:if>
3043
+
3044
+
3045
+
3046
+
3047
+ </fo:inline>
3048
+ <xsl:apply-templates mode="process"/>
3049
+ </fo:block>
3050
+
3051
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3052
+ <xsl:apply-templates/>
3053
+ </xsl:template><xsl:template name="fn_display">
3054
+ <xsl:variable name="references">
3055
+ <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
3056
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3057
+
3058
+ <xsl:if test="ancestor::*[local-name()='preface']">
3059
+ <xsl:attribute name="preface">true</xsl:attribute>
3060
+ </xsl:if>
3061
+
3062
+
3063
+ <xsl:apply-templates/>
3064
+ </fn>
3065
+ </xsl:for-each>
3066
+ </xsl:variable>
3067
+ <xsl:for-each select="xalan:nodeset($references)//fn">
3068
+ <xsl:variable name="reference" select="@reference"/>
3069
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3070
+ <fo:block margin-bottom="12pt">
3071
+
3072
+
3073
+
3074
+
3075
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3076
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3077
+ <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3078
+ <xsl:attribute name="start-indent">5mm</xsl:attribute>
3079
+
3080
+ <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3081
+
3082
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3083
+
3084
+
3085
+
3086
+
3087
+
3088
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3089
+ <xsl:attribute name="font-size">70%</xsl:attribute>
3090
+
3091
+
3092
+ <xsl:value-of select="@reference"/>
3093
+
3094
+ <!-- <xsl:if test="@preface = 'true'"> -->
3095
+ <xsl:text>)</xsl:text>
3096
+ <!-- </xsl:if> -->
3097
+
3098
+ </fo:inline>
3099
+ <fo:inline>
3100
+
3101
+ <xsl:apply-templates/>
3102
+ </fo:inline>
3103
+ </fo:block>
3104
+ </xsl:if>
3105
+ </xsl:for-each>
3106
+ </xsl:template><xsl:template name="fn_name_display">
3107
+ <!-- <xsl:variable name="references">
3108
+ <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3109
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3110
+ <xsl:apply-templates />
3111
+ </fn>
3112
+ </xsl:for-each>
3113
+ </xsl:variable>
3114
+ $references=<xsl:copy-of select="$references"/> -->
3115
+ <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3116
+ <xsl:variable name="reference" select="@reference"/>
3117
+ <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
3118
+ <fo:block margin-bottom="12pt">
3119
+ <xsl:apply-templates/>
3120
+ </fo:block>
3121
+ </xsl:for-each>
3122
+ </xsl:template><xsl:template name="fn_display_figure">
3123
+ <xsl:variable name="key_iso">
3124
+ <!-- and (not(@class) or @class !='pseudocode') -->
3125
+ </xsl:variable>
3126
+ <xsl:variable name="references">
3127
+ <xsl:for-each select=".//*[local-name()='fn']">
3128
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3129
+ <xsl:apply-templates/>
3130
+ </fn>
3131
+ </xsl:for-each>
3132
+ </xsl:variable>
3133
+ <xsl:if test="xalan:nodeset($references)//fn">
3134
+ <fo:block>
3135
+ <fo:table width="95%" table-layout="fixed">
3136
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3137
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3138
+
3139
+ </xsl:if>
3140
+ <fo:table-column column-width="15%"/>
3141
+ <fo:table-column column-width="85%"/>
3142
+ <fo:table-body>
3143
+ <xsl:for-each select="xalan:nodeset($references)//fn">
3144
+ <xsl:variable name="reference" select="@reference"/>
3145
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3146
+ <fo:table-row>
3147
+ <fo:table-cell>
3148
+ <fo:block>
3149
+ <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
3150
+
3151
+ <xsl:value-of select="@reference"/>
3152
+ </fo:inline>
3153
+ </fo:block>
3154
+ </fo:table-cell>
3155
+ <fo:table-cell>
3156
+ <fo:block text-align="justify" margin-bottom="12pt">
3157
+
3158
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3159
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3160
+ </xsl:if>
3161
+
3162
+ <xsl:apply-templates/>
3163
+ </fo:block>
3164
+ </fo:table-cell>
3165
+ </fo:table-row>
3166
+ </xsl:if>
3167
+ </xsl:for-each>
3168
+ </fo:table-body>
3169
+ </fo:table>
3170
+ </fo:block>
3171
+ </xsl:if>
3172
+
3173
+ </xsl:template><xsl:template match="*[local-name()='fn']">
3174
+ <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3175
+ <fo:inline font-size="80%" keep-with-previous.within-line="always">
3176
+
3177
+
3178
+
3179
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3180
+ <xsl:attribute name="color">blue</xsl:attribute>
3181
+
3182
+
3183
+ <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
3184
+
3185
+ <xsl:value-of select="@reference"/>
3186
+ </fo:basic-link>
3187
+ </fo:inline>
3188
+ </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
3189
+ <fo:inline>
3190
+ <xsl:apply-templates/>
3191
+ </fo:inline>
3192
+ </xsl:template><xsl:template match="*[local-name()='dl']">
3193
+ <xsl:variable name="parent" select="local-name(..)"/>
3194
+
3195
+ <xsl:variable name="key_iso">
3196
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
3197
+ </xsl:variable>
3198
+
3199
+ <xsl:choose>
3200
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3201
+
3202
+
3203
+ <fo:block margin-bottom="12pt" text-align="left">
3204
+
3205
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3206
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3207
+ <xsl:text/>
3208
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3209
+ </fo:block>
3210
+
3211
+ </xsl:when>
3212
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3213
+ <fo:block margin-bottom="12pt" text-align="left">
3214
+
3215
+
3216
+
3217
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3218
+
3219
+
3220
+ <xsl:value-of select="$title-where"/>:
3221
+ </fo:block>
3222
+ </xsl:when>
3223
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3224
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
3225
+
3226
+
3227
+
3228
+ <xsl:value-of select="$title-key"/>
3229
+ </fo:block>
3230
+ </xsl:when>
3231
+ </xsl:choose>
3232
+
3233
+ <!-- a few components -->
3234
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3235
+ <fo:block>
3236
+
3237
+
3238
+ <xsl:if test="$parent = 'figure' or $parent = 'formula'">
3239
+ <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
3240
+ </xsl:if>
3241
+ <xsl:if test="$parent = 'li'">
3242
+ <!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
3243
+ </xsl:if>
3244
+
3245
+
3246
+
3247
+ <fo:block>
3248
+
3249
+
3250
+
3251
+ <!-- create virtual html table for dl/[dt and dd] -->
3252
+ <xsl:variable name="html-table">
3253
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
3254
+ <xsl:element name="{$ns}:table">
3255
+ <tbody>
3256
+ <xsl:apply-templates mode="dl"/>
3257
+ </tbody>
3258
+ </xsl:element>
3259
+ </xsl:variable>
3260
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
3261
+ <xsl:variable name="colwidths">
3262
+ <xsl:call-template name="calculate-column-widths">
3263
+ <xsl:with-param name="cols-count" select="2"/>
3264
+ <xsl:with-param name="table" select="$html-table"/>
3265
+ </xsl:call-template>
3266
+ </xsl:variable>
3267
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3268
+
3269
+ <fo:table width="95%" table-layout="fixed">
3270
+
3271
+ <xsl:choose>
3272
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3273
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3274
+ </xsl:when>
3275
+ <xsl:when test="normalize-space($key_iso) = 'true'">
3276
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3277
+
3278
+ </xsl:when>
3279
+ </xsl:choose>
3280
+ <xsl:choose>
3281
+ <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
3282
+ <fo:table-column column-width="50%"/>
3283
+ <fo:table-column column-width="50%"/>
3284
+ </xsl:when>
3285
+ <xsl:otherwise>
3286
+ <xsl:choose>
3287
+ <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
3288
+ <fo:table-column column-width="60%"/>
3289
+ <fo:table-column column-width="40%"/>
3290
+ </xsl:when> -->
3291
+ <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.3">
3292
+ <fo:table-column column-width="50%"/>
3293
+ <fo:table-column column-width="50%"/>
3294
+ </xsl:when>
3295
+ <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 0.5">
3296
+ <fo:table-column column-width="40%"/>
3297
+ <fo:table-column column-width="60%"/>
3298
+ </xsl:when>
3299
+ <xsl:otherwise>
3300
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3301
+ <xsl:choose>
3302
+ <xsl:when test=". = 1 or . = 0">
3303
+ <fo:table-column column-width="proportional-column-width(2)"/>
3304
+ </xsl:when>
3305
+ <xsl:otherwise>
3306
+ <fo:table-column column-width="proportional-column-width({.})"/>
3307
+ </xsl:otherwise>
3308
+ </xsl:choose>
3309
+ </xsl:for-each>
3310
+ </xsl:otherwise>
3311
+ </xsl:choose>
3312
+ <!-- <fo:table-column column-width="15%"/>
3313
+ <fo:table-column column-width="85%"/> -->
3314
+ </xsl:otherwise>
3315
+ </xsl:choose>
3316
+ <fo:table-body>
3317
+ <xsl:apply-templates>
3318
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
3319
+ </xsl:apply-templates>
3320
+ </fo:table-body>
3321
+ </fo:table>
3322
+ </fo:block>
3323
+ </fo:block>
3324
+ </xsl:if>
3325
+ </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
3326
+ <xsl:param name="key_iso"/>
3327
+
3328
+ <!-- <tr>
3329
+ <td>NOTE</td>
3330
+ <td>
3331
+ <xsl:apply-templates />
3332
+ </td>
3333
+ </tr>
3334
+ -->
3335
+ <fo:table-row>
3336
+ <fo:table-cell>
3337
+ <fo:block margin-top="6pt">
3338
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3339
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3340
+ </xsl:if>
3341
+ <xsl:value-of select="$title-note"/>
3342
+ </fo:block>
3343
+ </fo:table-cell>
3344
+ <fo:table-cell>
3345
+ <fo:block>
3346
+ <xsl:apply-templates/>
3347
+ </fo:block>
3348
+ </fo:table-cell>
3349
+ </fo:table-row>
3350
+ </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
3351
+ <tr>
3352
+ <td>
3353
+ <xsl:apply-templates/>
3354
+ </td>
3355
+ <td>
3356
+
3357
+
3358
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3359
+
3360
+ </td>
3361
+ </tr>
3362
+
3363
+ </xsl:template><xsl:template match="*[local-name()='dt']">
3364
+ <xsl:param name="key_iso"/>
3365
+
3366
+ <fo:table-row>
3367
+ <fo:table-cell>
3368
+
3369
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3370
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3371
+ </xsl:if>
3372
+
3373
+ <fo:block margin-top="6pt">
3374
+
3375
+
3376
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3377
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3378
+
3379
+ </xsl:if>
3380
+
3381
+
3382
+
3383
+
3384
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3385
+ <xsl:attribute name="text-align">right</xsl:attribute>
3386
+ </xsl:if>
3387
+
3388
+
3389
+ <xsl:apply-templates/>
3390
+
3391
+ </fo:block>
3392
+ </fo:table-cell>
3393
+ <fo:table-cell>
3394
+ <fo:block>
3395
+
3396
+ <xsl:attribute name="text-align">justify</xsl:attribute>
3397
+
3398
+
3399
+
3400
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3401
+
3402
+ </fo:block>
3403
+ </fo:table-cell>
3404
+ </fo:table-row>
3405
+
3406
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3407
+ <xsl:apply-templates/>
3408
+ </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3409
+ <xsl:apply-templates/>
3410
+ </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3411
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3412
+ </xsl:template><xsl:template match="*[local-name()='em']">
3413
+ <fo:inline font-style="italic">
3414
+ <xsl:apply-templates/>
3415
+ </fo:inline>
3416
+ </xsl:template><xsl:template match="*[local-name()='strong']">
3417
+ <fo:inline font-weight="bold">
3418
+ <xsl:apply-templates/>
3419
+ </fo:inline>
3420
+ </xsl:template><xsl:template match="*[local-name()='sup']">
3421
+ <fo:inline font-size="80%" vertical-align="super">
3422
+ <xsl:apply-templates/>
3423
+ </fo:inline>
3424
+ </xsl:template><xsl:template match="*[local-name()='sub']">
3425
+ <fo:inline font-size="80%" vertical-align="sub">
3426
+ <xsl:apply-templates/>
3427
+ </fo:inline>
3428
+ </xsl:template><xsl:template match="*[local-name()='tt']">
3429
+ <fo:inline font-family="Courier" font-size="10pt">
3430
+ <xsl:apply-templates/>
3431
+ </fo:inline>
3432
+ </xsl:template><xsl:template match="*[local-name()='del']">
3433
+ <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3434
+ <xsl:apply-templates/>
3435
+ </fo:inline>
3436
+ </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
3437
+ <xsl:variable name="text" select="normalize-space(.)"/>
3438
+ <fo:inline font-size="75%">
3439
+ <xsl:if test="string-length($text) &gt; 0">
3440
+ <xsl:call-template name="recursiveSmallCaps">
3441
+ <xsl:with-param name="text" select="$text"/>
3442
+ </xsl:call-template>
3443
+ </xsl:if>
3444
+ </fo:inline>
3445
+ </xsl:template><xsl:template name="recursiveSmallCaps">
3446
+ <xsl:param name="text"/>
3447
+ <xsl:variable name="char" select="substring($text,1,1)"/>
3448
+ <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
3449
+ <xsl:choose>
3450
+ <xsl:when test="$char=$upperCase">
3451
+ <fo:inline font-size="{100 div 0.75}%">
3452
+ <xsl:value-of select="$upperCase"/>
3453
+ </fo:inline>
3454
+ </xsl:when>
3455
+ <xsl:otherwise>
3456
+ <xsl:value-of select="$upperCase"/>
3457
+ </xsl:otherwise>
3458
+ </xsl:choose>
3459
+ <xsl:if test="string-length($text) &gt; 1">
3460
+ <xsl:call-template name="recursiveSmallCaps">
3461
+ <xsl:with-param name="text" select="substring($text,2)"/>
3462
+ </xsl:call-template>
3463
+ </xsl:if>
3464
+ </xsl:template><xsl:template name="tokenize">
3465
+ <xsl:param name="text"/>
3466
+ <xsl:param name="separator" select="' '"/>
3467
+ <xsl:choose>
3468
+ <xsl:when test="not(contains($text, $separator))">
3469
+ <word>
3470
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3471
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3472
+ <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
3473
+ <xsl:variable name="len_str">
3474
+ <xsl:choose>
3475
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3476
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
3477
+ </xsl:when>
3478
+ <xsl:otherwise>
3479
+ <xsl:value-of select="$len_str_tmp"/>
3480
+ </xsl:otherwise>
3481
+ </xsl:choose>
3482
+ </xsl:variable>
3483
+
3484
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3485
+ <xsl:message>
3486
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3487
+ len_str=<xsl:value-of select="$len_str"/>
3488
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3489
+ </xsl:message>
3490
+ </xsl:if> -->
3491
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3492
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
3493
+ <xsl:choose>
3494
+ <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3495
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
3496
+ </xsl:when>
3497
+ <xsl:otherwise>
3498
+ <xsl:value-of select="$len_str"/>
3499
+ </xsl:otherwise>
3500
+ </xsl:choose>
3501
+ </word>
3502
+ </xsl:when>
3503
+ <xsl:otherwise>
3504
+ <word>
3505
+ <xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
3506
+ </word>
3507
+ <xsl:call-template name="tokenize">
3508
+ <xsl:with-param name="text" select="substring-after($text, $separator)"/>
3509
+ </xsl:call-template>
3510
+ </xsl:otherwise>
3511
+ </xsl:choose>
3512
+ </xsl:template><xsl:template name="max_length">
3513
+ <xsl:param name="words"/>
3514
+ <xsl:for-each select="$words//word">
3515
+ <xsl:sort select="." data-type="number" order="descending"/>
3516
+ <xsl:if test="position()=1">
3517
+ <xsl:value-of select="."/>
3518
+ </xsl:if>
3519
+ </xsl:for-each>
3520
+ </xsl:template><xsl:template name="add-zero-spaces-java">
3521
+ <xsl:param name="text" select="."/>
3522
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3523
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
3524
+ </xsl:template><xsl:template name="add-zero-spaces">
3525
+ <xsl:param name="text" select="."/>
3526
+ <xsl:variable name="zero-space-after-chars">-</xsl:variable>
3527
+ <xsl:variable name="zero-space-after-dot">.</xsl:variable>
3528
+ <xsl:variable name="zero-space-after-colon">:</xsl:variable>
3529
+ <xsl:variable name="zero-space-after-equal">=</xsl:variable>
3530
+ <xsl:variable name="zero-space-after-underscore">_</xsl:variable>
3531
+ <xsl:variable name="zero-space">​</xsl:variable>
3532
+ <xsl:choose>
3533
+ <xsl:when test="contains($text, $zero-space-after-chars)">
3534
+ <xsl:value-of select="substring-before($text, $zero-space-after-chars)"/>
3535
+ <xsl:value-of select="$zero-space-after-chars"/>
3536
+ <xsl:value-of select="$zero-space"/>
3537
+ <xsl:call-template name="add-zero-spaces">
3538
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-chars)"/>
3539
+ </xsl:call-template>
3540
+ </xsl:when>
3541
+ <xsl:when test="contains($text, $zero-space-after-dot)">
3542
+ <xsl:value-of select="substring-before($text, $zero-space-after-dot)"/>
3543
+ <xsl:value-of select="$zero-space-after-dot"/>
3544
+ <xsl:value-of select="$zero-space"/>
3545
+ <xsl:call-template name="add-zero-spaces">
3546
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-dot)"/>
3547
+ </xsl:call-template>
3548
+ </xsl:when>
3549
+ <xsl:when test="contains($text, $zero-space-after-colon)">
3550
+ <xsl:value-of select="substring-before($text, $zero-space-after-colon)"/>
3551
+ <xsl:value-of select="$zero-space-after-colon"/>
3552
+ <xsl:value-of select="$zero-space"/>
3553
+ <xsl:call-template name="add-zero-spaces">
3554
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-colon)"/>
3555
+ </xsl:call-template>
3556
+ </xsl:when>
3557
+ <xsl:when test="contains($text, $zero-space-after-equal)">
3558
+ <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3559
+ <xsl:value-of select="$zero-space-after-equal"/>
3560
+ <xsl:value-of select="$zero-space"/>
3561
+ <xsl:call-template name="add-zero-spaces">
3562
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3563
+ </xsl:call-template>
3564
+ </xsl:when>
3565
+ <xsl:when test="contains($text, $zero-space-after-underscore)">
3566
+ <xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
3567
+ <xsl:value-of select="$zero-space-after-underscore"/>
3568
+ <xsl:value-of select="$zero-space"/>
3569
+ <xsl:call-template name="add-zero-spaces">
3570
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
3571
+ </xsl:call-template>
3572
+ </xsl:when>
3573
+ <xsl:otherwise>
3574
+ <xsl:value-of select="$text"/>
3575
+ </xsl:otherwise>
3576
+ </xsl:choose>
3577
+ </xsl:template><xsl:template name="add-zero-spaces-equal">
3578
+ <xsl:param name="text" select="."/>
3579
+ <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
3580
+ <xsl:variable name="zero-space-after-equal">=</xsl:variable>
3581
+ <xsl:variable name="zero-space">​</xsl:variable>
3582
+ <xsl:choose>
3583
+ <xsl:when test="contains($text, $zero-space-after-equals)">
3584
+ <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3585
+ <xsl:value-of select="$zero-space-after-equals"/>
3586
+ <xsl:value-of select="$zero-space"/>
3587
+ <xsl:call-template name="add-zero-spaces-equal">
3588
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
3589
+ </xsl:call-template>
3590
+ </xsl:when>
3591
+ <xsl:when test="contains($text, $zero-space-after-equal)">
3592
+ <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3593
+ <xsl:value-of select="$zero-space-after-equal"/>
3594
+ <xsl:value-of select="$zero-space"/>
3595
+ <xsl:call-template name="add-zero-spaces-equal">
3596
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3597
+ </xsl:call-template>
3598
+ </xsl:when>
3599
+ <xsl:otherwise>
3600
+ <xsl:value-of select="$text"/>
3601
+ </xsl:otherwise>
3602
+ </xsl:choose>
3603
+ </xsl:template><xsl:template name="getSimpleTable">
3604
+ <xsl:variable name="simple-table">
3605
+
3606
+ <!-- Step 1. colspan processing -->
3607
+ <xsl:variable name="simple-table-colspan">
3608
+ <tbody>
3609
+ <xsl:apply-templates mode="simple-table-colspan"/>
3610
+ </tbody>
3611
+ </xsl:variable>
3612
+
3613
+ <!-- Step 2. rowspan processing -->
3614
+ <xsl:variable name="simple-table-rowspan">
3615
+ <xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
3616
+ </xsl:variable>
3617
+
3618
+ <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3619
+
3620
+ <!-- <xsl:choose>
3621
+ <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3622
+
3623
+ </xsl:when>
3624
+ <xsl:otherwise>
3625
+ <xsl:copy-of select="current()"/>
3626
+ </xsl:otherwise>
3627
+ </xsl:choose> -->
3628
+ </xsl:variable>
3629
+ <xsl:copy-of select="$simple-table"/>
3630
+ </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
3631
+ <xsl:apply-templates mode="simple-table-colspan"/>
3632
+ </xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
3633
+ <xsl:choose>
3634
+ <xsl:when test="@colspan">
3635
+ <xsl:variable name="td">
3636
+ <xsl:element name="td">
3637
+ <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
3638
+ <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
3639
+ <xsl:apply-templates mode="simple-table-colspan"/>
3640
+ </xsl:element>
3641
+ </xsl:variable>
3642
+ <xsl:call-template name="repeatNode">
3643
+ <xsl:with-param name="count" select="@colspan"/>
3644
+ <xsl:with-param name="node" select="$td"/>
3645
+ </xsl:call-template>
3646
+ </xsl:when>
3647
+ <xsl:otherwise>
3648
+ <xsl:element name="td">
3649
+ <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
3650
+ <xsl:apply-templates mode="simple-table-colspan"/>
3651
+ </xsl:element>
3652
+ </xsl:otherwise>
3653
+ </xsl:choose>
3654
+ </xsl:template><xsl:template match="@colspan" mode="simple-table-colspan"/><xsl:template match="*[local-name()='tr']" mode="simple-table-colspan">
3655
+ <xsl:element name="tr">
3656
+ <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
3657
+ <xsl:apply-templates mode="simple-table-colspan"/>
3658
+ </xsl:element>
3659
+ </xsl:template><xsl:template match="@*|node()" mode="simple-table-colspan">
3660
+ <xsl:copy>
3661
+ <xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
3662
+ </xsl:copy>
3663
+ </xsl:template><xsl:template name="repeatNode">
3664
+ <xsl:param name="count"/>
3665
+ <xsl:param name="node"/>
3666
+
3667
+ <xsl:if test="$count &gt; 0">
3668
+ <xsl:call-template name="repeatNode">
3669
+ <xsl:with-param name="count" select="$count - 1"/>
3670
+ <xsl:with-param name="node" select="$node"/>
3671
+ </xsl:call-template>
3672
+ <xsl:copy-of select="$node"/>
3673
+ </xsl:if>
3674
+ </xsl:template><xsl:template match="@*|node()" mode="simple-table-rowspan">
3675
+ <xsl:copy>
3676
+ <xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
3677
+ </xsl:copy>
3678
+ </xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
3679
+ <xsl:copy>
3680
+ <xsl:copy-of select="tr[1]"/>
3681
+ <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
3682
+ <xsl:with-param name="previousRow" select="tr[1]"/>
3683
+ </xsl:apply-templates>
3684
+ </xsl:copy>
3685
+ </xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
3686
+ <xsl:param name="previousRow"/>
3687
+ <xsl:variable name="currentRow" select="."/>
3688
+
3689
+ <xsl:variable name="normalizedTDs">
3690
+ <xsl:for-each select="xalan:nodeset($previousRow)//td">
3691
+ <xsl:choose>
3692
+ <xsl:when test="@rowspan &gt; 1">
3693
+ <xsl:copy>
3694
+ <xsl:attribute name="rowspan">
3695
+ <xsl:value-of select="@rowspan - 1"/>
3696
+ </xsl:attribute>
3697
+ <xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
3698
+ <xsl:copy-of select="node()"/>
3699
+ </xsl:copy>
3700
+ </xsl:when>
3701
+ <xsl:otherwise>
3702
+ <xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
3703
+ </xsl:otherwise>
3704
+ </xsl:choose>
3705
+ </xsl:for-each>
3706
+ </xsl:variable>
3707
+
3708
+ <xsl:variable name="newRow">
3709
+ <xsl:copy>
3710
+ <xsl:copy-of select="$currentRow/@*"/>
3711
+ <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
3712
+ </xsl:copy>
3713
+ </xsl:variable>
3714
+ <xsl:copy-of select="$newRow"/>
3715
+
3716
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
3717
+ <xsl:with-param name="previousRow" select="$newRow"/>
3718
+ </xsl:apply-templates>
3719
+ </xsl:template><xsl:template name="getLang">
3720
+ <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3721
+ <xsl:choose>
3722
+ <xsl:when test="$language = 'English'">en</xsl:when>
3723
+ <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
3724
+ </xsl:choose>
3725
+ </xsl:template><xsl:template name="capitalizeWords">
3726
+ <xsl:param name="str"/>
3727
+ <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
3728
+ <xsl:choose>
3729
+ <xsl:when test="contains($str2, ' ')">
3730
+ <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3731
+ <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3732
+ <xsl:value-of select="substring($substr, 2)"/>
3733
+ <xsl:text> </xsl:text>
3734
+ <xsl:call-template name="capitalizeWords">
3735
+ <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
3736
+ </xsl:call-template>
3737
+ </xsl:when>
3738
+ <xsl:otherwise>
3739
+ <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3740
+ <xsl:value-of select="substring($str2, 2)"/>
3741
+ </xsl:otherwise>
3742
+ </xsl:choose>
3743
+ </xsl:template><xsl:template match="mathml:math">
3744
+ <fo:inline font-family="STIX2Math">
3745
+ <fo:instream-foreign-object fox:alt-text="Math">
3746
+ <xsl:copy-of select="."/>
3747
+ </fo:instream-foreign-object>
3748
+ </fo:inline>
3749
+ </xsl:template><xsl:template match="*[local-name()='localityStack']">
3750
+ <xsl:for-each select="*[local-name()='locality']">
3751
+ <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
3752
+ <xsl:apply-templates select="."/>
3753
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
3754
+ </xsl:for-each>
3755
+ </xsl:template><xsl:template match="*[local-name()='link']" name="link">
3756
+ <xsl:variable name="target">
3757
+ <xsl:choose>
3758
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3759
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
3760
+ </xsl:when>
3761
+ <xsl:otherwise>
3762
+ <xsl:value-of select="normalize-space(@target)"/>
3763
+ </xsl:otherwise>
3764
+ </xsl:choose>
3765
+ </xsl:variable>
3766
+ <fo:inline xsl:use-attribute-sets="link-style">
3767
+ <xsl:choose>
3768
+ <xsl:when test="$target = ''">
3769
+ <xsl:apply-templates/>
3770
+ </xsl:when>
3771
+ <xsl:otherwise>
3772
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3773
+ <xsl:choose>
3774
+ <xsl:when test="normalize-space(.) = ''">
3775
+ <xsl:value-of select="$target"/>
3776
+ </xsl:when>
3777
+ <xsl:otherwise>
3778
+ <xsl:apply-templates/>
3779
+ </xsl:otherwise>
3780
+ </xsl:choose>
3781
+ </fo:basic-link>
3782
+ </xsl:otherwise>
3783
+ </xsl:choose>
3784
+ </fo:inline>
3785
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3786
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3787
+ <!-- <xsl:choose>
3788
+ <xsl:when test="@lang = 'en'"></xsl:when>
3789
+ <xsl:otherwise> -->
3790
+ <xsl:attribute name="white-space">pre</xsl:attribute>
3791
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3792
+ <!-- </xsl:otherwise>
3793
+ </xsl:choose> -->
3794
+ <xsl:apply-templates/>
3795
+ </fo:block>
3796
+ </xsl:template><xsl:template match="*[local-name()='bookmark']">
3797
+ <fo:inline id="{@id}"/>
3798
+ </xsl:template><xsl:template match="*[local-name()='appendix']">
3799
+ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3800
+ <fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
3801
+ <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3802
+ </fo:block>
3803
+ <xsl:apply-templates/>
3804
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3805
+ <fo:inline><xsl:apply-templates/></fo:inline>
3806
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
3807
+ <fo:block xsl:use-attribute-sets="appendix-example-style">
3808
+ <xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
3809
+ <xsl:value-of select="$title-example"/>
3810
+ <xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) &gt; 1">
3811
+ <xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
3812
+ </xsl:if>
3813
+ <xsl:if test="*[local-name()='name']">
3814
+ <xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
3815
+ </xsl:if>
3816
+ </fo:block>
3817
+ <xsl:apply-templates/>
3818
+ </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
3819
+ <fo:inline><xsl:apply-templates/></fo:inline>
3820
+ </xsl:template><xsl:template match="*[local-name() = 'callout']">
3821
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3822
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']">
3823
+ <xsl:variable name="annotation-id" select="@id"/>
3824
+ <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3825
+ <fo:block id="{$annotation-id}" white-space="nowrap">
3826
+ <fo:inline>
3827
+ <xsl:apply-templates>
3828
+ <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
3829
+ </xsl:apply-templates>
3830
+ </fo:inline>
3831
+ </fo:block>
3832
+ </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
3833
+ <xsl:param name="callout"/>
3834
+ <fo:inline id="{@id}">
3835
+ <!-- for first p in annotation, put <x> -->
3836
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3837
+ <xsl:apply-templates/>
3838
+ </fo:inline>
3839
+ </xsl:template><xsl:template name="convertDate">
3840
+ <xsl:param name="date"/>
3841
+ <xsl:param name="format" select="'short'"/>
3842
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
3843
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
3844
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
3845
+ <xsl:variable name="monthStr">
3846
+ <xsl:choose>
3847
+ <xsl:when test="$month = '01'">January</xsl:when>
3848
+ <xsl:when test="$month = '02'">February</xsl:when>
3849
+ <xsl:when test="$month = '03'">March</xsl:when>
3850
+ <xsl:when test="$month = '04'">April</xsl:when>
3851
+ <xsl:when test="$month = '05'">May</xsl:when>
3852
+ <xsl:when test="$month = '06'">June</xsl:when>
3853
+ <xsl:when test="$month = '07'">July</xsl:when>
3854
+ <xsl:when test="$month = '08'">August</xsl:when>
3855
+ <xsl:when test="$month = '09'">September</xsl:when>
3856
+ <xsl:when test="$month = '10'">October</xsl:when>
3857
+ <xsl:when test="$month = '11'">November</xsl:when>
3858
+ <xsl:when test="$month = '12'">December</xsl:when>
3859
+ </xsl:choose>
3860
+ </xsl:variable>
3861
+ <xsl:variable name="result">
3862
+ <xsl:choose>
3863
+ <xsl:when test="$format = 'short' or $day = ''">
3864
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
3865
+ </xsl:when>
3866
+ <xsl:otherwise>
3867
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
3868
+ </xsl:otherwise>
3869
+ </xsl:choose>
3870
+ </xsl:variable>
3871
+ <xsl:value-of select="$result"/>
3872
+ </xsl:template><xsl:template name="insertKeywords">
3873
+ <xsl:param name="sorting" select="'true'"/>
3874
+ <xsl:param name="charAtEnd" select="'.'"/>
3875
+ <xsl:param name="charDelim" select="', '"/>
3876
+ <xsl:choose>
3877
+ <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
3878
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
3879
+ <xsl:sort data-type="text" order="ascending"/>
3880
+ <xsl:call-template name="insertKeyword">
3881
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
3882
+ <xsl:with-param name="charDelim" select="$charDelim"/>
3883
+ </xsl:call-template>
3884
+ </xsl:for-each>
3885
+ </xsl:when>
3886
+ <xsl:otherwise>
3887
+ <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
3888
+ <xsl:call-template name="insertKeyword">
3889
+ <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
3890
+ <xsl:with-param name="charDelim" select="$charDelim"/>
3891
+ </xsl:call-template>
3892
+ </xsl:for-each>
3893
+ </xsl:otherwise>
3894
+ </xsl:choose>
3895
+ </xsl:template><xsl:template name="insertKeyword">
3896
+ <xsl:param name="charAtEnd"/>
3897
+ <xsl:param name="charDelim"/>
3898
+ <xsl:apply-templates/>
3899
+ <xsl:choose>
3900
+ <xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
3901
+ <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
3902
+ </xsl:choose>
3903
+ </xsl:template></xsl:stylesheet>