metanorma-itu 2.4.2 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,26 +4,38 @@
4
4
 
5
5
  <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
6
6
 
7
+ <xsl:variable name="namespace_full">https://www.metanorma.org/ns/itu</xsl:variable>
8
+
7
9
  <xsl:variable name="debug">false</xsl:variable>
8
10
 
11
+ <xsl:variable name="docidentifier_ITU" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU']"/>
12
+ <xsl:variable name="docidentifier_ITU_left_part_" select="normalize-space(substring-before($docidentifier_ITU, ' '))"/>
13
+ <xsl:variable name="docidentifier_ITU_left_part">
14
+ <xsl:value-of select="$docidentifier_ITU_left_part_"/>
15
+ <xsl:if test="$docidentifier_ITU_left_part_ = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
16
+ </xsl:variable>
17
+
9
18
  <!-- Rec. ITU-T G.650.1 (03/2018) -->
10
19
  <xsl:variable name="footerprefix" select="'Rec. '"/>
11
20
  <xsl:variable name="docname">
12
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
21
+ <xsl:value-of select="substring-before($docidentifier_ITU, ' ')"/>
13
22
  <xsl:text> </xsl:text>
14
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
23
+ <xsl:value-of select="substring-after($docidentifier_ITU, ' ')"/>
15
24
  <xsl:text> </xsl:text>
16
25
  </xsl:variable>
26
+ <xsl:variable name="date_published" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
17
27
  <xsl:variable name="docdate">
18
28
  <xsl:call-template name="formatDate">
19
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
29
+ <xsl:with-param name="date" select="$date_published"/>
20
30
  </xsl:call-template>
21
31
  </xsl:variable>
22
32
  <xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
33
+ <xsl:variable name="bureau" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:bureau"/>
23
34
 
35
+ <xsl:variable name="docnumber" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docnumber)"/>
24
36
  <xsl:variable name="xSTR-ACRONYM">
25
37
  <xsl:variable name="x" select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'abbrev']"/>
26
- <xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
38
+ <xsl:variable name="acronym" select="$docnumber"/>
27
39
  <xsl:value-of select="concat($x,'STR-', $acronym)"/>
28
40
  </xsl:variable>
29
41
 
@@ -81,7 +93,7 @@
81
93
  <xsl:variable name="date_">
82
94
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
83
95
  <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date)"/>
84
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
96
+ <xsl:value-of select="$date_published"/>
85
97
  </xsl:variable>
86
98
  <xsl:variable name="date" select="concat('(',substring($date_,1,7), ')')"/>
87
99
  <xsl:value-of select="concat($xSTR-ACRONYM, $additionalIdentifiers, ' ', $date)"/>
@@ -92,7 +104,7 @@
92
104
  <xsl:text> for </xsl:text>
93
105
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
94
106
  <xsl:text> </xsl:text>
95
- <xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on,1,7), ')')"/>
107
+ <xsl:variable name="date" select="concat('(',substring($date_published,1,7), ')')"/>
96
108
  <xsl:value-of select="$date"/>
97
109
  </xsl:when>
98
110
  <xsl:when test="$doctype = 'resolution'">
@@ -126,6 +138,38 @@
126
138
  <xsl:variable name="TDnumber" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-TemporaryDocument'])"/>
127
139
  <xsl:variable name="provisionalIdentifier" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-provisional'])"/>
128
140
 
141
+ <xsl:variable name="en_dash_separator"> – </xsl:variable>
142
+
143
+ <xsl:variable name="document_scheme" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata[itu:name = 'document-scheme']/itu:value)"/>
144
+ <xsl:variable name="layoutVersion_">
145
+ <xsl:choose>
146
+ <xsl:when test="$document_scheme = ''">2023</xsl:when>
147
+ <xsl:otherwise>default</xsl:otherwise>
148
+ </xsl:choose>
149
+ </xsl:variable>
150
+ <xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
151
+
152
+ <xsl:variable name="color_cover_title_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:color-cover-title)"/>
153
+ <xsl:variable name="color_cover_title_">
154
+ <xsl:value-of select="$color_cover_title_value"/>
155
+ <xsl:if test="$color_cover_title_value = ''">black</xsl:if>
156
+ </xsl:variable>
157
+ <xsl:variable name="color_cover_title" select="normalize-space($color_cover_title_)"/>
158
+
159
+ <xsl:variable name="cover_header_hide_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:cover-header-hide)"/>
160
+ <xsl:variable name="cover_header_hide_">
161
+ <xsl:value-of select="$cover_header_hide_value"/>
162
+ <xsl:if test="$cover_header_hide_value = ''">false</xsl:if>
163
+ </xsl:variable>
164
+ <xsl:variable name="cover_header_hide" select="normalize-space($cover_header_hide_)"/>
165
+
166
+ <xsl:variable name="color_cover_itu_logo_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:color-cover-itu-logo)"/>
167
+ <xsl:variable name="color_cover_itu_logo_">
168
+ <xsl:value-of select="$color_cover_itu_logo_value"/>
169
+ <xsl:if test="$color_cover_itu_logo_value = ''">#1DA0DB</xsl:if>
170
+ </xsl:variable>
171
+ <xsl:variable name="color_cover_itu_logo" select="normalize-space($color_cover_itu_logo_)"/>
172
+
129
173
  <xsl:template match="/">
130
174
  <xsl:call-template name="namespaceCheck"/>
131
175
  <fo:root xml:lang="{$lang}">
@@ -179,6 +223,28 @@
179
223
  <fo:region-start region-name="cover-left-region" extent="19.2mm"/>
180
224
  <fo:region-end region-name="cover-right-region" extent="19.2mm"/>
181
225
  </fo:simple-page-master>
226
+
227
+ <fo:simple-page-master master-name="cover-page_2023_" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
228
+ <fo:region-body margin-top="33.5mm" margin-bottom="31mm" margin-left="25mm" margin-right="9.3mm"/>
229
+ <fo:region-before region-name="header" extent="33.5mm" precedence="true"/>
230
+ <fo:region-after region-name="footer" extent="31mm" precedence="true"/>
231
+ <fo:region-start region-name="left-region" extent="25mm"/>
232
+ <fo:region-end region-name="right-region" extent="9.3mm"/>
233
+ </fo:simple-page-master>
234
+ <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
235
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
236
+ <fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
237
+ <fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
238
+ <fo:region-start region-name="left" extent="{$marginLeftRight2}mm"/>
239
+ <fo:region-end region-name="right" extent="{$marginLeftRight1}mm"/>
240
+ </fo:simple-page-master>
241
+ <fo:page-sequence-master master-name="cover-page_2023">
242
+ <fo:repeatable-page-master-alternatives>
243
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
244
+ <fo:conditional-page-master-reference master-reference="cover-page_2023_"/>
245
+ </fo:repeatable-page-master-alternatives>
246
+ </fo:page-sequence-master>
247
+
182
248
  <!-- contents pages -->
183
249
  <!-- odd pages Preface -->
184
250
  <fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -234,743 +300,1068 @@
234
300
  <xsl:with-param name="contents" select="$contents"/>
235
301
  </xsl:call-template>
236
302
 
237
- <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper' or $doctype = 'implementers-guide'">
238
- <fo:page-sequence master-reference="TR-first-page">
239
- <fo:flow flow-name="xsl-region-body">
240
- <fo:block>
241
- <fo:table width="175mm" table-layout="fixed" border-top="1.5pt solid black" id="__internal_layout__meeting_{generate-id()}">
242
- <fo:table-column column-width="29mm"/>
243
- <fo:table-column column-width="45mm"/>
244
- <fo:table-column column-width="28mm"/>
245
- <fo:table-column column-width="72mm"/>
246
- <fo:table-body>
247
- <fo:table-row>
248
- <fo:table-cell padding-left="1mm" padding-top="3mm">
249
- <fo:block font-weight="bold">Question(s):</fo:block>
250
- </fo:table-cell>
251
- <fo:table-cell padding-top="3mm">
252
- <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:group/itu:name"/></fo:block>
253
- </fo:table-cell>
254
- <fo:table-cell padding-top="3mm">
255
- <fo:block font-weight="bold">Meeting, date:</fo:block>
256
- </fo:table-cell>
257
- <fo:table-cell padding-top="3mm" text-align="right" padding-right="1mm">
258
- <fo:block>
259
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/>
260
- <xsl:text>, </xsl:text>
261
- <xsl:call-template name="formatMeetingDate">
262
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
263
- </xsl:call-template>
264
- <xsl:text>/</xsl:text>
265
- <xsl:call-template name="formatMeetingDate">
266
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
267
- </xsl:call-template>
268
- </fo:block>
269
- </fo:table-cell>
270
- </fo:table-row>
271
- </fo:table-body>
272
- </fo:table>
273
-
274
- <fo:table width="175mm" table-layout="fixed" id="__internal_layout__groups_{generate-id()}">
275
- <fo:table-column column-width="29mm"/>
276
- <fo:table-column column-width="10mm"/>
277
- <fo:table-column column-width="35mm"/>
278
- <fo:table-column column-width="9mm"/>
279
- <fo:table-column column-width="83mm"/>
280
- <fo:table-column column-width="6mm"/>
281
- <fo:table-body>
282
- <fo:table-row>
283
- <fo:table-cell padding-left="1mm" padding-top="2mm">
284
- <fo:block font-weight="bold">Study Group:</fo:block>
285
- </fo:table-cell>
286
- <fo:table-cell padding-top="2mm">
287
- <xsl:variable name="subgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/>
288
- <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1​')"/></fo:block>
289
- </fo:table-cell>
290
- <fo:table-cell padding-top="2mm">
291
- <fo:block font-weight="bold">Working Party:</fo:block>
292
- </fo:table-cell>
293
- <fo:table-cell padding-top="2mm">
294
- <xsl:variable name="workgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/>
295
- <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1​')"/></fo:block>
296
- </fo:table-cell>
297
- <fo:table-cell padding-top="2mm">
298
- <fo:block font-weight="bold">Intended type of document <fo:inline font-weight="normal">(R-C-TD)</fo:inline>:</fo:block>
299
- </fo:table-cell>
300
- <fo:table-cell padding-top="2mm">
301
- <fo:block font-weight="normal"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:intended-type"/></fo:block>
302
- </fo:table-cell>
303
- </fo:table-row>
304
- <fo:table-row>
305
- <fo:table-cell padding-left="1mm" padding-top="2mm">
306
- <fo:block font-weight="bold">Source:</fo:block>
307
- </fo:table-cell>
308
- <fo:table-cell number-columns-spanned="4" padding-top="2mm">
309
- <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/itu:itu-standard/itu:bibdata/itu:ext/itu:source))"/></fo:block>
310
- </fo:table-cell>
311
- </fo:table-row>
312
- <fo:table-row>
313
- <fo:table-cell padding-left="1mm" padding-top="2mm">
314
- <fo:block font-weight="bold">Title:</fo:block>
315
- </fo:table-cell>
316
- <fo:table-cell number-columns-spanned="4" padding-top="2mm">
317
- <fo:block role="H1"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
318
- </fo:table-cell>
319
- </fo:table-row>
320
- </fo:table-body>
321
- </fo:table>
322
-
323
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
324
- <fo:table width="175mm" table-layout="fixed" line-height="110%" id="__internal_layout__person_{generate-id()}">
325
- <fo:table-column column-width="29mm"/>
326
- <fo:table-column column-width="75mm"/>
327
- <fo:table-column column-width="71mm"/>
328
- <fo:table-body>
329
-
330
- <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
331
-
332
- <fo:table-row border-top="1.5pt solid black">
333
- <xsl:if test="position() = last()">
334
- <xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
335
- </xsl:if>
336
- <fo:table-cell padding-left="1mm" padding-top="2.5mm">
337
- <fo:block font-weight="bold">Contact:</fo:block>
338
- </fo:table-cell>
339
- <fo:table-cell padding-top="3mm">
340
- <fo:block><xsl:value-of select="itu:name/itu:completename"/></fo:block>
341
- <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:name"/></fo:block>
342
- <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:address/itu:formattedAddress"/></fo:block>
343
- </fo:table-cell>
344
- <fo:table-cell padding-top="3mm">
345
- <fo:block>Tel: <xsl:value-of select="itu:phone[not(@type)]"/></fo:block>
346
- <fo:block>Fax: <xsl:value-of select="itu:phone[@type = 'fax']"/></fo:block>
347
- <fo:block>E-mail: <xsl:value-of select="itu:email"/></fo:block>
348
- </fo:table-cell>
349
- </fo:table-row>
350
- </xsl:for-each>
351
- </fo:table-body>
352
- </fo:table>
353
- </xsl:if>
354
- <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>
355
- <fo:block space-before="6pt">&lt;INSERT TEXT&gt;</fo:block>
356
- </fo:block>
357
- </fo:flow>
358
- </fo:page-sequence>
359
- </xsl:if>
303
+ <xsl:variable name="annexid" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid)"/>
360
304
 
361
305
  <!-- ============================================= -->
362
- <!-- Cover page for service-publication -->
306
+ <!-- Cover page -->
363
307
  <!-- ============================================= -->
364
- <xsl:if test="$doctype = 'service-publication'">
365
- <fo:page-sequence master-reference="SP-first-page" force-page-count="no-force">
366
- <fo:flow flow-name="xsl-region-body">
367
- <fo:block font-size="10pt" font-style="italic" text-align="center">
368
- <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
369
- <xsl:attribute name="font-style">normal</xsl:attribute>
370
- </xsl:if>
371
- <fo:block>
372
- <xsl:call-template name="getLocalizedString">
373
- <xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
374
- </xsl:call-template>
375
- </fo:block>
376
- <fo:block>
377
- <xsl:call-template name="getLocalizedString">
378
- <xsl:with-param name="key">number_abbrev</xsl:with-param>
379
- </xsl:call-template>
380
- <xsl:value-of select="/*/itu:bibdata/itu:docnumber"/>
381
- <xsl:text> – </xsl:text>
382
- <xsl:value-of select="translate(normalize-space(/*/itu:bibdata/itu:date[@type='published' and @format]),' ','')"/>
383
- </fo:block>
384
- </fo:block>
385
308
 
