metanorma-bipm 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -949,7 +949,9 @@
949
949
 
950
950
  <xsl:call-template name="insertFootnoteSeparator"/>
951
951
 
952
- <xsl:call-template name="insertHeaderDraftWatermark"/>
952
+ <xsl:call-template name="insertHeaderDraftWatermark">
953
+ <xsl:with-param name="lang" select="$curr_lang"/>
954
+ </xsl:call-template>
953
955
 
954
956
  <fo:flow flow-name="xsl-region-body" font-family="Arial">
955
957
 
@@ -1164,6 +1166,7 @@
1164
1166
  <!-- Index -->
1165
1167
  <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
1166
1168
  <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'))"/>
1169
+ <xsl:with-param name="lang" select="$curr_lang"/>
1167
1170
  </xsl:apply-templates>
1168
1171
 
1169
1172
  <!-- End Document Pages -->
@@ -1324,6 +1327,7 @@
1324
1327
  <!-- Index -->
1325
1328
  <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
1326
1329
  <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'))"/>
1330
+ <xsl:with-param name="lang" select="$curr_lang"/>
1327
1331
  </xsl:apply-templates>
1328
1332
 
1329
1333
  </xsl:otherwise>
@@ -1640,7 +1644,9 @@
1640
1644
  </fo:block>
1641
1645
  </fo:block-container>
1642
1646
 
1643
- <xsl:call-template name="insertDraftWatermark"/>
1647
+ <xsl:call-template name="insertDraftWatermark">
1648
+ <xsl:with-param name="lang" select="$doc_split_by_language"/>
1649
+ </xsl:call-template>
1644
1650
 
1645
1651
  <!-- BIPM logo -->
1646
1652
  <fo:block-container absolute-position="fixed" left="12.8mm" top="12.2mm">
@@ -3273,9 +3279,11 @@
3273
3279
  <xsl:param name="header-title"/>
3274
3280
  <xsl:param name="orientation"/>
3275
3281
  <xsl:param name="isDraft"/>
3282
+ <xsl:param name="lang"/>
3276
3283
  <fo:static-content flow-name="header-odd" role="artifact">
3277
3284
  <xsl:call-template name="insertDraftWatermark">
3278
3285
  <xsl:with-param name="isDraft" select="$isDraft"/>
3286
+ <xsl:with-param name="lang" select="$lang"/>
3279
3287
  </xsl:call-template>
3280
3288
  <fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
3281
3289
  <fo:block text-align="right">
@@ -3296,6 +3304,7 @@
3296
3304
  <fo:static-content flow-name="header-even" role="artifact">
3297
3305
  <xsl:call-template name="insertDraftWatermark">
3298
3306
  <xsl:with-param name="isDraft" select="$isDraft"/>
3307
+ <xsl:with-param name="lang" select="$lang"/>
3299
3308
  </xsl:call-template>
3300
3309
  <fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
3301
3310
  <fo:block>
@@ -3313,6 +3322,7 @@
3313
3322
  <fo:static-content flow-name="header-blank" role="artifact">
3314
3323
  <xsl:call-template name="insertDraftWatermark">
3315
3324
  <xsl:with-param name="isDraft" select="$isDraft"/>
3325
+ <xsl:with-param name="lang" select="$lang"/>
3316
3326
  </xsl:call-template>
3317
3327
  <fo:block/>
3318
3328
  </fo:static-content>
@@ -3320,12 +3330,23 @@
3320
3330
 
3321
3331
  <xsl:template name="insertDraftWatermark">
3322
3332
  <xsl:param name="isDraft"/>
3333
+ <xsl:param name="lang"/>
3323
3334
  <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'">
3324
3335
  <!-- DRAFT -->
3325
3336
  <xsl:variable name="draft_label">
