metanorma-itu 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,9 +18,9 @@
18
18
  <!-- Rec. ITU-T G.650.1 (03/2018) -->
19
19
  <xsl:variable name="footerprefix" select="'Rec. '"/>
20
20
  <xsl:variable name="docname">
21
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
21
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
22
22
  <xsl:text> </xsl:text>
23
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
23
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
24
24
  <xsl:text> </xsl:text>
25
25
  </xsl:variable>
26
26
  <xsl:variable name="docdate">
@@ -28,13 +28,25 @@
28
28
  <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
29
29
  </xsl:call-template>
30
30
  </xsl:variable>
31
- <xsl:variable name="doctype">
31
+ <xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype"/>
32
+ <xsl:variable name="doctypeTitle">
32
33
  <xsl:call-template name="capitalize">
33
- <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype"/>
34
+ <xsl:with-param name="str" select="$doctype"/>
34
35
  </xsl:call-template>
35
36
  </xsl:variable>
37
+ <xsl:variable name="doctypeCapitalizedTitle">
38
+ <xsl:call-template name="capitalizeWords">
39
+ <xsl:with-param name="str" select="$doctype"/>
40
+ </xsl:call-template>
41
+ </xsl:variable>
42
+
43
+ <xsl:variable name="xSTR-ACRONYM">
44
+ <xsl:variable name="x" select="substring(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title, 1, 1)"/>
45
+ <xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
46
+ <xsl:value-of select="concat($x,'STR-', $acronym)"/>
47
+ </xsl:variable>
36
48
 
37
-
49
+
38
50
  <!-- Example:
39
51
  <item level="1" id="Foreword" display="true">Foreword</item>
40
52
  <item id="term-script" display="false">3.2</item>
@@ -42,17 +54,17 @@
42
54
  <xsl:variable name="contents">
43
55
  <contents>
44
56
  <!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
45
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]" mode="contents"/> <!-- @id = 'scope' -->
57
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents"/> <!-- @id = 'scope' -->
46
58
 
47
59
  <!-- Normative references -->
48
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]" mode="contents"/> <!-- @id = 'references' -->
60
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents"/> <!-- @id = 'references' -->
49
61
 
50
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]" mode="contents"/> <!-- @id != 'scope' -->
62
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents"/> <!-- @id != 'scope' -->
51
63
 
52
64
  <xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
53
65
 
54
66
  <!-- Bibliography -->
55
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]" mode="contents"/> <!-- @id = 'bibliography' -->
67
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/> <!-- @id = 'bibliography' -->
56
68
 
57
69
  <xsl:apply-templates select="//itu:table" mode="contents"/>
58
70
 
@@ -63,6 +75,21 @@
63
75
  <xsl:call-template name="getLang"/>
64
76
  </xsl:variable>
65
77
 
78
+
79
+ <xsl:variable name="footer-TR">
80
+ <xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date,1,7), ')')"/>
81
+ <xsl:value-of select="concat($xSTR-ACRONYM, ' ', $date)"/>
82
+ </xsl:variable>
83
+
84
+ <xsl:variable name="footer-IG">
85
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
86
+ <xsl:text> for </xsl:text>
87
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
88
+ <xsl:text> </xsl:text>
89
+ <xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on,1,7), ')')"/>
90
+ <xsl:value-of select="$date"/>
91
+ </xsl:variable>
92
+
66
93
  <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
67
94
  <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
68
95
 
@@ -70,6 +97,17 @@
70
97
  <xsl:call-template name="namespaceCheck"/>
71
98
  <fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
72
99
  <fo:layout-master-set>
100
+
101
+
102
+ <!-- Technical Report first page -->
103
+ <fo:simple-page-master master-name="TR-first-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
104
+ <fo:region-body margin-top="21.6mm" margin-bottom="25.4mm" margin-left="20.1mm" margin-right="22.6mm"/>
105
+ <fo:region-before region-name="TR-first-page-header" extent="21.6mm" display-align="center"/>
106
+ <fo:region-after region-name="TR-first-page-footer" extent="25.4mm" display-align="center"/>
107
+ <fo:region-start region-name="TR-first-page-left-region" extent="20.1mm"/>
108
+ <fo:region-end region-name="TR-first-page-right-region" extent="22.6mm"/>
109
+ </fo:simple-page-master>
110
+
73
111
  <!-- cover page -->