386
- <fo:block font-size="14pt" margin-top="7mm">
387
- <fo:block font-weight="bold">
388
- <fo:inline baseline-shift="-140%" padding-right="6mm">
389
- <xsl:if test="$lang = 'ar'">
390
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
391
- <xsl:attribute name="padding-left">6mm</xsl:attribute>
309
+ <xsl:choose>
310
+ <xsl:when test="$layoutVersion = '2023'">
311
+ <!-- cover page, version 2023 -->
312
+ <fo:page-sequence master-reference="cover-page_2023" writing-mode="lr-tb" font-family="Arial" font-size="12pt">
313
+ <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage_header_{generate-id()}">
314
+ <!-- background cover image -->
315
+ <xsl:call-template name="insertBackgroundPageImage"/>
316
+ <xsl:choose>
317
+ <xsl:when test="$cover_header_hide = 'false'">
318
+ <fo:block-container margin-left="13mm">
319
+ <xsl:call-template name="setWritingMode"/>
320
+ <fo:block-container margin-left="0mm">
321
+
322
+ <fo:table width="185.5mm" table-layout="fixed" margin-top="11.5mm">
323
+ <fo:table-column column-width="proportional-column-width(1)"/>
324
+ <fo:table-column column-width="proportional-column-width(1)"/>
325
+ <fo:table-body>
326
+ <fo:table-row height="7mm" font-weight="bold">
327
+ <fo:table-cell text-align="start">
328
+ <fo:block font-size="16pt">
329
+ <xsl:if test="$lang != 'ar'">
330
+ <fo:inline color="rgb(0,156,214)">ITU</fo:inline>
331
+ </xsl:if>
332
+ <xsl:choose>
333
+ <xsl:when test="$lang = 'es'">Publicaciones</xsl:when>
334
+ <xsl:when test="$lang = 'ru'">Публикации</xsl:when>
335
+ <xsl:when test="$lang = 'zh'">出版物</xsl:when>
336
+ <xsl:when test="$lang = 'ar'">منشورات<fo:inline color="rgb(0,156,214)">ITU</fo:inline></xsl:when>
337
+ <xsl:otherwise>Publications</xsl:otherwise> <!-- default, en or fr -->
338
+ </xsl:choose>
339
+ </fo:block>
340
+ </fo:table-cell>
341
+ <fo:table-cell text-align="end" display-align="center">
342
+ <fo:block>
343
+ <xsl:call-template name="getLocalizedString">
344
+ <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
345
+ </xsl:call-template>
346
+ </fo:block>
347
+ </fo:table-cell>
348
+ </fo:table-row>
349
+ <fo:table-row>
350
+ <!-- collection/series (optional) -->
351
+ <fo:table-cell text-align="start">
352
+ <fo:block>
353
+ <xsl:variable name="collection" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:collection)"/>
354
+ <xsl:if test="$collection != ''">
355
+ <xsl:value-of select="$collection"/>
356
+ </xsl:if>
357
+ </fo:block>
358
+ </fo:table-cell>
359
+ <!-- Sector or Bureau name -->
360
+ <fo:table-cell text-align="end">
361
+ <fo:block>
362
+ <xsl:variable name="sector" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:sector)"/>
363
+ <xsl:value-of select="$sector"/>
364
+ <xsl:if test="$sector = ''">
365
+ <xsl:variable name="bureau_key">
366
+ <xsl:choose>
367
+ <xsl:when test="$bureau = 'T'">tsb</xsl:when>
368
+ <xsl:when test="$bureau = 'R'">br</xsl:when>
369
+ <xsl:when test="$bureau = 'D'">bdt</xsl:when>
370
+ </xsl:choose>
371
+ </xsl:variable>
372
+ <xsl:call-template name="getLocalizedString">
373
+ <xsl:with-param name="key"><xsl:value-of select="$bureau_key"/>_short</xsl:with-param>
374
+ </xsl:call-template>
375
+ </xsl:if>
376
+ </fo:block>
377
+ </fo:table-cell>
378
+ </fo:table-row>
379
+ </fo:table-body>
380
+ </fo:table>
381
+ </fo:block-container>
382
+ </fo:block-container>
383
+ <xsl:if test="$doctype != 'service-publication'">
384
+ <fo:block margin-top="3.4mm">
385
+ <xsl:call-template name="setWritingMode"/>
386
+ <fo:instream-foreign-object fox:alt-text="Color bar">
387
+ <xsl:call-template name="insertImageCoverColorBand"/>
388
+ </fo:instream-foreign-object>
389
+ </fo:block>
392
390
  </xsl:if>
393
- <fo:instream-foreign-object content-height="18.5mm" content-width="16.1mm" fox:alt-text="Image Logo">
394
- <xsl:copy-of select="$Image-ITU-Globe-Logo"/>
395
- </fo:instream-foreign-object>
396
- </fo:inline>
397
- <xsl:variable name="itu_name">
398
- <xsl:call-template name="getLocalizedString">
399
- <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
400
- </xsl:call-template>
401
- </xsl:variable>
402
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($itu_name))"/>
391
+ </xsl:when>
392
+ <xsl:otherwise><fo:block> </fo:block></xsl:otherwise>
393
+ </xsl:choose>
394
+ </fo:static-content>
395
+ <fo:static-content flow-name="footer" role="artifact">
396
+ <fo:block text-align="right" margin-left="13mm" margin-right="13.3mm">
397
+ <xsl:if test="$lang = 'ar'">
398
+ <xsl:attribute name="text-align">left</xsl:attribute>
399
+ </xsl:if>
400
+ <fo:instream-foreign-object content-width="20.5mm" fox:alt-text="Image Logo">
401
+ <xsl:copy-of select="$Image-ITU-Globe-Logo-Blue"/>
402
+ </fo:instream-foreign-object>
403
403
  </fo:block>
404
- </fo:block>
405
- <fo:block-container margin-left="10mm">
406
- <fo:block-container margin-left="0mm">
404
+ </fo:static-content>
405
+ <fo:flow flow-name="xsl-region-body">
406
+ <fo:block-container font-size="22pt" font-weight="bold" color="{$color_cover_title}">
407
+ <xsl:call-template name="setWritingMode"/>
407
408
 
408
- <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
409
- <xsl:call-template name="getLocalizedString">
410
- <xsl:with-param name="key">tsb</xsl:with-param>
411
- </xsl:call-template>
412
- </fo:block>
413
- <fo:block font-size="14pt" font-weight="bold">
414
- <xsl:variable name="tsb_full">
415
- <xsl:call-template name="getLocalizedString">
416
- <xsl:with-param name="key">tsb_full</xsl:with-param>
417
- <xsl:with-param name="formatted">true</xsl:with-param>
418
- </xsl:call-template>
419
- </xsl:variable>
420
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
421
- </fo:block>
422
- <fo:block-container height="20mm" display-align="center" width="90%">
423
- <fo:block font-weight="bold">
424
- <!-- complements -->
425
- <!-- To do: Example: COMPLEMENT TO ITU-T RECOMMENDATIONS F.69 (06/1994) AND F.68 (11/1988) -->
426
- <fo:inline>COMPLEMENT TO ITU-T RECOMMENDATIONS </fo:inline>
427
- <xsl:for-each select="/*/itu:bibdata/itu:relation[@type = 'complements']">
428
- <xsl:value-of select="translate(itu:bibitem/itu:docidentifier, ' ', ' ')"/>
429
- <xsl:choose>
430
- <xsl:when test="count(following-sibling::itu:relation[@type = 'complements']) = 1"> AND </xsl:when>
431
- <xsl:when test="following-sibling::itu:relation[@type = 'complements']">, </xsl:when>
432
- </xsl:choose>
433
- </xsl:for-each>
434
- </fo:block>
435
- </fo:block-container>
436
- <fo:block-container>
437
- <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
438
- <fo:block-container height="75mm" display-align="center">
439
- <xsl:variable name="title_main" select="/*/itu:bibdata/itu:title[@type='main' and @language = $lang]"/>
440
- <xsl:variable name="series_main" select="normalize-space(/*/itu:bibdata/itu:series[@type='main']/itu:title)"/>
441
- <xsl:variable name="series_secondary" select="normalize-space(/*/itu:bibdata/itu:series[@type='secondary']/itu:title)"/>
442
- <xsl:variable name="series_tertiary" select="normalize-space(/*/itu:bibdata/itu:series[@type='tertiary']/itu:title)"/>
443
- <fo:block font-weight="bold" role="H1">
409
+ <xsl:choose>
410
+
411
+ <xsl:when test="$doctype = 'service-publication'">
412
+ <fo:block margin-top="11.5mm" font-size="26pt">
413
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
414
+ </fo:block>
415
+ <fo:block margin-top="2mm">
416
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
417
+ </fo:block>
418
+ <xsl:variable name="year_published" select="substring($date_published,1,4)"/>
419
+ <xsl:if test="$year_published != ''">
420
+ <!-- Examples:
421
+ 2020 edition
422
+ Édition 2020
423
+ Edición 2020
424
+ طبعة 2020
425
+ 2020 年版
426
+ Издание 2020 года -->
427
+ <fo:block margin-top="3mm" font-size="18pt">
428
+ <xsl:variable name="editionTitle">
429
+ <xsl:call-template name="getLocalizedString">
430
+ <xsl:with-param name="key">edition</xsl:with-param>
431
+ </xsl:call-template>
432
+ </xsl:variable>
433
+ <xsl:variable name="editionTitleCapitalized">
434
+ <xsl:call-template name="capitalize">
435
+ <xsl:with-param name="str" select="$editionTitle"/>
436
+ </xsl:call-template>
437
+ </xsl:variable>
438
+ <xsl:choose>
439
+ <xsl:when test="$lang = 'en' or $lang = 'ar' or $lang = 'zh'">
440
+ <xsl:value-of select="$year_published"/>
441
+ <xsl:text> </xsl:text>
442
+ <xsl:value-of select="$editionTitle"/>
443
+ </xsl:when>
444
+ <xsl:otherwise>
445
+ <xsl:value-of select="$editionTitleCapitalized"/>
446
+ <xsl:text> </xsl:text>
447
+ <xsl:value-of select="$year_published"/>
448
+ <xsl:if test="$lang = 'ru'"> года</xsl:if>
449
+ </xsl:otherwise>
450
+ </xsl:choose>
451
+ </fo:block>
452
+ </xsl:if>
453
+ </xsl:when> <!-- $doctype = 'service-publication' -->
454
+
455
+ <xsl:otherwise>
456
+ <fo:block margin-top="11.5mm">
444
457
  <xsl:choose>
445
- <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary = ''">
446
- <fo:block font-size="16pt">
447
- <xsl:value-of select="$series_main"/>
448
- </fo:block>
449
- <fo:block font-size="14pt">
450
- <xsl:if test="not(starts-with($series_secondary, '('))">
451
- <xsl:text>(</xsl:text>
452
- </xsl:if>
453
- <xsl:value-of select="$series_secondary"/>
454
- <xsl:if test="not(starts-with($series_secondary, '('))">
455
- <xsl:text>)</xsl:text>
456
- </xsl:if>
457
- </fo:block>
458
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
459
+ <!-- Example: ITU-T Technical Paper -->
460
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
461
+ <xsl:text> </xsl:text>
462
+ <xsl:value-of select="$doctypeTitle"/>
458
463
  </xsl:when>
459
- <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary != ''">
460
- <fo:block font-size="16pt">
461
- <xsl:value-of select="$series_main"/>
462
- </fo:block>
463
- <fo:block font-size="14pt">
464
- <xsl:if test="not(starts-with($series_secondary, '('))">
465
- <xsl:text>(</xsl:text>
466
- </xsl:if>
467
- <xsl:value-of select="$series_secondary"/>
468
- <xsl:if test="not(starts-with($series_secondary, '('))">
469
- <xsl:text>)</xsl:text>
470
- </xsl:if>
471
- </fo:block>
472
- <fo:block font-size="12pt" space-before="12pt" space-after="12pt">
473
- <xsl:value-of select="$series_tertiary"/>
474
- </fo:block>
475
- <fo:block font-size="16pt">
476
- <xsl:value-of select="$title_main"/>
477
- </fo:block>
464
+ <xsl:when test="$doctype = 'implementers-guide'">
465
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
466
+ <xsl:text> </xsl:text>
467
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
468
+ <xsl:text> </xsl:text>
469
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
478
470
  </xsl:when>
479
- <xsl:when test="$series_main != '' and $series_secondary = '' and $series_tertiary = ''">
480
- <fo:block font-size="16pt">
481
- <xsl:value-of select="$title_main"/>
482
- </fo:block>
483
- <fo:block font-size="14pt">
484
- <xsl:if test="not(starts-with($series_main, '('))">
485
- <xsl:text>(</xsl:text>
486
- </xsl:if>
487
- <xsl:value-of select="$series_main"/>
488
- <xsl:if test="not(starts-with($series_main, '('))">
489
- <xsl:text>)</xsl:text>
490
- </xsl:if>
491
- </fo:block>
471
+ <xsl:when test="$doctype = 'resolution'">
472
+ <xsl:value-of select="$doctypeTitle"/>
473
+ <xsl:text> </xsl:text>
474
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
492
475
  </xsl:when>
493
476
  <xsl:otherwise>
494
- <fo:block font-size="16pt">
495
- <xsl:value-of select="$title_main"/>
496
- </fo:block>
477
+ <xsl:value-of select="$doctypeTitle"/>
478
+ <xsl:text> </xsl:text>
479
+ <xsl:value-of select="$docidentifier_ITU"/>
497
480
  </xsl:otherwise>
498
481
  </xsl:choose>
499
482
  </fo:block>
500
483
 
