metanorma-bipm 1.1.11 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -247,33 +247,68 @@
247
247
  <xsl:template match="/">
248
248
  <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
249
249
  <fo:layout-master-set>
250
+
251
+ <!-- blank page -->
252
+ <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
253
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
254
+ <fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
255
+ <fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
256
+ <fo:region-start region-name="left-region" extent="17mm"/>
257
+ <fo:region-end region-name="right-region" extent="26.5mm"/>
258
+ </fo:simple-page-master>
259
+
250
260
  <!-- Cover page -->
251
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
261
+ <fo:simple-page-master master-name="simple-cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
252
262
  <fo:region-body margin-top="36mm" margin-bottom="43mm" margin-left="49mm" margin-right="48mm"/>
253
- <fo:region-before extent="36mm"/>
263
+ <fo:region-before region-name="header" extent="36mm"/>
254
264
  <fo:region-after extent="43mm"/>
255
265
  <fo:region-start extent="49mm"/>
256
266
  <fo:region-end extent="48mm"/>
257
267
  </fo:simple-page-master>
258
268
 
269
+ <fo:page-sequence-master master-name="cover-page">
270
+ <fo:repeatable-page-master-alternatives>
271
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
272
+ <fo:conditional-page-master-reference master-reference="simple-cover-page" odd-or-even="odd"/>
273
+ <fo:conditional-page-master-reference master-reference="simple-cover-page" odd-or-even="even"/>
274
+ </fo:repeatable-page-master-alternatives>
275
+ </fo:page-sequence-master>
276
+
259
277
  <!-- Cover page -->
260
- <fo:simple-page-master master-name="cover-page-appendix" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
278
+ <fo:simple-page-master master-name="simple-cover-page-appendix" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
261
279
  <fo:region-body margin-top="90mm" margin-bottom="40mm" margin-left="12.5mm" margin-right="53mm"/>
262
- <fo:region-before extent="60mm"/>
280
+ <fo:region-before region-name="header" extent="60mm"/>
263
281
  <fo:region-after extent="40mm"/>
264
282
  <fo:region-start extent="12.5mm"/>
265
283
  <fo:region-end extent="53mm"/>
266
284
  </fo:simple-page-master>
267
285
 
286
+ <fo:page-sequence-master master-name="cover-page-appendix">
287
+ <fo:repeatable-page-master-alternatives>
288
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
289
+ <fo:conditional-page-master-reference master-reference="simple-cover-page-appendix" odd-or-even="odd"/>
290
+ <fo:conditional-page-master-reference master-reference="simple-cover-page-appendix" odd-or-even="even"/>
291
+ </fo:repeatable-page-master-alternatives>
292
+ </fo:page-sequence-master>
293
+
294
+
268
295
  <!-- Title page -->
269
- <fo:simple-page-master master-name="title-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
296
+ <fo:simple-page-master master-name="simple-title-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
270
297
  <fo:region-body margin-top="38mm" margin-bottom="25mm" margin-left="95mm" margin-right="12mm"/>
271
- <fo:region-before extent="38mm"/>
298
+ <fo:region-before region-name="header" extent="38mm"/>
272
299
  <fo:region-after extent="25mm"/>
273
300
  <fo:region-start extent="95mm"/>
274
301
  <fo:region-end extent="12mm"/>
275
302
  </fo:simple-page-master>
276
303
 
304
+ <fo:page-sequence-master master-name="title-page">
305
+ <fo:repeatable-page-master-alternatives>
306
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
307
+ <fo:conditional-page-master-reference master-reference="simple-title-page" odd-or-even="odd"/>
308
+ <fo:conditional-page-master-reference master-reference="simple-title-page" odd-or-even="even"/>
309
+ </fo:repeatable-page-master-alternatives>
310
+ </fo:page-sequence-master>
311
+
277
312
  <!-- Document pages -->
278
313
  <fo:simple-page-master master-name="document-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
279
314
  <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
@@ -291,6 +326,7 @@
291
326
  </fo:simple-page-master>
292
327
  <fo:page-sequence-master master-name="document">
293
328
  <fo:repeatable-page-master-alternatives>
329
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
294
330
  <fo:conditional-page-master-reference odd-or-even="even" master-reference="document-even"/>