74
112
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
75
113
  <fo:region-body margin-top="19.2mm" margin-bottom="5mm" margin-left="19.2mm" margin-right="19.2mm"/>
@@ -131,6 +169,130 @@
131
169
  <xsl:with-param name="contents" select="$contents"/>
132
170
  </xsl:call-template>
133
171
 
172
+
173
+ <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper' or $doctype = 'implementers-guide'">
174
+ <fo:page-sequence master-reference="TR-first-page">
175
+ <fo:flow flow-name="xsl-region-body">
176
+ <fo:block>
177
+ <fo:table width="175mm" table-layout="fixed" border-top="1.5pt solid black">
178
+ <fo:table-column column-width="29mm"/>
179
+ <fo:table-column column-width="45mm"/>
180
+ <fo:table-column column-width="28mm"/>
181
+ <fo:table-column column-width="72mm"/>
182
+ <fo:table-body>
183
+ <fo:table-row>
184
+ <fo:table-cell padding-left="1mm" padding-top="3mm">
185
+ <fo:block font-weight="bold">Question(s):</fo:block>
186
+ </fo:table-cell>
187
+ <fo:table-cell padding-top="3mm">
188
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:group/itu:name"/></fo:block>
189
+ </fo:table-cell>
190
+ <fo:table-cell padding-top="3mm">
191
+ <fo:block font-weight="bold">Meeting, date:</fo:block>
192
+ </fo:table-cell>
193
+ <fo:table-cell padding-top="3mm" text-align="right" padding-right="1mm">
194
+ <fo:block>
195
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/>
196
+ <xsl:text>, </xsl:text>
197
+ <xsl:call-template name="formatMeetingDate">
198
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
199
+ </xsl:call-template>
200
+ <xsl:text>/</xsl:text>
201
+ <xsl:call-template name="formatMeetingDate">
202
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
203
+ </xsl:call-template>
204
+ </fo:block>
205
+ </fo:table-cell>
206
+ </fo:table-row>
207
+ </fo:table-body>
208
+ </fo:table>
209
+
210
+ <fo:table width="175mm" table-layout="fixed">
211
+ <fo:table-column column-width="29mm"/>
212
+ <fo:table-column column-width="10mm"/>
213
+ <fo:table-column column-width="35mm"/>
214
+ <fo:table-column column-width="9mm"/>
215
+ <fo:table-column column-width="83mm"/>
216
+ <fo:table-column column-width="6mm"/>
217
+ <fo:table-body>
218
+ <fo:table-row>
219
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
220
+ <fo:block font-weight="bold">Study Group:</fo:block>
221
+ </fo:table-cell>
222
+ <fo:table-cell padding-top="2mm">
223
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/></fo:block>
224
+ </fo:table-cell>
225
+ <fo:table-cell padding-top="2mm">
226
+ <fo:block font-weight="bold">Working Party:</fo:block>
227
+ </fo:table-cell>
228
+ <fo:table-cell padding-top="2mm">
229
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/></fo:block>
230
+ </fo:table-cell>
231
+ <fo:table-cell padding-top="2mm">
232
+ <fo:block font-weight="bold">Intended type of document <fo:inline font-weight="normal">(R-C-TD)</fo:inline>:</fo:block>
233
+ </fo:table-cell>
234
+ <fo:table-cell padding-top="2mm">
235
+ <fo:block font-weight="normal"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:intended-type"/></fo:block>
236
+ </fo:table-cell>
237
+ </fo:table-row>
238
+ <fo:table-row>
239
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
240
+ <fo:block font-weight="bold">Source:</fo:block>
241
+ </fo:table-cell>
242
+ <fo:table-cell number-columns-spanned="4" padding-top="2mm">
243
+ <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/itu:itu-standard/itu:bibdata/itu:ext/itu:source))"/></fo:block>
244
+ </fo:table-cell>
245
+ </fo:table-row>
246
+ <fo:table-row>
247
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
248
+ <fo:block font-weight="bold">Title:</fo:block>
249
+ </fo:table-cell>
250
+ <fo:table-cell number-columns-spanned="4" padding-top="2mm">
251
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
252
+ </fo:table-cell>
253
+ </fo:table-row>
254
+ </fo:table-body>
255
+ </fo:table>
256
+
257
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
258
+ <fo:table width="175mm" table-layout="fixed" line-height="110%">
259
+ <fo:table-column column-width="29mm"/>
260
+ <fo:table-column column-width="75mm"/>
261
+ <fo:table-column column-width="71mm"/>
262
+ <fo:table-body>
263
+
264
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
265
+
266
+
267
+ <fo:table-row border-top="1.5pt solid black">
268
+ <xsl:if test="position() = last()">
269
+ <xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
270
+ </xsl:if>
271
+ <fo:table-cell padding-left="1mm" padding-top="2.5mm">
272
+ <fo:block font-weight="bold">Contact:</fo:block>
273
+ </fo:table-cell>
274
+ <fo:table-cell padding-top="3mm">
275
+ <fo:block><xsl:value-of select="itu:name/itu:completename"/></fo:block>
276
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:name"/></fo:block>
277
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:address/itu:formattedAddress"/></fo:block>
278
+ </fo:table-cell>
279
+ <fo:table-cell padding-top="3mm">
280
+ <fo:block>Tel: <xsl:value-of select="itu:phone[not(@type)]"/></fo:block>
281
+ <fo:block>Fax: <xsl:value-of select="itu:phone[@type = 'fax']"/></fo:block>
282
+ <fo:block>E-mail: <xsl:value-of select="itu:email"/></fo:block>
283
+ </fo:table-cell>
284
+ </fo:table-row>
285
+ </xsl:for-each>
286
+ </fo:table-body>
287
+ </fo:table>
288
+ </xsl:if>
289
+ <fo:block space-before="0.5mm" font-size="9pt" margin-left="1mm">Please do not change the structure of this table, just insert the necessary information.</fo:block>
290
+ <fo:block space-before="6pt">&lt;INSERT TEXT&gt;</fo:block>
291
+ </fo:block>
292
+ </fo:flow>
293
+ </fo:page-sequence>
294
+ </xsl:if>
295
+
134
296
  <!-- cover page -->