501
- <fo:block font-size="14pt">
502
- </fo:block>
503
- <fo:block font-size="14pt">
504
- <fo:block> </fo:block>
505
- <xsl:variable name="position-sp" select="/*/itu:bibdata/itu:title[@type='position-sp' and @language = $lang]"/>
506
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($position-sp))"/>
507
- </fo:block>
508
- </fo:block-container>
509
- <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
510
- </fo:block-container>
511
-
512
- </fo:block-container>
513
- </fo:block-container>
514
-
515
- <fo:block space-before="25mm" font-weight="bold">
516
- <xsl:variable name="placedate">
517
- <xsl:call-template name="getLocalizedString">
518
- <xsl:with-param name="key">placedate</xsl:with-param>
519
- </xsl:call-template>
520
- </xsl:variable>
521
- <xsl:variable name="year" select="substring(/*/itu:bibdata/itu:date[@type = 'published']/itu:on,1,4)"/>
522
- <xsl:if test="normalize-space($year) != ''">
523
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($placedate),'%',$year)"/>
524
- </xsl:if>
525
- </fo:block>
526
- </fo:flow>
527
- </fo:page-sequence>
528
- </xsl:if>
529
- <!-- ============================================= -->
530
- <!-- END Cover page for service-publication -->
531
- <!-- ============================================= -->
532
-
533
- <!-- ============================================= -->
534
- <!-- Cover page -->
535
- <!-- ============================================= -->
536
- <xsl:if test="$doctype != 'service-publication'">
537
- <!-- cover page -->
538
- <fo:page-sequence master-reference="cover-page" writing-mode="lr-tb">
539
- <xsl:if test="$doctype = 'resolution'">
540
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
541
- </xsl:if>
542
- <fo:flow flow-name="xsl-region-body">
543
-
544
- <fo:block-container absolute-position="fixed" top="255mm">
545
- <fo:block text-align="right" margin-right="19mm">
546
- <xsl:choose>
547
- <xsl:when test="$doctype = 'resolution'">
548
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo_resolution))}" content-height="21mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
549
- </xsl:when>
550
- <xsl:otherwise>
551
- <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" content-height="17.7mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/> -->
552
- <fo:instream-foreign-object content-width="24.1mm" fox:alt-text="Image Logo">
553
- <xsl:copy-of select="$Image-ITU-Logo"/>
554
- </fo:instream-foreign-object>
555
- </xsl:otherwise>
556
- </xsl:choose>
557
-
558
- </fo:block>
559
- </fo:block-container>
560
-
561
- <fo:block-container absolute-position="fixed" left="-7mm" top="0" font-size="0">
562
- <fo:block text-align="left">
563
- <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 Cover Page"/>
564
- </fo:block>
565
- </fo:block-container>
566
- <fo:block-container font-family="Arial">
567
- <xsl:variable name="annexid" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid)"/>
568
- <fo:table width="100%" table-layout="fixed" id="__internal_layout__coverpage_{generate-id()}"> <!-- 175.4mm-->
569
- <fo:table-column column-width="25.2mm"/>
570
- <fo:table-column column-width="44.4mm"/>
571
- <fo:table-column column-width="35.8mm"/>
572
- <fo:table-column column-width="67mm"/>
573
- <fo:table-body>
574
- <fo:table-row height="37.5mm"> <!-- 42.5mm -->
575
- <fo:table-cell>
576
- <fo:block> </fo:block>
577
- </fo:table-cell>
578
- <fo:table-cell number-columns-spanned="3">
579
- <fo:block-container>
580
- <xsl:call-template name="setWritingMode"/>
581
- <fo:block font-family="Arial" font-size="13pt" font-weight="bold" color="gray"> <!-- margin-top="16pt" letter-spacing="4pt", Helvetica for letter-spacing working -->
582
- <fo:block><xsl:value-of select="$linebreak"/></fo:block>
583
- <xsl:call-template name="addLetterSpacing">
584
- <xsl:with-param name="text" select="/itu:itu-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/>
585
- </xsl:call-template>
586
- </fo:block>
587
- </fo:block-container>
588
- </fo:table-cell>
589
- </fo:table-row>
590
- <fo:table-row>
591
- <fo:table-cell>
592
- <fo:block> </fo:block>
593
- </fo:table-cell>
594
- <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
595
- <fo:block-container>
596
- <xsl:call-template name="setWritingMode"/>
597
- <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
598
- <fo:block>
599
- <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
600
- <xsl:value-of select="$docidentifier_left_part"/>
601
- <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
602
- </fo:block>
603
- </fo:block>
604
- </fo:block-container>
605
- </fo:table-cell>
606
- <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
607
- <fo:block-container>
608
- <xsl:call-template name="setWritingMode"/>
609
- <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
610
- <xsl:choose>
611
- <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
612
- <xsl:value-of select="$doctypeTitle"/>
613
- </xsl:when>
614
- <xsl:when test="$doctype = 'implementers-guide'">
615
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
616
- <xsl:text> </xsl:text>
617
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
618
- </xsl:when>
619
- <xsl:when test="$doctype = 'resolution'"/>
620
- <xsl:when test="$doctype = 'recommendation-supplement'">
621
- <!-- Series L -->
622
- <xsl:variable name="title-series">
623
- <xsl:call-template name="getLocalizedString">
624
- <xsl:with-param name="key">series</xsl:with-param>
625
- </xsl:call-template>
626
- </xsl:variable>
627
- <xsl:call-template name="capitalize">
628
- <xsl:with-param name="str" select="$title-series"/>
629
- </xsl:call-template>
630
- <xsl:text> </xsl:text>
631
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
632
- <!-- Ex. Supplement 37 -->
633
- <fo:block font-size="18pt">
484
+ <fo:block-container font-size="14pt" margin-top="1mm" margin-right="2mm">
485
+ <xsl:if test="$bureau = 'T'">
486
+ <xsl:attribute name="text-align">end</xsl:attribute>
487
+ </xsl:if>
488
+ <fo:block-container margin-right="0mm">
489
+
490
+ <xsl:variable name="additional_block">
491
+ <!-- Examples:
492
+ Amendment 1
493
+ Supplement 37 -->
494
+ <xsl:if test="$TDnumber != ''">
495
+ <fo:block-container>
496
+ <xsl:call-template name="setWritingMode"/>
497
+ <fo:block>TD number: <xsl:value-of select="$TDnumber"/></fo:block>
498
+ </fo:block-container>
499
+ </xsl:if>
500
+ <xsl:if test="$provisionalIdentifier != ''">
501
+ <fo:block-container>
502
+ <xsl:call-template name="setWritingMode"/>
503
+ <fo:block>Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/>
504
+ </fo:block>
505
+ </fo:block-container>
506
+ </xsl:if>
507
+ <xsl:if test="$annexid != ''">
508
+ <fo:block-container>
509
+ <xsl:call-template name="setWritingMode"/>
510
+ <fo:block>
634
511
  <xsl:call-template name="getLocalizedString">
635
- <xsl:with-param name="key">doctype_dict.recommendation-supplement</xsl:with-param>
512
+ <xsl:with-param name="key">annex</xsl:with-param>
636
513
  </xsl:call-template>
637
514
  <xsl:text> </xsl:text>
638
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
515
+ <xsl:value-of select="$annexid"/>
639
516
  </fo:block>
517
+ </fo:block-container>
518
+ </xsl:if>
519
+ <xsl:if test="$isAmendment != ''">
520
+ <fo:block-container>
521
+ <xsl:call-template name="setWritingMode"/>
522
+ <fo:block><xsl:value-of select="$isAmendment"/></fo:block>
523
+ </fo:block-container>
524
+ </xsl:if>
525
+ <xsl:if test="$isCorrigendum != ''">
526
+ <fo:block-container>
527
+ <xsl:call-template name="setWritingMode"/>
528
+ <fo:block><xsl:value-of select="$isCorrigendum"/></fo:block>
529
+ </fo:block-container>
530
+ </xsl:if>
531
+
532
+ <!-- Date, example: (11/2018) -->
533
+ <xsl:choose>
534
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
535
+ <xsl:call-template name="formatMeetingDate">
536
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
537
+ <xsl:with-param name="inParenthesis">true</xsl:with-param>
538
+ </xsl:call-template>
640
539
  </xsl:when>
641
540
  <xsl:otherwise>
642
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
541
+ <xsl:call-template name="formatDate">
542
+ <xsl:with-param name="date" select="$date_published"/>
543
+ </xsl:call-template>
643
544
  </xsl:otherwise>
644
545
  </xsl:choose>
546
+ </xsl:variable>
547
+ <fo:block>
548
+ <xsl:copy-of select="$additional_block"/>
549
+ <xsl:if test="normalize-space($additional_block) = ''"> </xsl:if>
645
550
  </fo:block>
646
551
  </fo:block-container>
647
- </fo:table-cell>
648
- </fo:table-row>
649
- <xsl:variable name="additionalNumbers">
650
- <xsl:if test="$TDnumber != ''">
651
- <fo:block-container space-after="2pt">
652
- <xsl:call-template name="setWritingMode"/>
653
- <fo:block font-size="14pt">TD number: <xsl:value-of select="$TDnumber"/></fo:block>
654
- </fo:block-container>
655
- </xsl:if>
656
- <xsl:if test="$provisionalIdentifier != ''">
657
- <fo:block-container space-after="2pt">
658
- <xsl:call-template name="setWritingMode"/>
659
- <fo:block font-size="14pt">Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/></fo:block>
660
- </fo:block-container>
552
+ </fo:block-container> <!-- end of additional block -->
553
+
554
+ <xsl:if test="$doctype = 'resolution'">
555
+ <fo:block margin-bottom="6pt">
556
+ <xsl:call-template name="insertMeetingInfo"/>
557
+ </fo:block>
661
558
  </xsl:if>
662
- <xsl:if test="$annexid != ''">
663
- <fo:block-container>
664
- <xsl:call-template name="setWritingMode"/>
665
- <fo:block font-size="18pt" font-weight="bold">
666
- <xsl:call-template name="getLocalizedString">
667
- <xsl:with-param name="key">annex</xsl:with-param>
668
- </xsl:call-template>
669
- <xsl:text> </xsl:text>
670
- <xsl:value-of select="$annexid"/>
671
- </fo:block>
559
+
560
+ <!-- Series: -->
561
+ <xsl:variable name="series">
562
+ <xsl:call-template name="insertSeriesTitleMain"/>
563
+ <xsl:choose>
564
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
565
+ <xsl:otherwise>
566
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
567
+ <fo:block font-weight="normal" margin-top="4mm">
568
+ <xsl:call-template name="insertSeriesTitleAdditional"/>
569
+ </fo:block>
570
+ </xsl:if>
571
+ </xsl:otherwise>
572
+ </xsl:choose>
573
+ </xsl:variable>
574
+
575
+ <xsl:if test="normalize-space($series) != ''">
576
+ <fo:block-container margin-right="5mm">
577
+ <fo:block-container margin-right="0mm">
578
+ <fo:block font-size="18pt" margin-top="5mm">
579
+ <xsl:copy-of select="$series"/>
580
+ </fo:block>
581
+ <fo:block>
582
+ <fo:leader leader-pattern="rule" rule-thickness="1pt" leader-length="100%"/>
583
+ </fo:block>
584
+ </fo:block-container>
672
585
  </fo:block-container>
673
586
  </xsl:if>
587
+
588
+ <fo:block role="H1">
589
+ <!-- margin-top="24mm" -->
590
+ <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and $docnumber != ''">
591
+ <xsl:attribute name="margin-top">3mm</xsl:attribute>
592
+ <xsl:value-of select="$docnumber"/>
593
+ </xsl:if>
594
+ </fo:block>
595
+
596
+ <fo:block margin-top="3pt">
597
+ <xsl:if test="$doctype = 'implementers-guide'">
598
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
599
+ <xsl:text> for </xsl:text>
600
+ </xsl:if>
601
+ <xsl:if test="$doctype = 'resolution'">
602
+ <!-- Resolution 1 -->
603
+ <xsl:value-of select="$doctypeTitle"/>
604
+ <xsl:text> </xsl:text>
605
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
606
+ <xsl:value-of select="$en_dash_separator"/>
607
+ </xsl:if>
608
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
609
+ </fo:block>
610
+
611
+ <!-- Example: Annex F1 - ... -->
612
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = $lang]">
613
+ <fo:block font-size="18pt" margin-top="3mm" role="H1">
614
+ <xsl:call-template name="getLocalizedString">
615
+ <xsl:with-param name="key">annex</xsl:with-param>
616
+ </xsl:call-template>
617
+ <xsl:text> </xsl:text>
618
+ <xsl:value-of select="$annexid"/>
619
+ <xsl:value-of select="$en_dash_separator"/>
620
+ <xsl:value-of select="."/>
621
+ </fo:block>
622
+ </xsl:for-each>
623
+
624
+ <!-- Example: Amendment 1 - ... -->
674
625
  <xsl:if test="$isAmendment != ''">
675
- <fo:block-container>
676
- <xsl:call-template name="setWritingMode"/>
677
- <fo:block font-size="18pt" font-weight="bold">
678
- <xsl:value-of select="$isAmendment"/>
679
- </fo:block>
680
- </fo:block-container>
626
+ <fo:block margin-top="3mm" role="H1">
627
+ <xsl:value-of select="$isAmendment"/>
628
+ <xsl:variable name="title_amendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment'])"/>
629
+ <xsl:if test="$title_amendment != ''">
630
+ <xsl:value-of select="$en_dash_separator"/>
631
+ <xsl:value-of select="$title_amendment"/>
632
+ </xsl:if>
633
+ </fo:block>
681
634
  </xsl:if>
635
+ <!-- Example: Corrigendum 1 - ... -->
682
636
  <xsl:if test="$isCorrigendum != ''">
683
- <fo:block-container>
684
- <xsl:call-template name="setWritingMode"/>
685
- <fo:block font-size="18pt" font-weight="bold">
686
- <xsl:value-of select="$isCorrigendum"/>
687
- </fo:block>
688
- </fo:block-container>
637
+ <fo:block margin-top="3mm" role="H1">
638
+ <xsl:value-of select="$isCorrigendum"/>
639
+ <xsl:variable name="title_corrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum'])"/>
640
+ <xsl:if test="$title_corrigendum != ''">
641
+ <xsl:value-of select="$en_dash_separator"/>
642
+ <xsl:value-of select="$title_corrigendum"/>
643
+ </xsl:if>
644
+ </fo:block>
689
645
  </xsl:if>
690
- </xsl:variable>
691
- <fo:table-row height="17.2mm">
692
- <fo:table-cell>
693
- <fo:block> </fo:block>
694
- </fo:table-cell>
695
- <fo:table-cell font-size="10pt" number-columns-spanned="2" padding-top="1mm">
696
- <fo:block-container>
697
- <xsl:call-template name="setWritingMode"/>
698
- <fo:block>
699
- <xsl:text>TELECOMMUNICATION</xsl:text>
700
- </fo:block>
701
- <fo:block>
702
- <xsl:text>STANDARDIZATION SECTOR</xsl:text>
703
- </fo:block>
704
- <fo:block>
705
- <xsl:text>OF ITU</xsl:text>
706
- </fo:block>
646
+
647
+ <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
648
+ <fo:block-container margin-left="1mm" margin-right="1mm" border="0.7mm solid black" margin-top="5mm">
649
+ <fo:block-container margin-left="1mm" margin-right="1mm">
650
+ <fo:block padding-top="3mm">
651
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
652
+ </fo:block>
653
+ </fo:block-container>
707
654
  </fo:block-container>
708
- </fo:table-cell>
709
- <fo:table-cell text-align="right">
710
- <xsl:copy-of select="$additionalNumbers"/>
711
- <fo:block font-size="14pt">
712
- <xsl:choose>
713
- <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
714
- <xsl:text>(</xsl:text>
715
- <xsl:call-template name="formatMeetingDate">
716
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
717
- </xsl:call-template>
718
- <xsl:text>)</xsl:text>
719
- </xsl:when>
720
- <xsl:otherwise>
721
- <xsl:call-template name="formatDate">
722
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
723
- </xsl:call-template>
724
- </xsl:otherwise>
725
- </xsl:choose>
655
+ </xsl:if>
656
+
657
+ <xsl:if test="$doctype = 'recommendation-supplement'">
658
+ <fo:block font-size="16pt" margin-top="3mm">
659
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
660
+ <xsl:text>ITU-</xsl:text>
661
+ <xsl:value-of select="$bureau"/>
662
+ <xsl:text> </xsl:text>
663
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
726
664
  </fo:block>