3326
- <xsl:call-template name="getLocalizedString">
3327
- <xsl:with-param name="key">draft_label</xsl:with-param>
3328
- </xsl:call-template>
3337
+ <xsl:choose>
3338
+ <xsl:when test="normalize-space($lang) != ''">
3339
+ <xsl:call-template name="getLocalizedString">
3340
+ <xsl:with-param name="key">draft_label</xsl:with-param>
3341
+ <xsl:with-param name="lang" select="$lang"/>
3342
+ </xsl:call-template>
3343
+ </xsl:when>
3344
+ <xsl:otherwise>
3345
+ <xsl:call-template name="getLocalizedString">
3346
+ <xsl:with-param name="key">draft_label</xsl:with-param>
3347
+ </xsl:call-template>
3348
+ </xsl:otherwise>
3349
+ </xsl:choose>
3329
3350
  </xsl:variable>
3330
3351
  <fo:block-container absolute-position="fixed" left="0mm" top="30mm">
3331
3352
  <fo:block line-height="0">
@@ -3355,25 +3376,30 @@
3355
3376
 
3356
3377
  <xsl:template name="insertHeaderDraftWatermark">
3357
3378
  <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'))"/>
3379
+ <xsl:variable name="curr_lang" select="$doc_split_by_language"/>
3358
3380
  <xsl:if test="$isDraft = 'true'">
3359
3381
  <fo:static-content flow-name="header-blank" role="artifact">
3360
3382
  <xsl:call-template name="insertDraftWatermark">
3361
3383
  <xsl:with-param name="isDraft" select="$isDraft"/>
3384
+ <xsl:with-param name="lang" select="$curr_lang"/>
3362
3385
  </xsl:call-template>
3363
3386
  </fo:static-content>
3364
3387
  <fo:static-content flow-name="header" role="artifact">
3365
3388
  <xsl:call-template name="insertDraftWatermark">
3366
3389
  <xsl:with-param name="isDraft" select="$isDraft"/>
3390
+ <xsl:with-param name="lang" select="$curr_lang"/>
3367
3391
  </xsl:call-template>
3368
3392
  </fo:static-content>
3369
3393
  <fo:static-content flow-name="header-odd" role="artifact">
3370
3394
  <xsl:call-template name="insertDraftWatermark">
3371
3395
  <xsl:with-param name="isDraft" select="$isDraft"/>
3396
+ <xsl:with-param name="lang" select="$curr_lang"/>
3372
3397
  </xsl:call-template>
3373
3398
  </fo:static-content>
3374
3399
  <fo:static-content flow-name="header-even" role="artifact">
3375
3400
  <xsl:call-template name="insertDraftWatermark">
3376
3401
  <xsl:with-param name="isDraft" select="$isDraft"/>
3402
+ <xsl:with-param name="lang" select="$curr_lang"/>
3377
3403
  </xsl:call-template>
3378
3404
  </fo:static-content>
3379
3405
  </xsl:if>
@@ -3426,6 +3452,7 @@
3426
3452
  <xsl:template match="bipm:indexsect"/>
3427
3453
  <xsl:template match="bipm:indexsect" mode="index">
3428
3454
  <xsl:param name="isDraft"/>
3455
+ <xsl:param name="lang"/>
3429
3456
 
3430
3457
  <fo:page-sequence master-reference="index" force-page-count="no-force">
3431
3458
  <xsl:variable name="header-title">
@@ -3441,6 +3468,7 @@
3441
3468
  <xsl:call-template name="insertHeaderFooter">
3442
3469
  <xsl:with-param name="header-title" select="$header-title"/>
3443
3470
  <xsl:with-param name="isDraft" select="$isDraft"/>
3471
+ <xsl:with-param name="lang" select="$lang"/>
3444
3472
  </xsl:call-template>
3445
3473
 
3446
3474
  <fo:flow flow-name="xsl-region-body">
@@ -3963,9 +3991,10 @@
3963
3991
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
3964
3992
  </xsl:otherwise>