135
297
  <fo:page-sequence master-reference="cover-page">
136
298
  <fo:flow flow-name="xsl-region-body">
@@ -172,12 +334,24 @@
172
334
  </fo:table-cell>
173
335
  <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
174
336
  <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
175
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
337
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
176
338
  </fo:block>
177
339
  </fo:table-cell>
178
340
  <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
179
341
  <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
180
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
342
+ <xsl:choose>
343
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
344
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
345
+ </xsl:when>
346
+ <xsl:when test="$doctype = 'implementers-guide'">
347
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
348
+ <xsl:text> </xsl:text>
349
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
350
+ </xsl:when>
351
+ <xsl:otherwise>
352
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
353
+ </xsl:otherwise>
354
+ </xsl:choose>
181
355
  </fo:block>
182
356
  </fo:table-cell>
183
357
  </fo:table-row>
@@ -218,9 +392,20 @@
218
392
  </fo:block>
219
393
  </xsl:if>
220
394
  <fo:block font-size="14pt">
221
- <xsl:call-template name="formatDate">
222
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
223
- </xsl:call-template>
395
+ <xsl:choose>
396
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
397
+ <xsl:text>(</xsl:text>
398
+ <xsl:call-template name="formatMeetingDate">
399
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
400
+ </xsl:call-template>
401
+ <xsl:text>)</xsl:text>
402
+ </xsl:when>
403
+ <xsl:otherwise>
404
+ <xsl:call-template name="formatDate">
405
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
406
+ </xsl:call-template>
407
+ </xsl:otherwise>
408
+ </xsl:choose>
224
409
  </fo:block>
225
410
  </fo:table-cell>
226
411
  </fo:table-row>
@@ -260,6 +445,15 @@
260
445
  <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
261
446
  <xsl:attribute name="font-weight">bold</xsl:attribute>
262
447
  </xsl:if>