295
331
  <fo:conditional-page-master-reference odd-or-even="odd" master-reference="document-odd"/>
296
332
  </fo:repeatable-page-master-alternatives>
@@ -312,7 +348,8 @@
312
348
  <fo:region-end region-name="right-region" extent="26.5mm"/>
313
349
  </fo:simple-page-master>
314
350
  <fo:page-sequence-master master-name="document-landscape">
315
- <fo:repeatable-page-master-alternatives>
351
+ <fo:repeatable-page-master-alternatives>
352
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
316
353
  <fo:conditional-page-master-reference odd-or-even="even" master-reference="document-landscape-even"/>
317
354
  <fo:conditional-page-master-reference odd-or-even="odd" master-reference="document-landscape-odd"/>
318
355
  </fo:repeatable-page-master-alternatives>
@@ -334,7 +371,8 @@
334
371
  <fo:region-end region-name="right-region" extent="26.5mm"/>
335
372
  </fo:simple-page-master>
336
373
  <fo:page-sequence-master master-name="index">
337
- <fo:repeatable-page-master-alternatives>
374
+ <fo:repeatable-page-master-alternatives>
375
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
338
376
  <fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even"/>
339
377
  <fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd"/>
340
378
  </fo:repeatable-page-master-alternatives>
@@ -1106,6 +1144,9 @@
1106
1144
  </xsl:if>
1107
1145
 
1108
1146
  <xsl:call-template name="insertFootnoteSeparator"/>
1147
+
1148
+ <xsl:call-template name="insertHeaderDraftWatermark"/>
1149
+
1109
1150
  <fo:flow flow-name="xsl-region-body" font-family="Arial">
1110
1151
 
1111
1152
  <fo:block-container font-size="12pt" font-weight="bold" border-top="1pt solid black" width="82mm" margin-top="2mm" padding-top="2mm">
@@ -1303,7 +1344,9 @@
1303
1344
 
1304
1345
  <!-- Index -->
1305
1346
  <!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
1306
- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
1347
+ <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
1348
+ <xsl:with-param name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
1349
+ </xsl:apply-templates>
1307
1350
 
1308
1351
  <!-- End Document Pages -->
1309
1352
 
@@ -1322,6 +1365,8 @@
1322
1365
 
1323
1366
  <fo:page-sequence master-reference="document" force-page-count="no-force">
1324
1367
 
1368
+ <xsl:call-template name="insertHeaderDraftWatermark"/>
1369
+
1325
1370
  <fo:flow flow-name="xsl-region-body" font-family="Arial">
1326
1371
 
1327
1372
  <fo:block-container font-size="12pt" font-weight="bold" border-top="1pt solid black" width="82mm" margin-top="2mm" padding-top="2mm">
@@ -1471,7 +1516,9 @@
1471
1516
 
1472
1517
  <!-- Index -->
1473
1518
  <!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
1474
- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
1519
+ <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
1520
+ <xsl:with-param name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
1521
+ </xsl:apply-templates>
1475
1522
 
1476
1523
  </xsl:otherwise>
1477
1524
  </xsl:choose>
@@ -1485,6 +1532,8 @@
1485
1532
 
1486
1533
  <fo:page-sequence master-reference="cover-page" force-page-count="even">
1487
1534
 
1535
+ <xsl:call-template name="insertHeaderDraftWatermark"/>
1536
+
1488
1537
  <fo:flow flow-name="xsl-region-body">
1489
1538
 
1490
1539
  <xsl:call-template name="insertCoverPageCommon"/>
@@ -1820,6 +1869,8 @@
1820
1869
  </fo:block>
1821
1870
  </fo:block-container>
1822
1871
 
1872
+ <xsl:call-template name="insertDraftWatermark"/>
1873
+
1823
1874
  <!-- BIPM logo -->
1824
1875
  <fo:block-container absolute-position="fixed" left="12.8mm" top="12.2mm">
1825
1876
  <fo:block>
@@ -1844,6 +1895,8 @@
1844
1895
 
1845
1896
  <fo:page-sequence master-reference="title-page" format="1" initial-page-number="1" force-page-count="even">
1846
1897
 