727
- </fo:table-cell>
728
- </fo:table-row>
729
- <xsl:variable name="countAdditionalNumbers" select="count(xalan:nodeset($additionalNumbers)/*)"/>
730
- <fo:table-row height="64mm"> <!-- 59mm -->
731
- <xsl:if test="$countAdditionalNumbers != 0">
732
- <xsl:attribute name="height"><xsl:value-of select="64 - $countAdditionalNumbers * 5"/>mm</xsl:attribute>
733
665
  </xsl:if>
734
- <fo:table-cell>
735
- <fo:block> </fo:block>
736
- </fo:table-cell>
737
- <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" display-align="after">
738
- <fo:block-container>
739
- <xsl:call-template name="setWritingMode"/>
740
- <fo:block padding-bottom="7mm">
741
- <xsl:if test="$doctype = 'resolution'">
742
- <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/></fo:block>
743
- <fo:block>
744
- <xsl:variable name="meeting-place" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-place"/>
745
- <xsl:variable name="meeting-date_from" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
746
- <xsl:variable name="meeting-date_from_year" select="substring($meeting-date_from, 1, 4)"/>
747
- <xsl:variable name="meeting-date_to" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
748
- <xsl:variable name="meeting-date_to_year" select="substring($meeting-date_to, 1, 4)"/>
666
+ </xsl:otherwise>
749
667
 
750
- <xsl:variable name="date_format">
751
- <xsl:choose>
752
- <xsl:when test="$meeting-date_from_year = $meeting-date_to_year">ddMM</xsl:when>
753
- <xsl:otherwise>ddMMyyyy</xsl:otherwise>
754
- </xsl:choose>
755
- </xsl:variable>
756
- <xsl:variable name="meeting-date_from_str">
757
- <xsl:call-template name="convertDate">
758
- <xsl:with-param name="date" select="$meeting-date_from"/>
759
- <xsl:with-param name="format" select="$date_format"/>
760
- </xsl:call-template>
761
- </xsl:variable>
668
+ </xsl:choose>
762
669
 
763
- <xsl:variable name="meeting-date_to_str">
764
- <xsl:call-template name="convertDate">
765
- <xsl:with-param name="date" select="$meeting-date_to"/>
766
- <xsl:with-param name="format" select="'ddMMyyyy'"/>
767
- </xsl:call-template>
768
- </xsl:variable>
670
+ </fo:block-container>
671
+ </fo:flow>
672
+ </fo:page-sequence>
673
+ <!-- Second cover page -->
674
+ <xsl:variable name="secondCoverPageData_">
675
+ <xsl:call-template name="insertBackgroundPageImage">
676
+ <xsl:with-param name="number">2</xsl:with-param>
677
+ </xsl:call-template>
678
+ </xsl:variable>
679
+ <xsl:variable name="secondCoverPageData" select="xalan:nodeset($secondCoverPageData_)"/>
680
+ <xsl:if test="$secondCoverPageData//*[self::fo:instream-foreign-object or self::fo:external-graphic]">
681
+ <fo:page-sequence master-reference="cover-page_2023">
682
+ <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage2_header_{generate-id()}">
683
+ <xsl:copy-of select="$secondCoverPageData"/>
684
+ </fo:static-content>
685
+ <fo:flow flow-name="xsl-region-body">
686
+ <fo:block> </fo:block>
687
+ </fo:flow>
688
+ </fo:page-sequence>
689
+ </xsl:if> <!-- End: Second cover page -->
690
+ </xsl:when> <!-- $layoutVersion = '2023' -->
769
691
 
770
- <xsl:value-of select="$meeting-place"/>
771
- <xsl:if test="$meeting-place != '' and (normalize-space($meeting-date_from_str) != '' or normalize-space($meeting-date_to_str != ''))">
692
+ <xsl:otherwise>
693
+
694
+ <xsl:choose>
695
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper' or $doctype = 'implementers-guide'">
696
+ <fo:page-sequence master-reference="TR-first-page">
697
+ <fo:flow flow-name="xsl-region-body">
698
+ <fo:block>
699
+ <fo:table width="175mm" table-layout="fixed" border-top="1.5pt solid black" id="__internal_layout__meeting_{generate-id()}">
700
+ <fo:table-column column-width="29mm"/>
701
+ <fo:table-column column-width="45mm"/>
702
+ <fo:table-column column-width="28mm"/>
703
+ <fo:table-column column-width="72mm"/>
704
+ <fo:table-body>
705
+ <fo:table-row>
706
+ <fo:table-cell padding-left="1mm" padding-top="3mm">
707
+ <fo:block font-weight="bold">Question(s):</fo:block>
708
+ </fo:table-cell>
709
+ <fo:table-cell padding-top="3mm">
710
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:group/itu:name"/></fo:block>
711
+ </fo:table-cell>
712
+ <fo:table-cell padding-top="3mm">
713
+ <fo:block font-weight="bold">Meeting, date:</fo:block>
714
+ </fo:table-cell>
715
+ <fo:table-cell padding-top="3mm" text-align="right" padding-right="1mm">
716
+ <fo:block>
717
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/>
772
718
  <xsl:text>, </xsl:text>
773
- <xsl:value-of select="$meeting-date_from_str"/>
774
- <xsl:if test="normalize-space($meeting-date_from_str) != '' and normalize-space($meeting-date_to_str) != ''">
775
- <xsl:text> – </xsl:text>
719
+ <xsl:call-template name="formatMeetingDate">
720
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
721
+ </xsl:call-template>
722
+ <xsl:text>/</xsl:text>
723
+ <xsl:call-template name="formatMeetingDate">
724
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
725
+ </xsl:call-template>
726
+ </fo:block>
727
+ </fo:table-cell>
728
+ </fo:table-row>
729
+ </fo:table-body>
730
+ </fo:table>
731
+
732
+ <fo:table width="175mm" table-layout="fixed" id="__internal_layout__groups_{generate-id()}">
733
+ <fo:table-column column-width="29mm"/>
734
+ <fo:table-column column-width="10mm"/>
735
+ <fo:table-column column-width="35mm"/>
736
+ <fo:table-column column-width="9mm"/>
737
+ <fo:table-column column-width="83mm"/>
738
+ <fo:table-column column-width="6mm"/>
739
+ <fo:table-body>
740
+ <fo:table-row>
741
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
742
+ <fo:block font-weight="bold">Study Group:</fo:block>
743
+ </fo:table-cell>
744
+ <fo:table-cell padding-top="2mm">
745
+ <xsl:variable name="subgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/>
746
+ <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1​')"/></fo:block>
747
+ </fo:table-cell>
748
+ <fo:table-cell padding-top="2mm">
749
+ <fo:block font-weight="bold">Working Party:</fo:block>
750
+ </fo:table-cell>
751
+ <fo:table-cell padding-top="2mm">
752
+ <xsl:variable name="workgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/>
753
+ <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1​')"/></fo:block>
754
+ </fo:table-cell>
755
+ <fo:table-cell padding-top="2mm">
756
+ <fo:block font-weight="bold">Intended type of document <fo:inline font-weight="normal">(R-C-TD)</fo:inline>:</fo:block>
757
+ </fo:table-cell>
758
+ <fo:table-cell padding-top="2mm">
759
+ <fo:block font-weight="normal"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:intended-type"/></fo:block>
760
+ </fo:table-cell>
761
+ </fo:table-row>
762
+ <fo:table-row>
763
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
764
+ <fo:block font-weight="bold">Source:</fo:block>
765
+ </fo:table-cell>
766
+ <fo:table-cell number-columns-spanned="4" padding-top="2mm">
767
+ <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/itu:itu-standard/itu:bibdata/itu:ext/itu:source))"/></fo:block>
768
+ </fo:table-cell>
769
+ </fo:table-row>
770
+ <fo:table-row>
771
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
772
+ <fo:block font-weight="bold">Title:</fo:block>
773
+ </fo:table-cell>
774
+ <fo:table-cell number-columns-spanned="4" padding-top="2mm">
775
+ <fo:block role="H1"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
776
+ </fo:table-cell>
777
+ </fo:table-row>
778
+ </fo:table-body>
779
+ </fo:table>
780
+
781
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
782
+ <fo:table width="175mm" table-layout="fixed" line-height="110%" id="__internal_layout__person_{generate-id()}">
783
+ <fo:table-column column-width="29mm"/>
784
+ <fo:table-column column-width="75mm"/>
785
+ <fo:table-column column-width="71mm"/>
786
+ <fo:table-body>
787
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
788
+ <fo:table-row border-top="1.5pt solid black">
789
+ <xsl:if test="position() = last()">
790
+ <xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
776
791
  </xsl:if>