3965
3993
  </xsl:choose>
3966
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:attribute-set name="root-style">
3994
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable><xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable><xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable><xsl:attribute-set name="root-style">
3967
3995
 
3968
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
3996
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
3997
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
3969
3998
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
3970
3999
 
3971
4000
 
@@ -3983,6 +4012,7 @@
3983
4012
 
3984
4013
 
3985
4014
 
4015
+
3986
4016
  </xsl:attribute-set><xsl:template name="insertRootStyle">
3987
4017
  <xsl:param name="root-style"/>
3988
4018
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
@@ -3994,17 +4024,60 @@
3994
4024
  </xsl:variable>
3995
4025
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
3996
4026
 
4027
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
4028
+
3997
4029
  <xsl:for-each select="$root-style_/root-style/@*">
4030
+
3998
4031
  <xsl:choose>
3999
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
4032
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
4033
+ <xsl:when test="local-name() = 'font-family'">
4034
+
4035
+ <xsl:variable name="font_regional_prefix">
4036
+ <xsl:choose>
4037
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
4038
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
4039
+ </xsl:choose>
4040
+ </xsl:variable>
4041
+
4000
4042
  <xsl:attribute name="{local-name()}">
4001
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
4043
+
4044
+ <xsl:variable name="font_extended">
4045
+ <xsl:choose>
4046
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
4047
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
4048
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
4049
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
4050
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
4051
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
4052
+ </xsl:choose>
4053
+ </xsl:variable>
4054
+ <xsl:if test="normalize-space($font_extended) != ''">
4055
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
4056
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
4057
+ </xsl:if>
4058
+
4059
+ <xsl:value-of select="."/>
4060
+
4061
+ <xsl:if test="$additional_fonts != ''">
4062
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
4063
+ </xsl:if>
4002
4064
  </xsl:attribute>
4003
4065
  </xsl:when>
4004
4066
  <xsl:otherwise>
4005
4067
  <xsl:copy-of select="."/>
4006
4068
  </xsl:otherwise>
4007
4069
  </xsl:choose>
4070
+
4071
+ <!-- <xsl:choose>
4072
+ <xsl:when test="local-name() = 'font-family'">
4073
+ <xsl:attribute name="{local-name()}">
4074
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
4075
+ </xsl:attribute>
4076
+ </xsl:when>
4077
+ <xsl:otherwise>
4078
+ <xsl:copy-of select="."/>
4079
+ </xsl:otherwise>
4080
+ </xsl:choose> -->
4008
4081
  </xsl:for-each>
4009
4082
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
4010
4083
 
@@ -4090,6 +4163,7 @@
4090
4163
 
4091
4164
 
4092
4165
 
4166
+
4093
4167
 
4094
4168
 
4095
4169
 
@@ -4130,6 +4204,7 @@
4130
4204
 
4131
4205
 
4132
4206
 
4207
+
4133
4208
 
4134
4209
  </xsl:attribute-set><xsl:attribute-set name="example-style">
4135
4210
 
@@ -4144,6 +4219,7 @@
4144
4219
 
4145
4220
 
4146
4221
 
4222
+
4147
4223
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
4148
4224
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4149
4225
 
@@ -4167,6 +4243,7 @@
4167
4243
 
4168
4244
 
4169
4245
 
4246
+
4170
4247
 
4171
4248
 
4172
4249
 
@@ -4199,6 +4276,7 @@
4199
4276
 
4200
4277
  </xsl:attribute-set><xsl:variable name="table-border_">
4201
4278
 
4279
+
4202
4280
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
4203
4281
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4204
4282
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -4223,6 +4301,7 @@
4223
4301
 
4224
4302
 
4225
4303
 
4304
+
4226
4305
 
4227
4306
 
4228
4307
 
@@ -4251,6 +4330,7 @@
4251
4330
 
4252
4331
 
4253
4332
 
4333
+
4254
4334
 