448
+ <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:docnumber">
449
+ <fo:block font-weight="bold">
450
+ <xsl:value-of select="$xSTR-ACRONYM"/>
451
+ </fo:block>
452
+ </xsl:if>
453
+ <xsl:if test="$doctype = 'implementers-guide'">
454
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
455
+ <xsl:text> for </xsl:text>
456
+ </xsl:if>
263
457
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
264
458
  </fo:block>
265
459
  <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
@@ -311,15 +505,37 @@
311
505
  </fo:table-cell>
312
506
  <fo:table-cell number-columns-spanned="3">
313
507
  <fo:block font-size="16pt" margin-top="3pt">
314
- <xsl:value-of select="$doctype"/>
315
- <xsl:text>  </xsl:text>
316
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
317
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
318
- <xsl:text>-</xsl:text>
508
+ <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
509
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
319
510
  </xsl:if>
320
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
321
- <xsl:text>  </xsl:text>
322
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
511
+
512
+ <xsl:choose>
513
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
514
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage">
515
+ <xsl:call-template name="capitalizeWords">
516
+ <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:status/itu:stage"/>
517
+ </xsl:call-template>
518
+ <xsl:text> </xsl:text>
519
+ </xsl:if>
520
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
521
+ <xsl:text>  </xsl:text>
522
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
523
+ </xsl:when>
524
+ <xsl:when test="$doctype = 'implementers-guide'">
525
+ </xsl:when>
526
+ <xsl:otherwise>
527
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
528
+ <xsl:text>  </xsl:text>
529
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
530
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
531
+ <xsl:text>-</xsl:text>
532
+ </xsl:if>
533
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
534
+ <xsl:text>  </xsl:text>
535
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
536
+ </xsl:otherwise>
537
+ </xsl:choose>
538
+
323
539
  <xsl:if test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
324
540
  <xsl:variable name="title-annex">
325
541
  <xsl:call-template name="getTitle">
@@ -343,7 +559,7 @@
343
559
  <fo:flow flow-name="xsl-region-body">
344
560
  <fo:block-container font-size="14pt" font-weight="bold">
345
561
  <fo:block>
346
- <xsl:value-of select="$doctype"/>
562
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
347
563
  <xsl:text> </xsl:text>
348
564
  <xsl:value-of select="$docname"/>
349
565
  </fo:block>
@@ -405,58 +621,117 @@
405
621
  <fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
406
622
  <fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
407
623
 
408
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
409
- <fo:block>
410
- <xsl:if test="@level = 1">
411
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
412
- </xsl:if>
413
- <xsl:if test="@level = 2">
414
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
415
- <!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
416
- </xsl:if>
417
- <fo:list-block provisional-label-separation="3mm">
418
- <xsl:attribute name="provisional-distance-between-starts">
419
- <xsl:choose>
420
- <xsl:when test="@section != ''">
421
- <xsl:if test="@level = 1">
422
- <xsl:choose>
423
- <xsl:when test="string-length(@section) &gt; 10">27mm</xsl:when>
424
- <xsl:when test="string-length(@section) &gt; 5">22mm</xsl:when>
425
- <!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
426
- <xsl:otherwise>12mm</xsl:otherwise>
427
- </xsl:choose>
428
- </xsl:if>
429
- <xsl:if test="@level = 2">26mm</xsl:if>
430
- </xsl:when> <!-- -->
431
- <xsl:otherwise>0mm</xsl:otherwise>
432
- </xsl:choose>
433
- </xsl:attribute>
434
- <fo:list-item>
435
- <fo:list-item-label end-indent="label-end()">
436
- <xsl:if test="@level =2">
437
- <xsl:attribute name="start-indent">12mm</xsl:attribute>
624
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
625
+ <fo:block>
626
+ <xsl:if test="@level = 1">
627
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
628
+ </xsl:if>
629
+ <xsl:if test="@level = 2">
630
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
631
+ <!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
632
+ </xsl:if>
633
+ <fo:list-block provisional-label-separation="3mm">
634
+ <xsl:attribute name="provisional-distance-between-starts">
635
+ <xsl:choose>
636
+ <xsl:when test="@section != ''">
637
+ <xsl:if test="@level = 1">
638
+ <xsl:choose>
639
+ <xsl:when test="string-length(@section) &gt; 10">27mm</xsl:when>
640
+ <xsl:when test="string-length(@section) &gt; 5">22mm</xsl:when>
641
+ <!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
642
+ <xsl:otherwise>12mm</xsl:otherwise>
643
+ </xsl:choose>
438
644
  </xsl:if>