1898
+ <xsl:call-template name="insertHeaderDraftWatermark"/>
1899
+
1847
1900
  <fo:flow flow-name="xsl-region-body" font-family="Arial">
1848
1901
 
1849
1902
  <xsl:variable name="languages">
@@ -3326,13 +3379,14 @@
3326
3379
 
3327
3380
  <xsl:template match="bipm:preferred">
3328
3381
  <fo:block font-weight="bold" keep-with-next="always" space-before="8pt" margin-bottom="6pt">
3329
- <xsl:if test="ancestor::bipm:term/bipm:name">
3382
+ <xsl:call-template name="setStyle_preferred"/>
3383
+ <xsl:if test="ancestor::bipm:term[1]/bipm:name">
3330
3384
  <xsl:variable name="level">
3331
3385
  <xsl:call-template name="getLevelTermName"/>
3332
3386
  </xsl:variable>
3333
- <fo:inline role="H{$level}">
3387
+ <fo:inline role="H{$level}" font-weight="bold">
3334
3388
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
3335
- <xsl:apply-templates select="ancestor::bipm:term/bipm:name" mode="presentation"/>
3389
+ <xsl:apply-templates select="ancestor::bipm:term[1]/bipm:name" mode="presentation"/>
3336
3390
  </fo:inline>
3337
3391
  </xsl:if>
3338
3392
  <xsl:apply-templates/>
@@ -3908,7 +3962,11 @@
3908
3962
  <xsl:template name="insertHeaderFooter">
3909
3963
  <xsl:param name="header-title"/>
3910
3964
  <xsl:param name="orientation"/>
3965
+ <xsl:param name="isDraft"/>
3911
3966
  <fo:static-content flow-name="header-odd" role="artifact">
3967
+ <xsl:call-template name="insertDraftWatermark">
3968
+ <xsl:with-param name="isDraft" select="$isDraft"/>
3969
+ </xsl:call-template>
3912
3970
  <fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
3913
3971
  <fo:block text-align="right">
3914
3972
  <xsl:copy-of select="$header-title"/>
@@ -3929,6 +3987,9 @@
3929
3987
  </fo:block-container>
3930
3988
  </fo:static-content>
3931
3989
  <fo:static-content flow-name="header-even" role="artifact">
3990
+ <xsl:call-template name="insertDraftWatermark">
3991
+ <xsl:with-param name="isDraft" select="$isDraft"/>
3992
+ </xsl:call-template>
3932
3993
  <fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
3933
3994
  <fo:block>
3934
3995
  <fo:inline font-weight="bold"><fo:page-number/></fo:inline>
@@ -3944,7 +4005,74 @@
3944
4005
  <fo:block> </fo:block>
3945
4006
  </fo:block-container>
3946
4007
  </fo:block-container>