777
- <xsl:value-of select="$meeting-date_to_str"/>
778
- </xsl:if>
792
+ <fo:table-cell padding-left="1mm" padding-top="2.5mm">
793
+ <fo:block font-weight="bold">Contact:</fo:block>
794
+ </fo:table-cell>
795
+ <fo:table-cell padding-top="3mm">
796
+ <fo:block><xsl:value-of select="itu:name/itu:completename"/></fo:block>
797
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:name"/></fo:block>
798
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:address/itu:formattedAddress"/></fo:block>
799
+ </fo:table-cell>
800
+ <fo:table-cell padding-top="3mm">
801
+ <fo:block>Tel: <xsl:value-of select="itu:phone[not(@type)]"/></fo:block>
802
+ <fo:block>Fax: <xsl:value-of select="itu:phone[@type = 'fax']"/></fo:block>
803
+ <fo:block>E-mail: <xsl:value-of select="itu:email"/></fo:block>
804
+ </fo:table-cell>
805
+ </fo:table-row>
806
+ </xsl:for-each>
807
+ </fo:table-body>
808
+ </fo:table>
809
+ </xsl:if>
810
+ <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>
811
+ <fo:block space-before="6pt">&lt;INSERT TEXT&gt;</fo:block>
812
+ </fo:block>
813
+ </fo:flow>
814
+ </fo:page-sequence>
815
+ </xsl:when>
816
+ <!-- ============================================= -->
817
+ <!-- Cover page for service-publication -->
818
+ <!-- ============================================= -->
819
+ <xsl:when test="$doctype = 'service-publication'">
820
+ <fo:page-sequence master-reference="SP-first-page" force-page-count="no-force">
821
+ <fo:flow flow-name="xsl-region-body">
822
+ <fo:block font-size="10pt" font-style="italic" text-align="center">
823
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
824
+ <xsl:attribute name="font-style">normal</xsl:attribute>
825
+ </xsl:if>
826
+ <fo:block>
827
+ <xsl:call-template name="getLocalizedString">
828
+ <xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
829
+ </xsl:call-template>
830
+ </fo:block>
831
+ <fo:block>
832
+ <xsl:call-template name="getLocalizedString">
833
+ <xsl:with-param name="key">number_abbrev</xsl:with-param>
834
+ </xsl:call-template>
835
+ <xsl:value-of select="/*/itu:bibdata/itu:docnumber"/>
836
+ <xsl:text> – </xsl:text>
837
+ <xsl:value-of select="translate(normalize-space(/*/itu:bibdata/itu:date[@type='published' and @format]),' ','')"/>
838
+ </fo:block>
839
+ </fo:block>
840
+
841
+ <fo:block font-size="14pt" margin-top="7mm">
842
+ <fo:block font-weight="bold">
843
+ <fo:inline baseline-shift="-140%" padding-right="6mm">
844
+ <xsl:if test="$lang = 'ar'">
845
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
846
+ <xsl:attribute name="padding-left">6mm</xsl:attribute>
847
+ </xsl:if>
848
+ <fo:instream-foreign-object content-height="18.5mm" content-width="16.1mm" fox:alt-text="Image Logo">
849
+ <xsl:copy-of select="$Image-ITU-Globe-Logo"/>
850
+ </fo:instream-foreign-object>
851
+ </fo:inline>
852
+ <xsl:variable name="itu_name">
853
+ <xsl:call-template name="getLocalizedString">
854
+ <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
855
+ </xsl:call-template>
856
+ </xsl:variable>
857
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($itu_name))"/>
858
+ </fo:block>
859
+ </fo:block>
860
+ <fo:block-container margin-left="10mm">
861
+ <fo:block-container margin-left="0mm">
862
+
863
+ <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
864
+ <xsl:call-template name="getLocalizedString">
865
+ <xsl:with-param name="key">tsb</xsl:with-param>
866
+ </xsl:call-template>
867
+ </fo:block>
868
+ <fo:block font-size="14pt" font-weight="bold">
869
+ <xsl:variable name="tsb_full">
870
+ <xsl:call-template name="getLocalizedString">
871
+ <xsl:with-param name="key">tsb_full</xsl:with-param>
872
+ <xsl:with-param name="formatted">true</xsl:with-param>
873
+ </xsl:call-template>
874
+ </xsl:variable>
875
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
876
+ </fo:block>
877
+ <fo:block-container height="20mm" display-align="center" width="90%">
878
+ <fo:block font-weight="bold">
879
+ <!-- complements -->
880
+ <!-- To do: Example: COMPLEMENT TO ITU-T RECOMMENDATIONS F.69 (06/1994) AND F.68 (11/1988) -->
881
+ <fo:inline>COMPLEMENT TO ITU-T RECOMMENDATIONS </fo:inline>
882
+ <xsl:for-each select="/*/itu:bibdata/itu:relation[@type = 'complements']">
883
+ <xsl:value-of select="translate(itu:bibitem/itu:docidentifier, ' ', ' ')"/>
884
+ <xsl:choose>
885
+ <xsl:when test="count(following-sibling::itu:relation[@type = 'complements']) = 1"> AND </xsl:when>
886
+ <xsl:when test="following-sibling::itu:relation[@type = 'complements']">, </xsl:when>
887
+ </xsl:choose>
888
+ </xsl:for-each>
889
+ </fo:block>
890
+ </fo:block-container>
891
+ <fo:block-container>
892
+ <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
893
+ <fo:block-container height="75mm" display-align="center">
894
+ <xsl:variable name="title_main" select="/*/itu:bibdata/itu:title[@type='main' and @language = $lang]"/>
895
+ <xsl:variable name="series_main" select="normalize-space(/*/itu:bibdata/itu:series[@type='main']/itu:title)"/>
896
+ <xsl:variable name="series_secondary" select="normalize-space(/*/itu:bibdata/itu:series[@type='secondary']/itu:title)"/>
897
+ <xsl:variable name="series_tertiary" select="normalize-space(/*/itu:bibdata/itu:series[@type='tertiary']/itu:title)"/>
898
+ <fo:block font-weight="bold" role="H1">
899
+ <xsl:choose>
900
+ <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary = ''">
901
+ <fo:block font-size="16pt">
902
+ <xsl:value-of select="$series_main"/>
903
+ </fo:block>
904
+ <fo:block font-size="14pt">
905
+ <xsl:if test="not(starts-with($series_secondary, '('))">
906
+ <xsl:text>(</xsl:text>
907
+ </xsl:if>
908
+ <xsl:value-of select="$series_secondary"/>
909
+ <xsl:if test="not(starts-with($series_secondary, '('))">
910
+ <xsl:text>)</xsl:text>
911
+ </xsl:if>
912
+ </fo:block>
913
+ </xsl:when>
914
+ <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary != ''">
915
+ <fo:block font-size="16pt">
916
+ <xsl:value-of select="$series_main"/>
917
+ </fo:block>
918
+ <fo:block font-size="14pt">
919
+ <xsl:if test="not(starts-with($series_secondary, '('))">
920
+ <xsl:text>(</xsl:text>
921
+ </xsl:if>
922
+ <xsl:value-of select="$series_secondary"/>
923
+ <xsl:if test="not(starts-with($series_secondary, '('))">
924
+ <xsl:text>)</xsl:text>
925
+ </xsl:if>
926
+ </fo:block>
927
+ <fo:block font-size="12pt" space-before="12pt" space-after="12pt">
928
+ <xsl:value-of select="$series_tertiary"/>
929
+ </fo:block>
930
+ <fo:block font-size="16pt">
931
+ <xsl:value-of select="$title_main"/>
932
+ </fo:block>
933
+ </xsl:when>
934
+ <xsl:when test="$series_main != '' and $series_secondary = '' and $series_tertiary = ''">
935
+ <fo:block font-size="16pt">
936
+ <xsl:value-of select="$title_main"/>
937
+ </fo:block>
938
+ <fo:block font-size="14pt">
939
+ <xsl:if test="not(starts-with($series_main, '('))">
940
+ <xsl:text>(</xsl:text>
941
+ </xsl:if>
942
+ <xsl:value-of select="$series_main"/>
943
+ <xsl:if test="not(starts-with($series_main, '('))">
944
+ <xsl:text>)</xsl:text>
945
+ </xsl:if>
946
+ </fo:block>
947
+ </xsl:when>
948
+ <xsl:otherwise>
949
+ <fo:block font-size="16pt">
950
+ <xsl:value-of select="$title_main"/>
951
+ </fo:block>
952
+ </xsl:otherwise>
953
+ </xsl:choose>
954
+ </fo:block>
955
+
956
+ <fo:block font-size="14pt">
957
+ </fo:block>
958
+ <fo:block font-size="14pt">
959
+ <fo:block> </fo:block>
960
+ <xsl:variable name="position-sp" select="/*/itu:bibdata/itu:title[@type='position-sp' and @language = $lang]"/>
961
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($position-sp))"/>
962
+ </fo:block>
963
+ </fo:block-container>
964
+ <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
965
+ </fo:block-container>
966
+
967
+ </fo:block-container>
968
+ </fo:block-container>
969
+
970
+ <fo:block space-before="25mm" font-weight="bold">
971
+ <xsl:variable name="placedate">
972
+ <xsl:call-template name="getLocalizedString">
973
+ <xsl:with-param name="key">placedate</xsl:with-param>
974
+ </xsl:call-template>
975
+ </xsl:variable>
976
+ <xsl:variable name="year" select="substring(/*/itu:bibdata/itu:date[@type = 'published']/itu:on,1,4)"/>
977
+ <xsl:if test="normalize-space($year) != ''">
978
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($placedate),'%',$year)"/>
979
+ </xsl:if>
980
+ </fo:block>
981
+ </fo:flow>
982
+ </fo:page-sequence>
983
+ </xsl:when>
984
+ <!-- ============================================= -->
985
+ <!-- END Cover page for service-publication -->
986
+ <!-- ============================================= -->
987
+ </xsl:choose>
988
+
989
+ <xsl:if test="$doctype != 'service-publication'">
990
+ <!-- cover page -->
991
+ <fo:page-sequence master-reference="cover-page" writing-mode="lr-tb">
992
+ <xsl:if test="$doctype = 'resolution'">
993
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
994
+ </xsl:if>
995
+ <fo:flow flow-name="xsl-region-body">
996
+
997
+ <fo:block-container absolute-position="fixed" top="255mm">
998
+ <fo:block text-align="right" margin-right="19mm">
999
+ <xsl:choose>
1000
+ <xsl:when test="$doctype = 'resolution'">
1001
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo_resolution))}" content-height="21mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
1002
+ </xsl:when>
1003
+ <xsl:otherwise>
1004
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" content-height="17.7mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/> -->
1005
+ <fo:instream-foreign-object content-width="24.1mm" fox:alt-text="Image Logo">
1006
+ <xsl:copy-of select="$Image-ITU-Logo"/>
1007
+ </fo:instream-foreign-object>
1008
+ </xsl:otherwise>
1009
+ </xsl:choose>
1010
+ </fo:block>
1011
+ </fo:block-container>
1012
+
1013
+ <fo:block-container absolute-position="fixed" left="-7mm" top="0" font-size="0">
1014
+ <fo:block text-align="left">
1015
+ <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 Cover Page"/>
1016
+ </fo:block>
1017
+ </fo:block-container>
1018
+ <fo:block-container font-family="Arial">
1019
+ <fo:table width="100%" table-layout="fixed" id="__internal_layout__coverpage_{generate-id()}"> <!-- 175.4mm-->
1020
+ <fo:table-column column-width="25.2mm"/>
1021
+ <fo:table-column column-width="44.4mm"/>
1022
+ <fo:table-column column-width="35.8mm"/>
1023
+ <fo:table-column column-width="67mm"/>
1024
+ <fo:table-body>
1025
+ <fo:table-row height="37.5mm"> <!-- 42.5mm -->
1026
+ <fo:table-cell>
1027
+ <fo:block> </fo:block>
1028
+ </fo:table-cell>
1029
+ <fo:table-cell number-columns-spanned="3">
1030
+ <fo:block-container>
1031
+ <xsl:call-template name="setWritingMode"/>
1032
+ <fo:block font-family="Arial" font-size="13pt" font-weight="bold" color="gray"> <!-- margin-top="16pt" letter-spacing="4pt", Helvetica for letter-spacing working -->
1033
+ <fo:block><xsl:value-of select="$linebreak"/></fo:block>
1034
+ <xsl:call-template name="addLetterSpacing">
1035
+ <xsl:with-param name="text" select="/itu:itu-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/>
1036
+ </xsl:call-template>
779
1037
  </fo:block>
780
- </xsl:if>
781
- <xsl:if test="$doctype = 'focus-group'">
782
- <xsl:attribute name="padding-bottom">0mm</xsl:attribute>
783
- <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
784
- </xsl:if>
785
- <fo:block text-transform="uppercase">
786
- <xsl:variable name="series_title_full" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
787
- <xsl:variable name="series_title">
788
- <xsl:value-of select="$series_title_full"/>
789
- <xsl:if test="$series_title_full = ''">
790
- <xsl:value-of select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[(@type != 'full' and @type != 'abbrev') or not(@type)])"/>
791
- </xsl:if>
792
- </xsl:variable>
793
- <xsl:if test="$series_title != ''">
794
- <xsl:variable name="title">
795
- <xsl:if test="$doctype != 'resolution'">
796
- <!-- <xsl:text>Series </xsl:text> -->
797
- <xsl:call-template name="getLocalizedString">
798
- <xsl:with-param name="key">series</xsl:with-param>
1038
+ </fo:block-container>
1039
+ </fo:table-cell>
1040
+ </fo:table-row>
1041
+ <fo:table-row border="1pt solid green">
1042
+ <fo:table-cell>
1043
+ <fo:block> </fo:block>
1044
+ </fo:table-cell>
1045
+ <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
1046
+ <fo:block-container>
1047
+ <xsl:call-template name="setWritingMode"/>
1048
+ <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
1049
+ <fo:block>
1050
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
1051
+ </fo:block>
1052
+ </fo:block>
1053
+ </fo:block-container>
1054
+ </fo:table-cell>
1055
+ <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
1056
+ <fo:block-container>
1057
+ <xsl:call-template name="setWritingMode"/>
1058
+ <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
1059
+ <xsl:choose>
1060
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
1061
+ <xsl:value-of select="$doctypeTitle"/>
1062
+ </xsl:when>
1063
+ <xsl:when test="$doctype = 'implementers-guide'">
1064
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
1065
+ <xsl:text> </xsl:text>
1066
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
1067
+ </xsl:when>
1068
+ <xsl:when test="$doctype = 'resolution'"/>
1069
+ <xsl:when test="$doctype = 'recommendation-supplement'">
1070
+ <!-- Series L -->
1071
+ <xsl:variable name="title-series">
1072
+ <xsl:call-template name="getLocalizedString">
1073
+ <xsl:with-param name="key">series</xsl:with-param>
1074
+ </xsl:call-template>
1075
+ </xsl:variable>
1076
+ <xsl:call-template name="capitalize">
1077
+ <xsl:with-param name="str" select="$title-series"/>
799
1078
  </xsl:call-template>
800
1079
  <xsl:text> </xsl:text>
801
- </xsl:if>
802
- <xsl:value-of select="$series_title"/>
803
- </xsl:variable>
804
- <xsl:value-of select="$title"/>
805
- </xsl:if>
806
- </fo:block>
807
- <xsl:choose>
808
- <xsl:when test="$doctype = 'recommendation-supplement'"/>
809
- <xsl:otherwise>
810
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
811
- <fo:block margin-top="6pt">
812
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
813
- <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
814
- <xsl:text> — </xsl:text>
815
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
816
- </xsl:if>
817
- </fo:block>
818
- </xsl:if>
819
- </xsl:otherwise>
820
- </xsl:choose>
821
- </fo:block>
822
- </fo:block-container>
823
- </fo:table-cell>
824
- </fo:table-row>
825
- <fo:table-row height="40mm">
826
- <fo:table-cell>
827
- <fo:block> </fo:block>
828
- </fo:table-cell>
829
- <fo:table-cell font-size="18pt" number-columns-spanned="3">
830
- <fo:block-container>
831
- <xsl:call-template name="setWritingMode"/>
832
- <fo:block padding-right="2mm" margin-top="6pt" role="H1">
833
- <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
834
- <xsl:attribute name="font-weight">bold</xsl:attribute>
835
- </xsl:if>
836
- <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:docnumber">
837
- <fo:block font-weight="bold">
838
- <xsl:value-of select="$xSTR-ACRONYM"/>
1080
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
1081
+ <!-- Ex. Supplement 37 -->
1082
+ <fo:block font-size="18pt">
1083
+ <xsl:call-template name="getLocalizedString">
1084
+ <xsl:with-param name="key">doctype_dict.recommendation-supplement</xsl:with-param>
1085
+ </xsl:call-template>
1086
+ <xsl:text> </xsl:text>
1087
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
1088
+ </fo:block>
1089
+ </xsl:when>
1090
+ <xsl:otherwise>
1091
+ <xsl:value-of select="substring-after($docidentifier_ITU, ' ')"/>
1092
+ </xsl:otherwise>
1093
+ </xsl:choose>
839
1094
  </fo:block>
840
- </xsl:if>
841
- <xsl:if test="$doctype = 'implementers-guide'">
842
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
843
- <xsl:text> for </xsl:text>
844
- </xsl:if>
845
- <xsl:if test="$doctype = 'resolution'">
846
- <!-- Resolution 1 -->
847
- <xsl:value-of select="$doctypeTitle"/><xsl:text> </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
848
- <xsl:text> – </xsl:text>
849
- </xsl:if>
850
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
851
- </fo:block>
852
- <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
853
- <fo:block font-weight="bold" role="H1">
854
- <xsl:value-of select="."/>
855
- </fo:block>
856
- </xsl:for-each>
1095
+ </fo:block-container>
1096
+ </fo:table-cell>
1097
+ </fo:table-row>
1098
+ <xsl:variable name="additionalNumbers">
1099
+ <xsl:if test="$TDnumber != ''">
1100
+ <fo:block-container space-after="2pt">
1101
+ <xsl:call-template name="setWritingMode"/>
1102
+ <fo:block font-size="14pt">TD number: <xsl:value-of select="$TDnumber"/></fo:block>
1103
+ </fo:block-container>
1104
+ </xsl:if>
1105
+ <xsl:if test="$provisionalIdentifier != ''">
1106
+ <fo:block-container space-after="2pt">
1107
+ <xsl:call-template name="setWritingMode"/>
1108
+ <fo:block font-size="14pt">Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/></fo:block>
1109
+ </fo:block-container>
1110
+ </xsl:if>
1111
+ <xsl:if test="$annexid != ''">
1112
+ <fo:block-container>
1113
+ <xsl:call-template name="setWritingMode"/>
1114
+ <fo:block font-size="18pt" font-weight="bold">
1115
+ <xsl:call-template name="getLocalizedString">
1116
+ <xsl:with-param name="key">annex</xsl:with-param>
1117
+ </xsl:call-template>
1118
+ <xsl:text> </xsl:text>
1119
+ <xsl:value-of select="$annexid"/>
1120
+ </fo:block>
1121
+ </fo:block-container>
1122
+ </xsl:if>
857
1123
  <xsl:if test="$isAmendment != ''">
858
- <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
859
- <xsl:value-of select="$isAmendment"/>
860
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
861
- <xsl:text>: </xsl:text>
862
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
863
- </xsl:if>
864
- </fo:block>
1124
+ <fo:block-container>
1125
+ <xsl:call-template name="setWritingMode"/>
1126
+ <fo:block font-size="18pt" font-weight="bold">
1127
+ <xsl:value-of select="$isAmendment"/>
1128
+ </fo:block>
1129
+ </fo:block-container>
865
1130
  </xsl:if>
866
1131
  <xsl:if test="$isCorrigendum != ''">
867
- <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
868
- <xsl:value-of select="$isCorrigendum"/>
869
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
870
- <xsl:text>: </xsl:text>
871
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
872
- </xsl:if>
873
- </fo:block>
1132
+ <fo:block-container>
1133
+ <xsl:call-template name="setWritingMode"/>
1134
+ <fo:block font-size="18pt" font-weight="bold">
1135
+ <xsl:value-of select="$isCorrigendum"/>
1136
+ </fo:block>
1137
+ </fo:block-container>
874
1138
  </xsl:if>