4255
4335
 
4256
4336
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
@@ -4259,6 +4339,7 @@
4259
4339
 
4260
4340
 
4261
4341
 
4342
+
4262
4343
 
4263
4344
 
4264
4345
 
@@ -4344,6 +4425,7 @@
4344
4425
 
4345
4426
 
4346
4427
 
4428
+
4347
4429
  </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
4348
4430
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4349
4431
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4358,7 +4440,7 @@
4358
4440
 
4359
4441
 
4360
4442
 
4361
-
4443
+
4362
4444
 
4363
4445
 
4364
4446
 
@@ -4376,6 +4458,7 @@
4376
4458
 
4377
4459
 
4378
4460
 
4461
+
4379
4462
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
4380
4463
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4381
4464
 
@@ -4389,6 +4472,8 @@
4389
4472
 
4390
4473
 
4391
4474
 
4475
+
4476
+
4392
4477
  </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
4393
4478
  <xsl:attribute name="font-size">80%</xsl:attribute>
4394
4479
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -4407,6 +4492,7 @@
4407
4492
 
4408
4493
 
4409
4494
 
4495
+
4410
4496
  </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
4411
4497
  <xsl:attribute name="text-indent">0</xsl:attribute>
4412
4498
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -4442,6 +4528,7 @@
4442
4528
 
4443
4529
 
4444
4530
 
4531
+
4445
4532
  </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
4446
4533
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4447
4534
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4450,6 +4537,7 @@
4450
4537
 
4451
4538
 
4452
4539
 
4540
+
4453
4541
 
4454
4542
 
4455
4543
 
@@ -4490,6 +4578,7 @@
4490
4578
 
4491
4579
 
4492
4580
 
4581
+
4493
4582
 
4494
4583
 
4495
4584
 
@@ -4556,6 +4645,8 @@
4556
4645
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4557
4646
 
4558
4647
 
4648
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
4649
+
4559
4650
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
4560
4651
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
4561
4652
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -4600,6 +4691,7 @@
4600
4691
  <xsl:attribute name="text-align">left</xsl:attribute>
4601
4692
  <xsl:attribute name="margin-left">19mm</xsl:attribute>
4602
4693
  <xsl:attribute name="text-indent">-19mm</xsl:attribute>
4694
+
4603
4695
 
4604
4696
 
4605
4697
 
@@ -4644,6 +4736,7 @@
4644
4736
 
4645
4737
 
4646
4738
 
4739
+
4647
4740
  </xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
4648
4741
  <xsl:attribute name="text-align">right</xsl:attribute>
4649
4742
 
@@ -4662,16 +4755,16 @@
4662
4755
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
4663
4756
 
4664
4757
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
4758
+ <xsl:attribute name="width">100%</xsl:attribute>
4759
+ <xsl:attribute name="content-height">100%</xsl:attribute>
4760
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
4665
4761
 
4666
4762
 
4667
- <xsl:attribute name="width">100%</xsl:attribute>
4668
4763
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
4669
- <xsl:attribute name="scaling">uniform</xsl:attribute>
4670
4764
 
4671
4765
 
4672
4766
 
4673
-
4674
-
4767
+
4675
4768
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
4676
4769
 
4677
4770
 
@@ -4750,6 +4843,7 @@
4750
4843
 
4751
4844
 
4752
4845
 
4846
+
4753
4847
  </xsl:attribute-set><xsl:attribute-set name="list-name-style">
4754
4848
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4755
4849
 
@@ -4819,6 +4913,7 @@
4819
4913
 
4820
4914
 
4821
4915
 
4916
+
4822
4917
  </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
4823
4918
  <xsl:attribute name="font-weight">normal</xsl:attribute>
4824
4919
  <xsl:attribute name="font-style">normal</xsl:attribute>
@@ -4847,6 +4942,7 @@
4847
4942
 
4848
4943
 
