metanorma-itu 1.0.14 → 1.1.0

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