3947
- </fo:static-content>
4008
+ </fo:static-content>
4009
+ <fo:static-content flow-name="header-blank" role="artifact">
4010
+ <xsl:call-template name="insertDraftWatermark">
4011
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4012
+ </xsl:call-template>
4013
+ <fo:block/>
4014
+ </fo:static-content>
4015
+ </xsl:template>
4016
+
4017
+ <xsl:template name="insertDraftWatermark">
4018
+ <xsl:param name="isDraft"/>
4019
+ <xsl:if test="$isDraft = 'true' or normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet')) = 'true'">
4020
+ <!-- DRAFT -->
4021
+ <xsl:variable name="draft_label">
4022
+ <xsl:call-template name="getLocalizedString">
4023
+ <xsl:with-param name="key">draft_label</xsl:with-param>
4024
+ </xsl:call-template>
4025
+ </xsl:variable>
4026
+ <fo:block-container absolute-position="fixed" left="0mm" top="30mm">
4027
+ <fo:block line-height="0">
4028
+ <fo:instream-foreign-object fox:alt-text="DRAFT">
4029
+ <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="200mm" height="250mm">
4030
+ <svg:g transform="rotate(-45) scale(0.6, 1)">
4031
+ <xsl:variable name="font-size">
4032
+ <xsl:choose>
4033
+ <xsl:when test="string-length($draft_label) &gt; 5">150</xsl:when>
4034
+ <xsl:otherwise>260</xsl:otherwise>
4035
+ </xsl:choose>
4036
+ </xsl:variable>
4037
+ <svg:text x="-175mm" y="205mm" style="font-family:Arial;font-size:{$font-size}pt;font-weight:normal;fill:rgb(223, 223, 223);">
4038
+ <xsl:if test="string-length($draft_label) &gt; 5">
4039
+ <xsl:attribute name="x">-175mm</xsl:attribute>
4040
+ <xsl:attribute name="y">180mm</xsl:attribute>
4041
+ </xsl:if>
4042
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($draft_label))"/>
4043
+ </svg:text>
4044
+ </svg:g>
4045
+ </svg:svg>
4046
+ </fo:instream-foreign-object>
4047
+ </fo:block>
4048
+ </fo:block-container>
4049
+ </xsl:if>
4050
+ </xsl:template>
4051
+
4052
+ <xsl:template name="insertHeaderDraftWatermark">
4053
+ <xsl:variable name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
4054
+ <xsl:if test="$isDraft = 'true'">
4055
+ <fo:static-content flow-name="header-blank" role="artifact">
4056
+ <xsl:call-template name="insertDraftWatermark">
4057
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4058
+ </xsl:call-template>
4059
+ </fo:static-content>
4060
+ <fo:static-content flow-name="header" role="artifact">
4061
+ <xsl:call-template name="insertDraftWatermark">
4062
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4063
+ </xsl:call-template>
4064
+ </fo:static-content>
4065
+ <fo:static-content flow-name="header-odd" role="artifact">
4066
+ <xsl:call-template name="insertDraftWatermark">
4067
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4068
+ </xsl:call-template>
4069
+ </fo:static-content>
4070
+ <fo:static-content flow-name="header-even" role="artifact">
4071
+ <xsl:call-template name="insertDraftWatermark">
4072
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4073
+ </xsl:call-template>
4074
+ </fo:static-content>
4075
+ </xsl:if>
3948
4076
  </xsl:template>
3949
4077
 
3950
4078
  <!-- <xsl:template name="insertHeaderFooterAppendix">
@@ -4089,6 +4217,7 @@
4089
4217
  <!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
4090
4218
  <xsl:template match="bipm:indexsect"/>
4091
4219
  <xsl:template match="bipm:indexsect" mode="index">
4220
+ <xsl:param name="isDraft"/>
4092
4221
 
4093
4222
  <fo:page-sequence master-reference="index" force-page-count="no-force">
4094
4223
  <xsl:variable name="header-title">
@@ -4103,6 +4232,7 @@
4103
4232
  </xsl:variable>
4104
4233
  <xsl:call-template name="insertHeaderFooter">
4105
4234
  <xsl:with-param name="header-title" select="$header-title"/>
4235
+ <xsl:with-param name="isDraft" select="$isDraft"/>
4106
4236
  </xsl:call-template>
4107
4237
 
4108
4238
  <fo:flow flow-name="xsl-region-body">
@@ -4648,6 +4778,8 @@
4648
4778
 
4649
4779
  <title-list-figures lang="en">List of Figures</title-list-figures>
4650
4780
 
4781
+ <title-table-figures lang="en">Table of Figures</title-table-figures>
4782
+
4651
4783
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
4652
4784
 
4653
4785
  <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
@@ -5102,7 +5234,8 @@
5102
5234
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
5103
5235
 
5104
5236
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
5105
- <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
5237
+
5238
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
5106
5239
  <xsl:sort select="@displayorder" data-type="number"/>
5107
5240
  <xsl:apply-templates select="." mode="contents"/>
5108
5241
  </xsl:for-each>
@@ -5112,7 +5245,7 @@
5112
5245
  <xsl:apply-templates select="." mode="contents"/>
5113
5246
  </xsl:for-each>
5114
5247
 
5115
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
5248
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
5116
5249
  <xsl:sort select="@displayorder" data-type="number"/>
5117
5250
  <xsl:apply-templates select="." mode="contents"/>
5118
5251
  </xsl:for-each>
@@ -6627,6 +6760,7 @@
6627
6760
  <fo:table-cell>
6628
6761
 
6629
6762
  <fo:block margin-top="6pt">
6763
+ <xsl:copy-of select="@id"/>
6630
6764
 
6631
6765
 