4849
4944
 
4945
+
4850
4946
  </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
4851
4947
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4852
4948
 
@@ -4870,6 +4966,7 @@
4870
4966
 
4871
4967
 
4872
4968
 
4969
+
4873
4970
  </xsl:attribute-set><xsl:attribute-set name="admonition-style">
4874
4971
 
4875
4972
 
@@ -4890,11 +4987,12 @@
4890
4987
 
4891
4988
 
4892
4989
 
4990
+
4893
4991
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
4992
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4993
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4894
4994
 
4895
4995
 
4896
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4897
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4898
4996
  <xsl:attribute name="padding">2mm</xsl:attribute>
4899
4997
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
4900
4998
 
@@ -4906,6 +5004,7 @@
4906
5004
 
4907
5005
 
4908
5006
 
5007
+
4909
5008
  </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
4910
5009
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4911
5010
 
@@ -4941,6 +5040,7 @@
4941
5040
 
4942
5041
 
4943
5042
 
5043
+
4944
5044
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
4945
5045
 
4946
5046
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -4981,6 +5081,7 @@
4981
5081
 
4982
5082
 
4983
5083
 
5084
+
4984
5085
  </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
4985
5086
 
4986
5087
 
@@ -5002,6 +5103,7 @@
5002
5103
 
5003
5104
 
5004
5105
 
5106
+
5005
5107
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
5006
5108
 
5007
5109
 
@@ -5030,6 +5132,7 @@
5030
5132
 
5031
5133
 
5032
5134
 
5135
+
5033
5136
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
5034
5137
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
5035
5138
 
@@ -5051,6 +5154,7 @@
5051
5154
 
5052
5155
 
5053
5156
 
5157
+
5054
5158
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
5055
5159
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5056
5160
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -5066,6 +5170,7 @@
5066
5170
 
5067
5171
 
5068
5172
 
5173
+
5069
5174
  </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
5070
5175
 
5071
5176
  <xsl:attribute name="line-height">120%</xsl:attribute>
@@ -5523,6 +5628,8 @@
5523
5628
 
5524
5629
 
5525
5630
 
5631
+
5632
+
5526
5633
 
5527
5634
 
5528
5635
 
@@ -5569,6 +5676,8 @@
5569
5676
 
5570
5677
 
5571
5678
 
5679
+
5680
+
5572
5681
  </xsl:element>
5573
5682
  </xsl:variable>
5574
5683
 
@@ -5711,30 +5820,36 @@
5711
5820
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
5712
5821
  <xsl:param name="continued"/>
5713
5822
  <xsl:if test="normalize-space() != ''">
5714
- <fo:block xsl:use-attribute-sets="table-name-style">
5715
-
5716
-
5717
- <xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
5718
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
5719
- </xsl:if>
5720
- <xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
5721
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
5722
- </xsl:if>
5723
-
5724
-
5725
-
5823
+
5824
+
5726
5825
 
5727
- <xsl:choose>
5728
- <xsl:when test="$continued = 'true'">
5826
+ <fo:block xsl:use-attribute-sets="table-name-style">
5827
+
5729
5828
 
5730
- </xsl:when>
5731
- <xsl:otherwise>
5732
- <xsl:apply-templates/>
5733
- </xsl:otherwise>
5734
- </xsl:choose>
5735
-
5829
+ <xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
5830
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
5831
+ </xsl:if>
5832
+ <xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
5833
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
5834
+ </xsl:if>
5835
+
5836
+
5837
+
5838
+
5839
+ <xsl:choose>
5840
+ <xsl:when test="$continued = 'true'">
5841
+
5842
+ </xsl:when>
5843
+ <xsl:otherwise>
5844
+ <xsl:apply-templates/>
5845
+ </xsl:otherwise>
5846
+ </xsl:choose>
5847
+
5848
+
5849
+ </fo:block>
5850
+
5736
5851
 