439
- <fo:block>
440
- <xsl:if test="@section">
441
- <xsl:value-of select="@section"/>
442
- </xsl:if>
645
+ <xsl:if test="@level = 2">26mm</xsl:if>
646
+ </xsl:when> <!-- -->
647
+ <xsl:otherwise>0mm</xsl:otherwise>
648
+ </xsl:choose>
649
+ </xsl:attribute>
650
+ <fo:list-item>
651
+ <fo:list-item-label end-indent="label-end()">
652
+ <xsl:if test="@level =2">
653
+ <xsl:attribute name="start-indent">12mm</xsl:attribute>
654
+ </xsl:if>
655
+ <fo:block>
656
+ <xsl:if test="@section">
657
+ <xsl:value-of select="@section"/>
658
+ </xsl:if>
659
+ </fo:block>
660
+ </fo:list-item-label>
661
+ <fo:list-item-body start-indent="body-start()">
662
+ <fo:block text-align-last="justify">
663
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
664
+ <xsl:apply-templates select="title"/>
665
+ <fo:inline keep-together.within-line="always">
666
+ <fo:leader leader-pattern="dots"/>
667
+ <fo:page-number-citation ref-id="{@id}"/>
668
+ </fo:inline>
669
+ </fo:basic-link>
443
670
  </fo:block>
444
- </fo:list-item-label>
445
- <fo:list-item-body start-indent="body-start()">
446
- <fo:block text-align-last="justify">
447
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
448
- <xsl:apply-templates select="title"/>
449
- <fo:inline keep-together.within-line="always">
450
- <fo:leader leader-pattern="dots"/>
451
- <fo:page-number-citation ref-id="{@id}"/>
452
- </fo:inline>
453
- </fo:basic-link>
454
- </fo:block>
455
- </fo:list-item-body>
456
- </fo:list-item>
457
- </fo:list-block>
458
- </fo:block>
459
- </xsl:for-each>
671
+ </fo:list-item-body>
672
+ </fo:list-item>
673
+ </fo:list-block>
674
+ </fo:block>
675
+ </xsl:for-each>
676
+
677
+
678
+ <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
679
+ <xsl:if test="//itu:table[@id and itu:name]">
680
+ <xsl:variable name="title-list-tables">
681
+ <xsl:call-template name="getTitle">
682
+ <xsl:with-param name="name" select="'title-list-tables'"/>
683
+ </xsl:call-template>
684
+ </xsl:variable>
685
+
686
+ <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
687
+ <xsl:value-of select="$title-list-tables"/>
688
+ </fo:block>
689
+ <fo:block margin-top="6pt" text-align="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></fo:block>
690
+
691
+ <fo:block-container>
692
+ <xsl:for-each select="//itu:table[@id and itu:name]">
693
+ <fo:block text-align-last="justify" margin-top="6pt">
694
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
695
+ <xsl:apply-templates select="itu:name" mode="contents"/>
696
+ <fo:inline keep-together.within-line="always">
697
+ <fo:leader leader-pattern="dots"/>
698
+ <fo:page-number-citation ref-id="{@id}"/>
699
+ </fo:inline>
700
+ </fo:basic-link>
701
+ </fo:block>
702
+ </xsl:for-each>
703
+ </fo:block-container>
704
+ </xsl:if>
705
+
706
+ <xsl:if test="//itu:figure[@id and itu:name]">
707
+ <xsl:variable name="title-list-figures">
708
+ <xsl:call-template name="getTitle">
709
+ <xsl:with-param name="name" select="'title-list-figures'"/>
710
+ </xsl:call-template>
711
+ </xsl:variable>
712
+
713
+
714
+ <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
715
+ <xsl:value-of select="$title-list-figures"/>
716
+ </fo:block>
717
+ <fo:block margin-top="6pt" text-align="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></fo:block>
718
+
719
+ <fo:block-container>
720
+ <xsl:for-each select="//itu:figure[@id and itu:name]">
721
+ <fo:block text-align-last="justify" margin-top="6pt">
722
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
723
+ <xsl:apply-templates select="itu:name" mode="contents"/>
724
+ <fo:inline keep-together.within-line="always">
725
+ <fo:leader leader-pattern="dots"/>
726
+ <fo:page-number-citation ref-id="{@id}"/>
727
+ </fo:inline>
728
+ </fo:basic-link>
729
+ </fo:block>
730
+ </xsl:for-each>
731
+ </fo:block-container>
732
+ </xsl:if>
733
+ </xsl:if>
734
+
460
735
  </fo:block-container>