6632
6766
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -7509,14 +7643,18 @@
7509
7643
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
7510
7644
  <fo:inline><xsl:apply-templates/></fo:inline>
7511
7645
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
7646
+ <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
7512
7647
  <fo:block id="{@id}">
7513
7648
  <xsl:apply-templates/>
7514
7649
  </fo:block>
7515
7650
  </xsl:template><xsl:template match="*[local-name() = 'term']">
7651
+ <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
7516
7652
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7517
7653
 
7518
7654
 
7519
-
7655
+ <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
7656
+
7657
+ </xsl:if>
7520
7658
  <xsl:apply-templates/>
7521
7659
  </fo:block>
7522
7660
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
@@ -7582,6 +7720,7 @@
7582
7720
  <xsl:otherwise>
7583
7721
  <fo:block xsl:use-attribute-sets="image-style">
7584
7722
 
7723
+
7585
7724
  <xsl:variable name="src">
7586
7725
  <xsl:call-template name="image_src"/>
7587
7726
  </xsl:variable>
@@ -7943,12 +8082,12 @@
7943
8082
  </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
7944
8083
  <xsl:apply-templates mode="contents"/>
7945
8084
  <xsl:text> </xsl:text>
7946
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
8085
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
7947
8086
  <xsl:apply-templates mode="bookmarks"/>
7948
8087
  <xsl:text> </xsl:text>
7949
8088
  </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
7950
8089
  <xsl:value-of select="."/>
7951
- </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
8090
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
7952
8091
  <xsl:value-of select="."/>
7953
8092
  </xsl:template><xsl:template match="node()" mode="contents">
7954
8093
  <xsl:apply-templates mode="contents"/>
@@ -8046,6 +8185,8 @@
8046
8185
 
8047
8186
 
8048
8187
 
8188
+
8189
+
8049
8190
  </fo:bookmark-tree>
8050
8191
  </xsl:if>
8051
8192
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -8230,6 +8371,8 @@
8230
8371
 
8231
8372
 
8232
8373
 
8374
+
8375
+
8233
8376
  <fo:block xsl:use-attribute-sets="sourcecode-style">
8234
8377
  <xsl:variable name="_font-size">
8235
8378
 
@@ -8263,13 +8406,17 @@
8263
8406
 
8264
8407
 
8265
8408
 
8409
+
8410
+
8266
8411
  <xsl:apply-templates/>
8267
8412
  </fo:block>
8268
-
8413
+
8269
8414
 
8270
8415
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8271
8416
 
8272
8417
 
8418
+
8419
+
8273
8420
  </fo:block-container>
8274
8421
  </fo:block-container>
8275
8422
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -8505,7 +8652,8 @@
8505
8652
  </fo:block>
8506
8653
  </fo:table-cell>
8507
8654
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
8508
- <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
8655
+ <fo:block font-size="11pt">
8656
+
8509
8657
  <xsl:apply-templates/>
8510
8658
  </fo:block>
8511
8659
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -8610,6 +8758,7 @@
8610
8758
  </xsl:choose>
8611
8759
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
8612
8760
  <fo:block xsl:use-attribute-sets="termsource-style">
8761
+
8613
8762
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
8614
8763
  <xsl:variable name="termsource_text">
8615
8764
  <xsl:apply-templates/>
@@ -8620,13 +8769,15 @@
8620
8769
  <!-- <xsl:apply-templates /> -->
8621
8770
  <xsl:copy-of select="$termsource_text"/>
8622
8771
  </xsl:when>
8623
- <xsl:otherwise>
8772
+ <xsl:otherwise>
8773
+
8624
8774
 
8625
8775
  <xsl:text>[</xsl:text>
8626
8776
 
8627
8777
  <!-- <xsl:apply-templates /> -->
8628
8778
  <xsl:copy-of select="$termsource_text"/>
8629
8779
 
8780
+
8630
8781
  <xsl:text>]</xsl:text>
8631
8782
 
8632
8783
  </xsl:otherwise>
@@ -8708,12 +8859,20 @@
8708
8859
  </xsl:template><xsl:template match="*[local-name() = 'author']">
8709
8860
  <xsl:text>— </xsl:text>
8710
8861
  <xsl:apply-templates/>