5737
- </fo:block>
5852
+
5738
5853
  </xsl:if>
5739
5854
  </xsl:template><xsl:template name="calculate-columns-numbers">
5740
5855
  <xsl:param name="table-row"/>
@@ -6132,12 +6247,18 @@
6132
6247
  <fo:table-row>
6133
6248
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
6134
6249
 
6135
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6136
- <xsl:with-param name="continued">true</xsl:with-param>
6137
- </xsl:apply-templates>
6138
6250
 
6139
6251
 
6140
6252
 
6253
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6254
+ <xsl:with-param name="continued">true</xsl:with-param>
6255
+ </xsl:apply-templates>
6256
+
6257
+
6258
+
6259
+
6260
+
6261
+
6141
6262
  </fo:table-cell>
6142
6263
  </fo:table-row>
6143
6264
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -6248,7 +6369,10 @@
6248
6369
 
6249
6370
 
6250
6371
  <!-- fn processing -->
6251
- <xsl:call-template name="table_fn_display"/>
6372
+
6373
+ <xsl:call-template name="table_fn_display"/>
6374
+
6375
+
6252
6376
 
6253
6377
  <!-- for PAS display Notes after footnotes -->
6254
6378
 
@@ -6258,6 +6382,9 @@
6258
6382
  </fo:table-body>
6259
6383
 
6260
6384
  </fo:table>
6385
+
6386
+
6387
+
6261
6388
  </xsl:if>
6262
6389
  </xsl:template><xsl:template match="*[local-name()='tbody']">
6263
6390
 
@@ -6346,6 +6473,9 @@
6346
6473
 
6347
6474
 
6348
6475
 
6476
+
6477
+
6478
+
6349
6479
 
6350
6480
 
6351
6481
  <xsl:call-template name="setTableRowAttributes"/>
@@ -6365,6 +6495,8 @@
6365
6495
 
6366
6496
 
6367
6497
 
6498
+
6499
+
6368
6500
  <xsl:call-template name="setTableRowAttributes"/>
6369
6501
  <xsl:apply-templates/>
6370
6502
  </fo:table-row>
@@ -6475,6 +6607,8 @@
6475
6607
 
6476
6608
 
6477
6609
 
6610
+
6611
+
6478
6612
 
6479
6613
 
6480
6614
 
@@ -6568,7 +6702,11 @@
6568
6702
 
6569
6703
  <xsl:variable name="gen_id" select="generate-id(.)"/>
6570
6704
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
6571
- <xsl:variable name="reference" select="@reference"/>
6705
+ <xsl:variable name="reference_">
6706
+ <xsl:value-of select="@reference"/>
6707
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
6708
+ </xsl:variable>
6709
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
6572
6710
  <!-- fn sequence number in document -->
6573
6711
  <xsl:variable name="current_fn_number">
6574
6712
  <xsl:choose>
@@ -6643,7 +6781,7 @@
6643
6781
  <xsl:copy-of select="node()"/>
6644
6782
  </fn>
6645
6783
  </xsl:for-each>
6646
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
6784
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
6647
6785
  <xsl:sort select="@displayorder" data-type="number"/>
6648
6786
  <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
6649
6787
  <!-- copy unique fn -->
@@ -8328,6 +8466,11 @@
8328
8466
  </xsl:variable>
8329
8467
  <fo:inline xsl:use-attribute-sets="link-style">
8330
8468
 
8469
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
8470
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8471
+ </xsl:if>
8472
+
8473
+
8331
8474
 
8332
8475
 
8333
8476
 
@@ -8604,7 +8747,19 @@
8604
8747
  <xsl:value-of select="$suffix"/>
8605
8748
  </xsl:if>