875
- </fo:block-container>
876
- </fo:table-cell>
877
- </fo:table-row>
878
- <fo:table-row height="40mm">
879
- <fo:table-cell>
880
- <fo:block> </fo:block>
881
- </fo:table-cell>
882
- <fo:table-cell number-columns-spanned="3">
883
- <fo:block-container>
884
- <xsl:call-template name="setWritingMode"/>
885
- <xsl:choose>
886
- <xsl:when test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
887
- <xsl:attribute name="border">0.7mm solid black</xsl:attribute>
888
- <fo:block padding-top="3mm" margin-left="1mm" margin-right="1mm">
889
- <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
1139
+ </xsl:variable>
1140
+ <fo:table-row height="17.2mm" border="1pt solid blue">
1141
+ <fo:table-cell>
1142
+ <fo:block> </fo:block>
1143
+ </fo:table-cell>
1144
+ <fo:table-cell font-size="10pt" number-columns-spanned="2" padding-top="1mm">
1145
+ <fo:block-container>
1146
+ <xsl:call-template name="setWritingMode"/>
1147
+ <fo:block>
1148
+ <xsl:text>TELECOMMUNICATION</xsl:text>
890
1149
  </fo:block>
891
- </xsl:when>
892
- <xsl:otherwise>
893
- <fo:block> </fo:block>
894
- </xsl:otherwise>
895
- </xsl:choose>
896
- </fo:block-container>
897
- </fo:table-cell>
898
- </fo:table-row>
899
- <fo:table-row height="25mm">
900
- <fo:table-cell>
901
- <fo:block> </fo:block>
902
- </fo:table-cell>
903
- <fo:table-cell number-columns-spanned="3">
904
- <fo:block-container>
905
- <xsl:call-template name="setWritingMode"/>
906
- <fo:block font-size="16pt" margin-top="3pt">
907
- <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
908
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
909
- <xsl:if test="$doctype = 'recommendation-supplement'">
910
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
911
- </xsl:if>
912
- </xsl:if>
913
-
914
- <xsl:choose>
915
- <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
916
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage">
917
- <xsl:call-template name="capitalizeWords">
918
- <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:status/itu:stage"/>
1150
+ <fo:block>
1151
+ <xsl:text>STANDARDIZATION SECTOR</xsl:text>
1152
+ </fo:block>
1153
+ <fo:block>
1154
+ <xsl:text>OF ITU</xsl:text>
1155
+ </fo:block>
1156
+ </fo:block-container>
1157
+ </fo:table-cell>
1158
+ <fo:table-cell text-align="right">
1159
+ <xsl:copy-of select="$additionalNumbers"/>
1160
+ <fo:block font-size="14pt">
1161
+ <xsl:choose>
1162
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
1163
+ <xsl:call-template name="formatMeetingDate">
1164
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
1165
+ <xsl:with-param name="inParenthesis">true</xsl:with-param>
919
1166
  </xsl:call-template>
920
- <xsl:text> </xsl:text>
1167
+ </xsl:when>
1168
+ <xsl:otherwise>
1169
+ <xsl:call-template name="formatDate">
1170
+ <xsl:with-param name="date" select="$date_published"/>
1171
+ </xsl:call-template>
1172
+ </xsl:otherwise>
1173
+ </xsl:choose>
1174
+ </fo:block>
1175
+ </fo:table-cell>
1176
+ </fo:table-row>
1177
+ <xsl:variable name="countAdditionalNumbers" select="count(xalan:nodeset($additionalNumbers)/*)"/>
1178
+ <fo:table-row height="64mm" border="1pt solid red"> <!-- 59mm -->
1179
+ <xsl:if test="$countAdditionalNumbers != 0">
1180
+ <xsl:attribute name="height"><xsl:value-of select="64 - $countAdditionalNumbers * 5"/>mm</xsl:attribute>
1181
+ </xsl:if>
1182
+ <fo:table-cell>
1183
+ <fo:block> </fo:block>
1184
+ </fo:table-cell>
1185
+ <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" display-align="after">
1186
+ <fo:block-container>
1187
+ <xsl:call-template name="setWritingMode"/>
1188
+ <fo:block padding-bottom="7mm">
1189
+ <xsl:if test="$doctype = 'resolution'">
1190
+ <xsl:call-template name="insertMeetingInfo"/>
921
1191
  </xsl:if>
922
- <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
923
- <xsl:if test="$identifier != ''">
924
- <xsl:value-of select="$doctypeTitle"/>
925
- <xsl:text>  </xsl:text>
926
- <xsl:value-of select="$identifier"/>
1192
+ <xsl:if test="$doctype = 'focus-group'">
1193
+ <xsl:attribute name="padding-bottom">0mm</xsl:attribute>
1194
+ <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
927
1195
  </xsl:if>
928
- </xsl:when>
929
- <xsl:when test="$doctype = 'implementers-guide'"/>
930
- <xsl:when test="$doctype = 'resolution'"/>
931
- <xsl:when test="$doctype = 'recommendation-supplement'">
932
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
933
- <xsl:text>ITU-</xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:bureau"/><xsl:text> </xsl:text>
934
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
935
- </xsl:when>
936
- <xsl:otherwise>
937
- <xsl:variable name="identifier">
938
- <xsl:text>  </xsl:text>
939
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
940
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
941
- <xsl:text>-</xsl:text>
1196
+ <fo:block text-transform="uppercase">
1197
+ <xsl:call-template name="insertSeriesTitleMain"/>
1198
+ </fo:block>
1199
+ <xsl:choose>
1200
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
1201
+ <xsl:otherwise>
1202
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
1203
+ <fo:block margin-top="6pt">
1204
+ <xsl:call-template name="insertSeriesTitleAdditional"/>
1205
+ </fo:block>
1206
+ </xsl:if>
1207
+ </xsl:otherwise>
1208
+ </xsl:choose>
1209
+ </fo:block>
1210
+ </fo:block-container>
1211
+ </fo:table-cell>
1212
+ </fo:table-row>
1213
+ <fo:table-row height="40mm" border="1pt solid green">
1214
+ <fo:table-cell>
1215
+ <fo:block> </fo:block>
1216
+ </fo:table-cell>
1217
+ <fo:table-cell font-size="18pt" number-columns-spanned="3">
1218
+ <fo:block-container>
1219
+ <xsl:call-template name="setWritingMode"/>
1220
+ <fo:block padding-right="2mm" margin-top="6pt" role="H1">
1221
+ <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
1222
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1223
+ </xsl:if>
1224
+ <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:docnumber">
1225
+ <fo:block font-weight="bold">
1226
+ <xsl:value-of select="$docnumber"/>
1227
+ </fo:block>
1228
+ </xsl:if>
1229
+ <xsl:if test="$doctype = 'implementers-guide'">
1230
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
1231
+ <xsl:text> for </xsl:text>
1232
+ </xsl:if>
1233
+ <xsl:if test="$doctype = 'resolution'">
1234
+ <!-- Resolution 1 -->
1235
+ <xsl:value-of select="$doctypeTitle"/><xsl:text> </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
1236
+ <xsl:text> – </xsl:text>
1237
+ </xsl:if>
1238
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
1239
+ </fo:block>
1240
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
1241
+ <fo:block font-weight="bold" role="H1">
1242
+ <xsl:value-of select="."/>
1243
+ </fo:block>
1244
+ </xsl:for-each>
1245
+ <xsl:if test="$isAmendment != ''">
1246
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
1247
+ <xsl:value-of select="$isAmendment"/>
1248
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
1249
+ <xsl:text>: </xsl:text>
1250
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
942
1251
  </xsl:if>
943
- <xsl:if test="$doctype != 'recommendation'">
944
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
945
- <xsl:text>  </xsl:text>
1252
+ </fo:block>
1253
+ </xsl:if>
1254
+ <xsl:if test="$isCorrigendum != ''">
1255
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
1256
+ <xsl:value-of select="$isCorrigendum"/>
1257
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
1258
+ <xsl:text>: </xsl:text>
1259
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
1260
+ </xsl:if>
1261
+ </fo:block>
1262
+ </xsl:if>
1263
+ </fo:block-container>
1264
+ </fo:table-cell>
1265
+ </fo:table-row>
1266
+ <fo:table-row height="40mm" border="1pt solid blue">
1267
+ <fo:table-cell>
1268
+ <fo:block> </fo:block>
1269
+ </fo:table-cell>
1270
+ <fo:table-cell number-columns-spanned="3">
1271
+ <fo:block-container>
1272
+ <xsl:call-template name="setWritingMode"/>
1273
+ <xsl:choose>
1274
+ <xsl:when test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
1275
+ <xsl:attribute name="border">0.7mm solid black</xsl:attribute>
1276
+ <fo:block font-family="Times New Roman" padding-top="3mm" margin-left="1mm" margin-right="1mm">
1277
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
1278
+ </fo:block>
1279
+ </xsl:when>
1280
+ <xsl:otherwise>
1281
+ <fo:block> </fo:block>
1282
+ </xsl:otherwise>
1283
+ </xsl:choose>
1284
+ </fo:block-container>
1285
+ </fo:table-cell>
1286
+ </fo:table-row>
1287
+ <fo:table-row height="25mm" border="1pt solid red">
1288
+ <fo:table-cell>
1289
+ <fo:block> </fo:block>
1290
+ </fo:table-cell>
1291
+ <fo:table-cell number-columns-spanned="3">
1292
+ <fo:block-container>
1293
+ <xsl:call-template name="setWritingMode"/>
1294
+ <fo:block font-size="16pt" margin-top="3pt">
1295
+ <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
1296
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1297
+ <xsl:if test="$doctype = 'recommendation-supplement'">
1298
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
946
1299
  </xsl:if>
947
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
948
- </xsl:variable>
949
- <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
950
- <xsl:value-of select="$doctypeTitle"/>
951
- <xsl:value-of select="$identifier"/>
952
1300
  </xsl:if>
953
- </xsl:otherwise>
954
- </xsl:choose>
955
1301
 
956
- <xsl:if test="$annexid != ''">
957
- <xsl:text> </xsl:text>
958
- <xsl:call-template name="getLocalizedString">
959
- <xsl:with-param name="key">annex</xsl:with-param>
960
- </xsl:call-template>
961
- <xsl:text> </xsl:text>
962
- <xsl:value-of select="$annexid"/>
963
- </xsl:if>
964
- </fo:block>
965
- </fo:block-container>
966
- </fo:table-cell>
967
- </fo:table-row>
968
- </fo:table-body>
969
- </fo:table>
970
- </fo:block-container>
971
- </fo:flow>
972
- </fo:page-sequence>
973
- </xsl:if>
1302
+ <xsl:choose>
1303
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
1304
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage">
1305
+ <xsl:call-template name="capitalizeWords">
1306
+ <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:status/itu:stage"/>
1307
+ </xsl:call-template>
1308
+ <xsl:text> </xsl:text>
1309
+ </xsl:if>
1310
+ <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
1311
+ <xsl:if test="$identifier != ''">
1312
+ <xsl:value-of select="$doctypeTitle"/>
1313
+ <xsl:text>  </xsl:text>
1314
+ <xsl:value-of select="$identifier"/>
1315
+ </xsl:if>
1316
+ </xsl:when>
1317
+ <xsl:when test="$doctype = 'implementers-guide'"/>
1318
+ <xsl:when test="$doctype = 'resolution'"/>
1319
+ <xsl:when test="$doctype = 'recommendation-supplement'">
1320
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
1321
+ <xsl:text>ITU-</xsl:text><xsl:value-of select="$bureau"/><xsl:text> </xsl:text>
1322
+
1323
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
1324
+ </xsl:when>
1325
+ <xsl:otherwise>
1326
+ <xsl:variable name="identifier">
1327
+ <xsl:text>  </xsl:text>
1328
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
1329
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
1330
+ <xsl:text>-</xsl:text>
1331
+ </xsl:if>
1332
+ <xsl:if test="$doctype != 'recommendation'">
1333
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
1334
+ <xsl:text>  </xsl:text>
1335
+ </xsl:if>
1336
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
1337
+ </xsl:variable>
1338
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
1339
+ <xsl:value-of select="$doctypeTitle"/>
1340
+ <xsl:value-of select="$identifier"/>
1341
+ </xsl:if>
1342
+ </xsl:otherwise>
1343
+ </xsl:choose>
1344
+
1345
+ <xsl:if test="$annexid != ''">
1346
+ <xsl:text> — </xsl:text>
1347
+ <xsl:call-template name="getLocalizedString">
1348
+ <xsl:with-param name="key">annex</xsl:with-param>
1349
+ </xsl:call-template>
1350
+ <xsl:text> </xsl:text>
1351
+ <xsl:value-of select="$annexid"/>
1352
+ </xsl:if>
1353
+ </fo:block>
1354
+ </fo:block-container>
1355
+ </fo:table-cell>
1356
+ </fo:table-row>
1357
+ </fo:table-body>
1358
+ </fo:table>
1359
+ </fo:block-container>
1360
+ </fo:flow>
1361
+ </fo:page-sequence>
1362
+ </xsl:if>
1363
+ </xsl:otherwise>
1364
+ </xsl:choose>
974
1365
  <!-- ============================================= -->
975
1366
  <!-- END Cover page -->
976
1367
  <!-- ============================================= -->
@@ -1160,6 +1551,75 @@
1160
1551
  </fo:root>
1161
1552
  </xsl:template>
1162
1553
 
1554
+ <xsl:template name="insertMeetingInfo">
1555
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/></fo:block>
1556
+ <fo:block>
1557
+ <xsl:variable name="meeting-place" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-place"/>
1558
+ <xsl:variable name="meeting-date_from" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
1559
+ <xsl:variable name="meeting-date_from_year" select="substring($meeting-date_from, 1, 4)"/>
1560
+ <xsl:variable name="meeting-date_to" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
1561
+ <xsl:variable name="meeting-date_to_year" select="substring($meeting-date_to, 1, 4)"/>
1562
+
1563
+ <xsl:variable name="date_format">
1564
+ <xsl:choose>
1565
+ <xsl:when test="$meeting-date_from_year = $meeting-date_to_year">ddMM</xsl:when>
1566
+ <xsl:otherwise>ddMMyyyy</xsl:otherwise>
1567
+ </xsl:choose>
1568
+ </xsl:variable>
1569
+ <xsl:variable name="meeting-date_from_str">
1570
+ <xsl:call-template name="convertDate">
1571
+ <xsl:with-param name="date" select="$meeting-date_from"/>
1572
+ <xsl:with-param name="format" select="$date_format"/>
1573
+ </xsl:call-template>
1574
+ </xsl:variable>
1575
+
1576
+ <xsl:variable name="meeting-date_to_str">
1577
+ <xsl:call-template name="convertDate">
1578
+ <xsl:with-param name="date" select="$meeting-date_to"/>
1579
+ <xsl:with-param name="format" select="'ddMMyyyy'"/>
1580
+ </xsl:call-template>
1581
+ </xsl:variable>
1582
+
1583
+ <xsl:value-of select="$meeting-place"/>
1584
+ <xsl:if test="$meeting-place != '' and (normalize-space($meeting-date_from_str) != '' or normalize-space($meeting-date_to_str != ''))">
1585
+ <xsl:text>, </xsl:text>
1586
+ <xsl:value-of select="$meeting-date_from_str"/>
1587
+ <xsl:if test="normalize-space($meeting-date_from_str) != '' and normalize-space($meeting-date_to_str) != ''">
1588
+ <xsl:text> – </xsl:text>
1589
+ </xsl:if>
1590
+ <xsl:value-of select="$meeting-date_to_str"/>
1591
+ </xsl:if>
1592
+ </fo:block>
1593
+ </xsl:template>
1594
+
1595
+ <xsl:template name="insertSeriesTitleMain">
1596
+ <xsl:variable name="series_title_full" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
1597
+ <xsl:variable name="series_title">
1598
+ <xsl:value-of select="$series_title_full"/>
1599
+ <xsl:if test="$series_title_full = ''">
1600
+ <xsl:value-of select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[(@type != 'full' and @type != 'abbrev') or not(@type)])"/>
1601
+ </xsl:if>
1602
+ </xsl:variable>
1603
+ <xsl:if test="$series_title != ''">
1604
+ <!-- Series -->
1605
+ <fo:inline text-transform="uppercase">
1606
+ <xsl:call-template name="getLocalizedString">
1607
+ <xsl:with-param name="key">series</xsl:with-param>
1608
+ </xsl:call-template>
1609
+ </fo:inline>
1610
+ <xsl:text> </xsl:text>
1611
+ <xsl:value-of select="$series_title"/>
1612
+ </xsl:if>
1613
+ </xsl:template>
1614
+
1615
+ <xsl:template name="insertSeriesTitleAdditional">
1616
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
1617
+ <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
1618
+ <xsl:text> — </xsl:text>
1619
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
1620
+ </xsl:if>
1621
+ </xsl:template>
1622
+
1163
1623
  <xsl:template name="insertListOf_Title">