8711
- </xsl:template><xsl:template match="*[local-name() = 'eref']">
8862
+ </xsl:template><xsl:variable name="bibitem_hidden_">
8863
+ <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
8864
+ <xsl:copy-of select="."/>
8865
+ </xsl:for-each>
8866
+ <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
8867
+ <xsl:copy-of select="."/>
8868
+ </xsl:for-each>
8869
+ </xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
8712
8870
 
8713
8871
  <xsl:variable name="bibitemid">
8714
8872
  <xsl:choose>
8715
- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
8716
- <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
8873
+ <!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
8874
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
8875
+ <xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
8717
8876
  <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
8718
8877
  </xsl:choose>
8719
8878
  </xsl:variable>
@@ -8811,10 +8970,10 @@
8811
8970
  </xsl:choose>
8812
8971
  </xsl:variable>
8813
8972
 
8814
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
8973
+ <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
8815
8974
 
8816
8975
  <xsl:choose>
8817
- <xsl:when test="$language = 'zh'">
8976
+ <xsl:when test="$lang = 'zh'">
8818
8977
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
8819
8978
  </xsl:when>
8820
8979
  <xsl:when test="../../@inline-header = 'true'">
@@ -8848,24 +9007,29 @@
8848
9007
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
8849
9008
  <xsl:variable name="title-deprecated">
8850
9009
 
8851
-
8852
- <xsl:call-template name="getTitle">
8853
- <xsl:with-param name="name" select="'title-deprecated'"/>
9010
+ <xsl:call-template name="getLocalizedString">
9011
+ <xsl:with-param name="key">deprecated</xsl:with-param>
8854
9012
  </xsl:call-template>
8855
9013
 
9014
+
8856
9015
  </xsl:variable>
8857
9016
  <fo:block xsl:use-attribute-sets="deprecates-style">
8858
9017
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
8859
9018
  </fo:block>
9019
+ </xsl:template><xsl:template name="setStyle_preferred">
9020
+ <xsl:if test="*[local-name() = 'strong']">
9021
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
9022
+ </xsl:if>
8860
9023
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
8861
9024
  <fo:block xsl:use-attribute-sets="definition-style">
8862
9025
  <xsl:apply-templates/>
8863
9026
  </fo:block>
8864
9027
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
8865
9028
  <xsl:apply-templates/>
8866
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
9029
+ </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
8867
9030
  <fo:inline> <xsl:apply-templates/></fo:inline>
8868
- <fo:block> </fo:block>
9031
+ <!-- <fo:block>&#xA0;</fo:block> -->
9032
+ <fo:block/>
8869
9033
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
8870
9034
 
8871
9035
  <fo:block>
@@ -9827,12 +9991,15 @@
9827
9991
  <xsl:param name="default">left</xsl:param>
9828
9992
  <xsl:attribute name="text-align">
9829
9993
  <xsl:choose>
9830
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
9994
+ <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
9831
9995
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
9832
9996
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
9833
9997
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
9834
9998
  </xsl:choose>
9835
9999
  </xsl:attribute>
10000
+ <xsl:if test="@align = 'indent'">
10001
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
10002
+ </xsl:if>
9836
10003
  </xsl:template><xsl:template name="number-to-words">
9837
10004
  <xsl:param name="number"/>
9838
10005
  <xsl:param name="first"/>
@@ -495,10 +495,12 @@ h3 {
495
495
  font-size: 1.1em;
496
496
  font-weight: 100; }
497
497
 
498
- .TermNum, .Terms, .AltTerms {
499
- color: #6C734A;
498
+ .TermNum {
500
499
  font-weight: 100; }
501
500
 
501
+ .TermNum, .Terms, .AltTerms {
502
+ color: #6C734A; }
503
+
502
504
  h2.TermNum {
503
505
  margin-bottom: 0; }
504
506
 
@@ -189,9 +189,12 @@ p.document-stage {
189
189
  font-weight: 100;
190
190
  }
191
191
 
192
+ .TermNum {
193
+ font-weight: 100;
194
+ }
195
+
192
196
  .TermNum, .Terms, .AltTerms {
193
197
  color: #6C734A;
194
- font-weight: 100;
195
198
  }
196
199
 
197
200
  h2.TermNum {