8606
8749
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
8607
- <fo:inline><xsl:apply-templates/></fo:inline>
8750
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
8751
+ <xsl:choose>
8752
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
8753
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
8754
+ <xsl:apply-templates/>
8755
+ </fo:inline>
8756
+ </xsl:when>
8757
+ <xsl:otherwise>
8758
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
8759
+ <xsl:apply-templates/>
8760
+ </fo:block>
8761
+ </xsl:otherwise>
8762
+ </xsl:choose>
8608
8763
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
8609
8764
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
8610
8765
  <fo:block id="{@id}">
@@ -9439,7 +9594,7 @@
9439
9594
  </xsl:choose>
9440
9595
  </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
9441
9596
  <xsl:value-of select="."/>
9442
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
9597
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
9443
9598
  <xsl:text> </xsl:text>
9444
9599
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
9445
9600
  <xsl:copy>
@@ -10298,6 +10453,7 @@
10298
10453
 
10299
10454
 
10300
10455
 
10456
+
10301
10457
  <xsl:choose>
10302
10458
  <xsl:when test="ancestor::bipm:annex">2</xsl:when>
10303
10459
  <xsl:otherwise>8</xsl:otherwise>
@@ -10922,7 +11078,7 @@
10922
11078
  <xsl:value-of select="bipm:docidentifier[@type='metanorma']"/>
10923
11079
  </xsl:when>
10924
11080
  <xsl:otherwise>
10925
- <xsl:number format="[1]"/>
11081
+ <xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
10926
11082
  </xsl:otherwise>
10927
11083
  </xsl:choose>
10928
11084
  </xsl:if>
@@ -11261,12 +11417,16 @@
11261
11417
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
11262
11418
 
11263
11419
 
11420
+
11421
+
11264
11422
 
11265
11423
 
11266
11424
 
11267
11425
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
11268
11426
 
11269
11427
 
11428
+
11429
+
11270
11430
  <fo:block xsl:use-attribute-sets="admonition-name-style">
11271
11431
  <xsl:call-template name="displayAdmonitionName"/>
11272
11432
  </fo:block>
@@ -11475,6 +11635,8 @@
11475
11635
  </xsl:when>
11476
11636
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
11477
11637
  </xsl:choose>
11638
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
11639
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
11478
11640
  </xsl:template><xsl:template name="printEdition">
11479
11641
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
11480
11642
  <xsl:text> </xsl:text>
@@ -11581,6 +11743,27 @@
11581
11743
  </xsl:when>
11582
11744
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
11583
11745
  </xsl:choose>
11746
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
11747
+ <xsl:param name="num"/>
11748
+ <xsl:variable name="monthStr">
11749
+ <xsl:choose>
11750
+ <xsl:when test="$num = '01'">january</xsl:when>
11751
+ <xsl:when test="$num = '02'">february</xsl:when>
11752
+ <xsl:when test="$num = '03'">march</xsl:when>
11753
+ <xsl:when test="$num = '04'">april</xsl:when>
11754
+ <xsl:when test="$num = '05'">may</xsl:when>
11755
+ <xsl:when test="$num = '06'">june</xsl:when>
11756
+ <xsl:when test="$num = '07'">july</xsl:when>
11757
+ <xsl:when test="$num = '08'">august</xsl:when>
11758
+ <xsl:when test="$num = '09'">september</xsl:when>
11759
+ <xsl:when test="$num = '10'">october</xsl:when>
11760
+ <xsl:when test="$num = '11'">november</xsl:when>
11761
+ <xsl:when test="$num = '12'">december</xsl:when>
11762
+ </xsl:choose>
11763
+ </xsl:variable>
11764
+ <xsl:call-template name="getLocalizedString">
11765
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
11766
+ </xsl:call-template>
11584
11767
  </xsl:template><xsl:template name="insertKeywords">
11585
11768
  <xsl:param name="sorting" select="'true'"/>
11586
11769
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -11780,6 +11963,7 @@
11780
11963
 
11781
11964
 
11782
11965
 
11966
+
11783
11967
 
11784
11968
 
11785
11969