1164
1624
  <xsl:param name="title"/>
1165
1625
  <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
@@ -1539,7 +1999,7 @@
1539
1999
  <!-- ============================= -->
1540
2000
 
1541
2001
  <xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
1542
- <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
2002
+ <fo:block font-size="16pt" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
1543
2003
  <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
1544
2004
  <xsl:attribute name="font-style">normal</xsl:attribute>
1545
2005
  </xsl:if>
@@ -1549,7 +2009,7 @@
1549
2009
  </xsl:template>
1550
2010
 
1551
2011
  <xsl:template match="itu:clause[@id='draft-warning']/itu:p" mode="caution">
1552
- <fo:block font-size="12pt" font-family="Times New Roman" text-align="justify">
2012
+ <fo:block font-size="12pt" text-align="justify">
1553
2013
  <xsl:apply-templates/>
1554
2014
  <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
1555
2015
  </fo:block>
@@ -2127,6 +2587,20 @@
2127
2587
  </svg>
2128
2588
  </xsl:variable>
2129
2589
 
2590
+ <xsl:variable name="Image-ITU-Globe-Logo-Blue">
2591
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 73.7 81.4" style="enable-background:new 0 0 73.7 81.4;" width="20.5mm" height="22.6mm" xml:space="preserve">
2592
+ <style type="text/css">
2593
+ .st0{fill:<xsl:value-of select="$color_cover_itu_logo"/>;}
2594
+ </style>
2595
+ <g>
2596
+ <path class="st0" d="M14.5,33.6 c0.2,0,0.4,0.2,0.4,0.4v23.2c0,0.2-0.2,0.4-0.4,0.4H7.6c-0.2,0-0.4-0.2-0.4-0.4V34c0-0.2,0.2-0.4,0.4-0.4H14.5"/>
2597
+ <path class="st0" d="M39.6,33.6 c0.2,0,0.4,0.2,0.4,0.4v5.7c0,0.2-0.2,0.4-0.4,0.4h-6.1c-0.2,0-0.4,0.2-0.4,0.4v16.7c0,0.2-0.2,0.4-0.4,0.4h-6.9 c-0.2,0-0.4-0.2-0.4-0.4V40.5c0-0.2-0.2-0.4-0.4-0.4h-5.9c-0.2,0-0.4-0.2-0.4-0.4V34c0-0.2,0.2-0.4,0.4-0.4H39.6"/>
2598
+ <path class="st0" d="M66.5,33.6 c0.2,0,0.4,0.2,0.4,0.4v11.8c0,7.8-4.1,12-11.9,12c-7.5,0-11.3-4.1-11.3-12.1V34c0-0.2,0.2-0.4,0.4-0.4h6.9c0.2,0,0.4,0.2,0.4,0.4 v11.6c0,2.5,0.7,5.6,3.9,5.6c2.6,0,3.9-1.8,3.9-5.6V34c0-0.2,0.2-0.4,0.4-0.4H66.5"/>
2599
+ <path class="st0" d="M73.8,81.4 c-4.6-2.3-9.8-4.9-14.6-7.7c0.8-0.6,1.6-1.3,2.4-2c7.4-6.7,12.1-16.3,12.1-27c0-7.6-2.4-14.7-6.4-20.6C60.7,14.3,49.5,7.8,36.8,7.8 c-7.2,0-13.9,2.1-19.6,5.6c-3-4.2-6-8.7-9.2-13.5c1,2,4,8.3,7.4,14.6C7.6,20.3,2,28.9,0.5,38.9C0.2,40.8,0,42.7,0,44.7 c0,5.7,1.3,11.1,3.6,15.9c5.9,12.3,18.6,20.9,33.2,20.9c7.5,0,14.5-2.3,20.3-6.1C62.7,77.6,68.3,79.5,73.8,81.4 M33.3,78.2 c-8.5-0.9-16.1-4.9-21.6-10.8c-0.8-1.2-1.3-2.7-1.5-4.4c3.4,3.3,7.7,6.3,12.6,8.6c5.4,2.6,11,4.2,16.3,4.8 C37.3,77.8,35.3,78.4,33.3,78.2 M9.4,59.9c0,0.3-0.1,0.7-0.1,1c-0.3-0.3-0.6-0.7-0.9-1H7.3c0.6,0.8,1.3,1.5,2,2.2 c0,1,0.2,2,0.4,2.9c-4.3-5.7-6.9-12.7-6.9-20.4c0-6.9,2.1-13.3,5.6-18.6c-0.4,1.6-0.6,3.3-0.5,5.1h0.8c-0.1-2.7,0.3-5.2,1.3-7.4 c1.3-1.7,2.9-3.3,4.5-4.7c0.9-0.5,1.7-0.9,2.6-1.3c2,3.5,4.1,6.9,6,9.3c-0.4,0-3.5,0.2-6.5-0.1l0.4,0.1c-0.1,0-0.2,0-0.3,0 c0.7,1.4,1.4,2.8,2.2,4.1h14c-0.7-0.6-1.4-1.2-2.2-1.9c3.3-2.6,6.6-4.9,10-6.6c1.1,1.2,2.5,2.3,4.2,3.2c2.2,1.1,4.4,1.7,6.5,1.8 c0.2,1.1,0.5,2.3,0.6,3.5H53c-0.2-1.2-0.4-2.4-0.6-3.5c2.1-0.1,3.9-0.8,4.9-2c1.8,1.7,3.3,3.5,4.7,5.5h1c-1.5-2.2-3.2-4.2-5.2-6.1 c0.6-1,0.7-2.2,0.4-3.5c-0.2-0.8-0.6-1.7-1.2-2.4c1.6,0.3,3,1,4.1,1.9c6,6.1,9.8,14.4,9.8,23.6c0,4.3-0.8,8.4-2.3,12.2 c-2.9,6-9.8,9.2-18.4,9.5c3.6-0.9,6.5-2.2,9.9-4.3c-1.3-0.6-2.6-1.2-3.8-1.9c-0.4,0-0.8,0-1.2,0c-7.1,0-11.6-3.1-13-9.3 c-2.2-1.7-4.4-3.5-6.5-5.3v5.2c3,2.7,6,5.2,8.8,7.5c-2.1,1.4-9.1,3.5-10.5,3.8c1.2,0.9,2.4,1.8,3.6,2.7c-2.8-0.8-5.7-1.9-8.6-3.2 c-0.3-0.1-0.6-0.3-0.8-0.4c0,0-0.1,0-0.1-0.1c-0.5-0.3-1-0.5-1.5-0.8c-3.6-1.9-6.6-4.2-9.1-6.7v1.2c0.8,0.8,1.7,1.5,2.6,2.3 c2.7,2.2,5.8,4,9.2,5.6c3.4,1.6,6.8,2.8,10.3,3.6c1.9,1.3,3.8,2.4,5.8,3.5c0,0,0,0.1-0.1,0.1c-1.5,2.6-3.1,4.6-4.9,6 c-5.4-0.5-11.3-2.1-17-4.8c-5.1-2.5-9.6-5.6-13-9.1c0-0.6,0-1.2,0.1-1.8H9.4z M38.9,19.4c0.2,0.9,0.7,1.9,1.4,2.8 c-3.4,1.8-6.8,4-10.1,6.7c-3.7-3.5-7.2-7.5-10.6-12c0,0,0,0,0.1,0c0,0,0,0,0,0c1.5-0.6,3.1-1,4.8-1.4c4.8-0.9,9.8-0.8,14.8,0.4 C38.7,16.9,38.6,18.1,38.9,19.4 M39.7,19.2c-0.3-1.1-0.2-2.2,0.4-3.1c0,0,0,0,0-0.1c2.6,0.7,5.2,1.7,7.7,3 c-0.5,0.1-1.1,0.3-1.6,0.5c-1.7,0.6-3.5,1.3-5.2,2.2C40.4,20.9,40,20,39.7,19.2 M48.2,18.3c-2.4-1.2-4.9-2.2-7.5-2.9 c1-0.9,2.6-1.4,4.4-1.4C46.3,15.1,47.3,16.6,48.2,18.3 M46.4,14c1.7,0.2,3.5,0.7,5.3,1.6c1.3,0.7,2.4,1.5,3.3,2.3 c-1.7-0.1-3.6,0.2-5.6,0.6C48.4,16.8,47.5,15.3,46.4,14 M46.6,20.3c0.8-0.3,1.6-0.5,2.3-0.7c0.3,0.7,0.7,1.5,1,2.3 c0.6,1.6,1.1,3.3,1.5,5c-1.9-0.1-3.9-0.7-5.9-1.7c-1.5-0.8-2.8-1.8-3.8-2.9C43.3,21.6,44.9,20.9,46.6,20.3 M50.6,21.6 c-0.2-0.5-0.4-0.9-0.6-1.4c2.5,1.4,4.7,3.1,6.7,5c-0.9,1.1-2.6,1.7-4.5,1.7C51.8,25.1,51.2,23.3,50.6,21.6 M50.1,19.3 c2.1-0.4,4-0.6,5.7-0.4c0.8,0.9,1.3,1.9,1.6,2.8c0.3,1,0.2,1.9-0.2,2.7C55.1,22.6,52.7,20.8,50.1,19.3 M52,14.9 c-2.2-1.1-4.4-1.7-6.5-1.8c-0.6-0.6-1.3-1.1-1.9-1.6c5.5,1.1,10.5,3.5,14.7,7c-0.7-0.2-1.4-0.4-2.2-0.5 C55.1,16.9,53.7,15.8,52,14.9 M44.3,13.2c-1.9,0.1-3.5,0.8-4.5,1.9c-5.2-1.3-10.4-1.5-15.5-0.5c-1.8,0.3-3.5,0.8-5.1,1.4 c-0.1,0-0.1,0-0.1,0.1c0-0.1-0.1-0.1-0.1-0.2c5.2-3.2,11.3-5,17.8-5c1,0,2,0,3,0.1C41.4,11.3,42.9,12,44.3,13.2 M40.4,76.6 c1.1,0.1,2.1,0.1,3.1,0.1c0.8,0,1.5,0,2.3-0.1c1-0.1,2-0.2,2.9-0.3c-3.5,1.3-7.4,2-11.4,2.1C38.4,78,39.4,77.4,40.4,76.6 M41.3,75.7c1.6-1.5,3.1-3.4,4.4-5.7c0,0,0.1-0.1,0.1-0.1c2.7,1.4,5.3,2.8,8,4c-0.2,0.1-0.4,0.2-0.6,0.3C50,75.5,45.8,76,41.3,75.7 M49.9,67.1c1.1,0,2.3-0.1,3.4-0.2c5.7-0.7,10.2-2.7,13.3-5.8c-2.5,4.4-5.8,8.1-9.9,11C54.2,70.5,51.9,68.8,49.9,67.1"/>
2600
+ </g>
2601
+ </svg>
2602
+ </xsl:variable>
2603
+
2130
2604
  <xsl:variable name="Image-ITU-Logo">
2131
2605
  <svg xmlns="http://www.w3.org/2000/svg" id="ITU-logo" data-name="Layer 1" width="272" height="300" viewBox="0 0 272 300">
2132
2606
  <defs>
@@ -2140,6 +2614,56 @@
2140
2614
  </svg>
2141
2615
  </xsl:variable>
2142
2616
 
2617
+ <xsl:template name="insertImageCoverColorBand">
2618
+ <xsl:variable name="color">
2619
+ <xsl:choose>
2620
+ <xsl:when test="$bureau = 'R'">
2621
+ <xsl:choose>
2622
+ <!-- Report ITU-R -->
2623
+ <xsl:when test="$doctype = 'report'">#00DA72</xsl:when>
2624
+ <!-- Recommendation ITU-R -->
2625
+ <xsl:when test="$doctype = 'recommendation'">#CC0066</xsl:when>
2626
+ <!-- Handbook ITU-R -->
2627
+ <xsl:when test="$doctype = 'handbook'">#F8A888</xsl:when>
2628
+ <!-- Resolution ITU-R -->
2629
+ <xsl:when test="$doctype = 'resolution'">#3746D1</xsl:when>
2630
+ </xsl:choose>
2631
+ </xsl:when>
2632
+ <xsl:when test="$bureau = 'T'">
2633
+ <xsl:choose>
2634
+ <!-- ITU-T Technical Paper -->
2635
+ <xsl:when test="$doctype = 'technical-paper'">#d74900</xsl:when>
2636
+ <!-- ITU-T Technical Report -->
2637
+ <xsl:when test="$doctype = 'technical-report'">#d74900</xsl:when>
2638
+ <!-- ITU-T Recommendations -->
2639
+ <xsl:when test="starts-with($doctype, 'recommendation')">#9d170a</xsl:when>
2640
+ <xsl:otherwise>#d74900</xsl:otherwise>
2641
+ </xsl:choose>
2642
+ </xsl:when>
2643
+ <xsl:otherwise>#d74900</xsl:otherwise>
2644
+ </xsl:choose>
2645
+ </xsl:variable>
2646
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 595.4 17.4" style="enable-background:new 0 0 595.4 17.4;" width="210mm" height="6.2mm" xml:space="preserve">
2647
+ <style type="text/css">
2648
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:<xsl:value-of select="$color"/>;}
2649
+ .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
2650
+ </style>
2651
+ <g>
2652
+ <g>
2653
+ <rect x="0.9" y="0.6" class="st0" width="612" height="16.5"/>
2654
+ </g>
2655
+ <xsl:choose>
2656
+ <xsl:when test="$lang = 'ar'">
2657
+ <polygon class="st1" points="505.3,-1.1 537.5,-1.1 521.4,14.6"/>
2658
+ </xsl:when>
2659
+ <xsl:otherwise>
2660
+ <polygon class="st1" points="90.1,-1.1 57.9,-1.1 74,14.6"/>
2661
+ </xsl:otherwise>
2662
+ </xsl:choose>
2663
+ </g>
2664
+ </svg>
2665
+ </xsl:template>
2666
+
2143
2667
  <!-- convert YYYY-MM-DD to (MM/YYYY) -->