461
736
  </xsl:if>
462
737
 
@@ -477,30 +752,40 @@
477
752
 
478
753
  <fo:block-container font-size="14pt" font-weight="bold">
479
754
  <fo:block>
480
- <xsl:value-of select="$doctype"/>
755
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
481
756
  <xsl:text> </xsl:text>
482
757
  <xsl:value-of select="$docname"/>
483
758
  </fo:block>
484
759
  <fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
485
760
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
761
+
762
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']">
763
+ <fo:block margin-top="18pt" font-weight="normal" font-style="italic">
764
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']"/>
765
+ </fo:block>
766
+ </xsl:if>
767
+
486
768
  </fo:block>
769
+
770
+
771
+
487
772
  </fo:block-container>
488
773
 
489
774
 
490
775
  <!-- Clause(s) -->
491
776
  <fo:block>
492
777
  <!-- Scope -->
493
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]"/> <!-- @id = 'scope' -->
778
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']"/> <!-- @id = 'scope' -->
494
779
 
495
780
  <!-- Normative references -->
496
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]"/> <!-- @id = 'references' -->
781
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']"/> <!-- @id = 'references' -->
497
782
 
498
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]"/> <!-- @id != 'scope' -->
783
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]"/> <!-- @id != 'scope' -->
499
784
 
500
785
  <xsl:apply-templates select="/itu:itu-standard/itu:annex"/>
501
786
 
502
787
  <!-- Bibliography -->
503
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]"/> <!-- @id = 'bibliography' -->
788
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> <!-- @id = 'bibliography' -->
504
789
  </fo:block>
505
790
 
506
791
  </fo:flow>
@@ -773,7 +1058,7 @@
773
1058
 
774
1059
 
775
1060
  <xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
776
- <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center">
1061
+ <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt">
777
1062
  <xsl:apply-templates/>
778
1063
  </fo:block>
779
1064
  </xsl:template>
@@ -1209,7 +1494,17 @@
1209
1494
  </fo:table-cell>
1210
1495
  <fo:table-cell font-weight="bold" text-align="left" padding-bottom="8mm">
1211
1496
  <fo:block>
1212
- <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1497
+ <xsl:choose>
1498
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
1499
+ <xsl:value-of select="$footer-TR"/>
1500
+ </xsl:when>
1501
+ <xsl:when test="$doctype = 'implementers-guide'">
1502
+ <xsl:value-of select="$footer-IG"/>
1503
+ </xsl:when>
1504
+ <xsl:otherwise>
1505
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1506
+ </xsl:otherwise>
1507
+ </xsl:choose>
1213
1508
  </fo:block>
1214
1509
  </fo:table-cell>
1215
1510
  </fo:table-row>
@@ -1226,7 +1521,17 @@
1226
1521
  <fo:table-row>
1227
1522
  <fo:table-cell font-weight="bold" text-align="right" padding-bottom="8mm">
1228
1523
  <fo:block>
1229
- <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1524
+ <xsl:choose>
1525
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
1526
+ <xsl:value-of select="$footer-TR"/>
1527
+ </xsl:when>
1528
+ <xsl:when test="$doctype = 'implementers-guide'">
1529
+ <xsl:value-of select="$footer-IG"/>
1530
+ </xsl:when>
1531
+ <xsl:otherwise>
1532
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
1533
+ </xsl:otherwise>
1534
+ </xsl:choose>
1230
1535
  </fo:block>
1231
1536
  </fo:table-cell>
1232
1537
  <fo:table-cell text-align="right" padding-bottom="8mm" padding-right="2mm">
@@ -1258,6 +1563,33 @@
1258
1563
  </xsl:if>
1259
1564
  </xsl:template>
1260
1565
 
1566
+ <xsl:template name="formatMeetingDate">
1567
+ <xsl:param name="date"/>
1568
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
1569
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
1570
+ <xsl:variable name="day" select="substring($date, 9)"/>
1571
+
1572
+ <xsl:variable name="monthStr">
1573
+ <xsl:choose>
1574
+ <xsl:when test="$month = '01'">Jan</xsl:when>
1575
+ <xsl:when test="$month = '02'">Feb</xsl:when>
1576
+ <xsl:when test="$month = '03'">Mar</xsl:when>
1577
+ <xsl:when test="$month = '04'">Apr</xsl:when>
1578
+ <xsl:when test="$month = '05'">May</xsl:when>
1579
+ <xsl:when test="$month = '06'">Jun</xsl:when>
1580
+ <xsl:when test="$month = '07'">Jul</xsl:when>
1581
+ <xsl:when test="$month = '08'">Aug</xsl:when>
1582
+ <xsl:when test="$month = '09'">Sep</xsl:when>
1583
+ <xsl:when test="$month = '10'">Oct</xsl:when>
1584
+ <xsl:when test="$month = '11'">Nov</xsl:when>
1585
+ <xsl:when test="$month = '12'">Dec</xsl:when>
1586
+ </xsl:choose>
1587
+ </xsl:variable>
1588
+
1589
+ <xsl:value-of select="$day"/><xsl:text> </xsl:text><xsl:value-of select="$monthStr"/><xsl:text> </xsl:text><xsl:value-of select="$year"/>
1590
+
1591
+ </xsl:template>
1592
+
1261
1593
 
1262
1594
  <xsl:template name="addLetterSpacing">
1263
1595
  <xsl:param name="text"/>
@@ -1668,6 +2000,7 @@
1668
2000
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1669
2001
 
1670
2002
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2003
+
1671
2004
 
1672
2005
 
1673
2006
 
@@ -2997,6 +3330,7 @@
2997
3330
  </fo:inline>
2998
3331
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2999
3332
  <fo:inline font-weight="bold">
3333
+
3000
3334
  <xsl:apply-templates/>
3001
3335
  </fo:inline>
3002
3336
  </xsl:template><xsl:template match="*[local-name()='sup']">
@@ -3401,6 +3735,7 @@
3401
3735
  </xsl:choose>
3402
3736
  </xsl:variable>
3403
3737
  <fo:inline xsl:use-attribute-sets="link-style">
3738
+
3404
3739
  <xsl:choose>
3405
3740
  <xsl:when test="$target = ''">
3406
3741
  <xsl:apply-templates/>
@@ -3620,7 +3955,8 @@
3620
3955
  </fo:inline>
3621
3956
  </xsl:if>
3622
3957
  </xsl:template><xsl:template match="*[local-name() = 'figure']">
3623
- <fo:block-container id="{@id}">
3958
+ <fo:block-container id="{@id}">
3959
+
3624
3960
  <fo:block>
3625
3961
  <xsl:apply-templates/>
3626
3962
  </fo:block>
@@ -3671,7 +4007,7 @@
3671
4007
  <xsl:apply-templates mode="bookmarks"/>
3672
4008
  </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3673
4009
  <xsl:apply-templates select="."/>
3674
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4010
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3675
4011
  <xsl:apply-templates mode="bookmarks"/>
3676
4012
  </xsl:template><xsl:template name="addBookmarks">
3677
4013
  <xsl:param name="contents"/>
@@ -4394,7 +4730,7 @@
4394
4730
  <fo:block id="{@id}">
4395
4731
  <xsl:apply-templates/>
4396
4732
  </fo:block>
4397
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
4733
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
4398
4734
 
4399
4735
  <fo:block id="{@id}">
4400
4736
  <xsl:apply-templates/>