2144
2668
  <xsl:template name="formatDate">
2145
2669
  <xsl:param name="date"/>
@@ -2152,6 +2676,7 @@
2152
2676
 
2153
2677
  <xsl:template name="formatMeetingDate">
2154
2678
  <xsl:param name="date"/>
2679
+ <xsl:param name="inParenthesis">false</xsl:param>
2155
2680
  <xsl:variable name="year" select="substring($date, 1, 4)"/>
2156
2681
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
2157
2682
  <xsl:variable name="day" select="substring($date, 9)"/>
@@ -2173,7 +2698,9 @@
2173
2698
  </xsl:choose>
2174
2699
  </xsl:variable>
2175
2700
 
2701
+ <xsl:if test="$inParenthesis = 'true'"><xsl:text>(</xsl:text></xsl:if>
2176
2702
  <xsl:value-of select="$day"/><xsl:text> </xsl:text><xsl:value-of select="$monthStr"/><xsl:text> </xsl:text><xsl:value-of select="$year"/>
2703
+ <xsl:if test="$inParenthesis = 'true'"><xsl:text>)</xsl:text></xsl:if>
2177
2704
 
2178
2705
  </xsl:template>
2179
2706
 
@@ -2188,6 +2715,69 @@
2188
2715
  </xsl:if>
2189
2716
  </xsl:template>
2190
2717
 
2718
+ <!-- background cover image -->
2719
+ <xsl:template name="insertBackgroundPageImage">
2720
+ <xsl:param name="number">1</xsl:param>
2721
+ <xsl:param name="name">coverpage-image</xsl:param>
2722
+ <xsl:variable name="num" select="number($number)"/>
2723
+ <!-- background image -->
2724
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
2725
+ <fo:block>
2726
+ <xsl:for-each select="/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata[itu:name = $name][1]/itu:value/itu:image[$num]">
2727
+ <xsl:choose>
2728
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
2729
+ <fo:instream-foreign-object fox:alt-text="Image Front">
2730
+ <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
2731
+ <xsl:call-template name="getSVG"/>
2732
+ </fo:instream-foreign-object>
2733
+ </xsl:when>
2734
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
2735
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
2736
+ </xsl:when>
2737
+ <xsl:otherwise> <!-- bitmap image -->
2738
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
2739
+ <xsl:if test="$coverimage_src != ''">
2740
+ <xsl:variable name="coverpage">
2741
+ <xsl:call-template name="getImageURL">
2742
+ <xsl:with-param name="src" select="$coverimage_src"/>
2743
+ </xsl:call-template>
2744
+ </xsl:variable>
2745
+ <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
2746
+ <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
2747
+ </xsl:if>
2748
+ </xsl:otherwise>
2749
+ </xsl:choose>
2750
+ </xsl:for-each>
2751
+ </fo:block>
2752
+ </fo:block-container>
2753
+ </xsl:template>
2754
+
2755
+ <xsl:template name="getImageURL">
2756
+ <xsl:param name="src"/>
2757
+ <xsl:choose>
2758
+ <xsl:when test="starts-with($src, 'data:image')">
2759
+ <xsl:value-of select="$src"/>
2760
+ </xsl:when>
2761
+ <xsl:otherwise>
2762
+ <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
2763
+ </xsl:otherwise>
2764
+ </xsl:choose>
2765
+ </xsl:template>
2766
+
2767
+ <xsl:template name="getSVG">
2768
+ <xsl:choose>
2769
+ <xsl:when test="*[local-name() = 'svg']">
2770
+ <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
2771
+ </xsl:when>
2772
+ <xsl:otherwise>
2773
+ <xsl:variable name="svg_content" select="document(@src)"/>
2774
+ <xsl:for-each select="xalan:nodeset($svg_content)/node()">
2775
+ <xsl:apply-templates select="." mode="svg_update"/>
2776
+ </xsl:for-each>
2777
+ </xsl:otherwise>
2778
+ </xsl:choose>
2779
+ </xsl:template>
2780
+
2191
2781
  <xsl:strip-space elements="itu:xref"/>
2192
2782
 
2193
2783
  <!-- external parameters -->
@@ -2195,6 +2785,8 @@
2195
2785
  <xsl:param name="svg_images"/> <!-- svg images array -->
2196
2786
  <xsl:variable name="images" select="document($svg_images)"/>
2197
2787
  <xsl:param name="basepath"/> <!-- base path for images -->
2788
+ <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
2789
+ <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
2198
2790
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
2199
2791
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
2200
2792
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -2247,6 +2839,20 @@
2247
2839
  <xsl:call-template name="getLang"/>
2248
2840
  </xsl:variable>
2249
2841
 
2842
+ <xsl:variable name="inputxml_filename_prefix">
2843
+ <xsl:choose>
2844
+ <xsl:when test="contains($inputxml_filename, '.presentation.xml')">
2845
+ <xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
2846
+ </xsl:when>
2847
+ <xsl:when test="contains($inputxml_filename, '.xml')">
2848
+ <xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
2849
+ </xsl:when>
2850
+ <xsl:otherwise>
2851
+ <xsl:value-of select="$inputxml_filename"/>
2852
+ </xsl:otherwise>
2853
+ </xsl:choose>
2854
+ </xsl:variable>
2855
+
2250
2856
  <!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
2251
2857
  You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
2252
2858
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
@@ -3182,6 +3788,10 @@
3182
3788
 
3183
3789
  </xsl:attribute-set>
3184
3790
 
3791
+ <xsl:template name="refine_figure-block-style">
3792
+
3793
+ </xsl:template>
3794
+
3185
3795
  <xsl:attribute-set name="figure-style">
3186
3796
 
3187
3797
  </xsl:attribute-set>
@@ -4119,7 +4729,7 @@
4119
4729
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
4120
4730
 
4121
4731
  <xsl:variable name="colwidths">
4122
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
4732
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
4123
4733
  <xsl:call-template name="calculate-column-widths">
4124
4734
  <xsl:with-param name="cols-count" select="$cols-count"/>
4125
4735
  <xsl:with-param name="table" select="$simple-table"/>
@@ -4231,6 +4841,11 @@
4231
4841
  <fo:table-column column-width="{@width}"/>
4232
4842
  </xsl:for-each>
4233
4843
  </xsl:when>
4844
+ <xsl:when test="@class = 'dl'">
4845
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
4846
+ <fo:table-column column-width="{@width}"/>
4847
+ </xsl:for-each>
4848
+ </xsl:when>
4234
4849
  <xsl:otherwise>
4235
4850
  <xsl:call-template name="insertTableColumnWidth">
4236
4851
  <xsl:with-param name="colwidths" select="$colwidths"/>
@@ -5526,6 +6141,41 @@
5526
6141
  <!-- ===================== -->
5527
6142
  <!-- Definition List -->
5528
6143
  <!-- ===================== -->
6144
+
6145
+ <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
6146
+ <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
6147
+ <xsl:variable name="dl">
6148
+ <xsl:element name="dl" namespace="{$namespace_full}">
6149
+ <xsl:copy-of select="@*"/>
6150
+ <xsl:element name="colgroup" namespace="{$namespace_full}">
6151
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
6152
+ <xsl:element name="col" namespace="{$namespace_full}">
6153
+ <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
6154
+ </xsl:element>
6155
+ </xsl:for-each>
6156
+ </xsl:element>
6157
+ <xsl:apply-templates mode="table_to_dl"/>
6158
+ </xsl:element>
6159
+ </xsl:variable>
6160
+ <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
6161
+ </xsl:template>
6162
+ <xsl:template match="@*|node()" mode="table_to_dl">
6163
+ <xsl:copy>
6164
+ <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
6165
+ </xsl:copy>
6166
+ </xsl:template>
6167
+ <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
6168
+ <xsl:apply-templates mode="table_to_dl"/>
6169
+ </xsl:template>
6170
+ <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
6171
+ <xsl:element name="dt" namespace="{$namespace_full}">
6172
+ <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
6173
+ </xsl:element>
6174
+ <xsl:element name="dd" namespace="{$namespace_full}">
6175
+ <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
6176
+ </xsl:element>
6177
+ </xsl:template>
6178
+
5529
6179
  <xsl:template match="*[local-name()='dl']">
5530
6180
  <xsl:variable name="isAdded" select="@added"/>
5531
6181
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -5738,10 +6388,21 @@
5738
6388
  </xsl:variable>
5739
6389
 
5740
6390
  <xsl:variable name="colwidths">
5741
- <xsl:call-template name="calculate-column-widths">
5742
- <xsl:with-param name="cols-count" select="2"/>
5743
- <xsl:with-param name="table" select="$simple-table"/>
5744
- </xsl:call-template>
6391
+ <xsl:choose>
6392
+ <!-- dl from table[@class='dl'] -->
6393
+ <xsl:when test="*[local-name() = 'colgroup']">
6394
+ <autolayout/>
6395
+ <xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
6396
+ <column><xsl:value-of select="translate(@width,'%m','')"/></column>
6397
+ </xsl:for-each>
6398
+ </xsl:when>
6399
+ <xsl:otherwise>
6400
+ <xsl:call-template name="calculate-column-widths">
6401
+ <xsl:with-param name="cols-count" select="2"/>
6402
+ <xsl:with-param name="table" select="$simple-table"/>
6403
+ </xsl:call-template>
6404
+ </xsl:otherwise>
6405
+ </xsl:choose>
5745
6406
  </xsl:variable>
5746
6407
 
5747
6408
  <!-- <xsl:text disable-output-escaping="yes">&lt;!- -</xsl:text>
@@ -6479,7 +7140,8 @@
6479
7140
  </xsl:template>
6480
7141
 
6481
7142
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
6482
- <xsl:variable name="text" select="normalize-space(.)"/>
7143
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
7144
+ <xsl:variable name="text" select="."/>
6483
7145
  <fo:inline font-size="75%" role="SKIP">
6484
7146
  <xsl:if test="string-length($text) &gt; 0">
6485
7147
  <xsl:variable name="smallCapsText">
@@ -7847,6 +8509,12 @@
7847
8509
  <xsl:when test="@updatetype = 'true'">
7848
8510
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
7849
8511
  </xsl:when>
8512
+ <xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
8513
+ <!-- link to the PDF attachment -->
8514
+ <xsl:variable name="target_" select="translate(@target, '\', '/')"/>
8515
+ <xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
8516
+ <xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
8517
+ </xsl:when>
7850
8518
  <xsl:otherwise>
7851
8519
  <xsl:value-of select="normalize-space(@target)"/>
7852
8520
  </xsl:otherwise>
@@ -8260,6 +8928,7 @@
8260
8928
  <xsl:variable name="isAdded" select="@added"/>
8261
8929
  <xsl:variable name="isDeleted" select="@deleted"/>
8262
8930
  <fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
8931
+ <xsl:call-template name="refine_figure-block-style"/>
8263
8932
 
8264
8933
  <xsl:call-template name="setTrackChangesStyles">
8265
8934
  <xsl:with-param name="isAdded" select="$isAdded"/>
@@ -8662,8 +9331,12 @@
8662
9331
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
8663
9332
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
8664
9333
 
9334
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
9335
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
9336
+
8665
9337
  <xsl:attribute name="width">
8666
9338
  <xsl:choose>
9339
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
8667
9340
  <xsl:when test="$width != ''">
8668
9341
  <xsl:value-of select="round($width)"/>
8669
9342
  </xsl:when>
@@ -8672,6 +9345,7 @@
8672
9345
  </xsl:attribute>
8673
9346
  <xsl:attribute name="height">
8674
9347
  <xsl:choose>
9348
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
8675
9349
  <xsl:when test="$height != ''">
8676
9350
  <xsl:value-of select="round($height)"/>
8677
9351
  </xsl:when>
@@ -8683,6 +9357,28 @@
8683
9357
  </xsl:copy>
8684
9358
  </xsl:template>
8685
9359
 
9360
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
9361
+ <!-- image[@width]/svg -->
9362
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
9363
+ <xsl:attribute name="width">
9364
+ <xsl:choose>
9365
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
9366
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
9367
+ </xsl:choose>
9368
+ </xsl:attribute>
9369
+ </xsl:template>
9370
+
9371
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
9372
+ <!-- image[@height]/svg -->
9373
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
9374
+ <xsl:attribute name="height">
9375
+ <xsl:choose>
9376
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
9377
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
9378
+ </xsl:choose>
9379
+ </xsl:attribute>
9380
+ </xsl:template>
9381
+
8686
9382
  <!-- regex for 'display: inline-block;' -->
8687
9383
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
8688
9384
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -12653,10 +13349,10 @@
12653
13349
 
12654
13350
  <xsl:template name="addPDFUAmeta">
12655
13351
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
12656
- <pdf:dictionary type="normal" key="ViewerPreferences">
12657
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
12658
- </pdf:dictionary>
12659
- </pdf:catalog>
13352
+ <pdf:dictionary type="normal" key="ViewerPreferences">
13353
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
13354
+ </pdf:dictionary>
13355
+ </pdf:catalog>
12660
13356
  <x:xmpmeta xmlns:x="adobe:ns:meta/">
12661
13357
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
12662
13358
  <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
@@ -12708,6 +13404,19 @@
12708
13404
  </rdf:Description>
12709
13405
  </rdf:RDF>
12710
13406
  </x:xmpmeta>
13407
+ <!-- add attachments -->
13408
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13409
+ <xsl:choose>
13410
+ <xsl:when test="normalize-space() != ''">
13411
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
13412
+ </xsl:when>
13413
+ <xsl:otherwise>
13414
+ <!-- _{filename}_attachments -->
13415
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
13416
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
13417
+ </xsl:otherwise>
13418
+ </xsl:choose>
13419
+ </xsl:for-each>
12711
13420
  </xsl:template> <!-- addPDFUAmeta -->
12712
13421
 
12713
13422
  <xsl:template name="getId">