metanorma-bipm 2.7.3 → 2.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -845,7 +845,7 @@
845
845
  <xsl:apply-templates select="preceding-sibling::mn:term_name[1]" mode="presentation"/>
846
846
  </fo:block>
847
847
  <fo:block xsl:use-attribute-sets="preferred-term-style">
848
- <xsl:call-template name="setStyle_preferred"/>
848
+ <xsl:call-template name="refine_preferred-term-style"/>
849
849
  <xsl:apply-templates/>
850
850
  </fo:block>
851
851
  </fo:block>
@@ -862,6 +862,7 @@
862
862
 
863
863
  <xsl:template match="mn:domain[not(parent::mn:term)]" priority="2">
864
864
  <fo:block xsl:use-attribute-sets="domain-style">
865
+ <xsl:call-template name="refine_domain-style"/>
865
866
  <fo:inline>
866
867
  <xsl:text>&lt;</xsl:text>
867
868
  <xsl:apply-templates/>
@@ -2183,6 +2184,7 @@
2183
2184
  <xsl:variable name="en_dash">–</xsl:variable>
2184
2185
  <xsl:variable name="em_dash">—</xsl:variable>
2185
2186
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2187
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
2186
2188
  <xsl:variable name="cr">&#13;</xsl:variable>
2187
2189
  <xsl:variable name="lf">
2188
2190
  </xsl:variable>
@@ -2725,6 +2727,7 @@
2725
2727
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
2726
2728
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
2727
2729
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2730
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2728
2731
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
2729
2732
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
2730
2733
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -2739,10 +2742,10 @@
2739
2742
 
2740
2743
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
2741
2744
 
2742
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
2745
+ <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
2743
2746
  <xsl:copy>
2744
2747
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2745
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
2748
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
2746
2749
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2747
2750
  </xsl:copy>
2748
2751
  </xsl:template>
@@ -3532,10 +3535,16 @@
3532
3535
  <xsl:attribute-set name="license-statement-style">
3533
3536
  </xsl:attribute-set> <!-- license-statement-style -->
3534
3537
 
3538
+ <xsl:template name="refine_license-statement-style">
3539
+ </xsl:template>
3540
+
3535
3541
  <xsl:attribute-set name="license-statement-title-style">
3536
3542
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3537
3543
  </xsl:attribute-set> <!-- license-statement-title-style -->
3538
3544
 
3545
+ <xsl:template name="refine_license-statement-title-style">
3546
+ </xsl:template>
3547
+
3539
3548
  <xsl:attribute-set name="license-statement-p-style">
3540
3549
  </xsl:attribute-set> <!-- license-statement-p-style -->
3541
3550
 
@@ -3546,23 +3555,47 @@
3546
3555
  <xsl:attribute-set name="legal-statement-style">
3547
3556
  </xsl:attribute-set> <!-- legal-statement-style -->
3548
3557
 
3558
+ <xsl:template name="refine_legal-statement-style">
3559
+ </xsl:template>
3560
+
3549
3561
  <xsl:attribute-set name="legal-statement-title-style">
3550
3562
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3551
3563
  </xsl:attribute-set> <!-- legal-statement-title-style -->
3552
3564
 
3565
+ <xsl:template name="refine_legal-statement-title-style">
3566
+ </xsl:template>
3567
+
3553
3568
  <xsl:attribute-set name="legal-statement-p-style">
3554
3569
  </xsl:attribute-set> <!-- legal-statement-p-style -->
3555
3570
 
3571
+ <xsl:template name="refine_legal-statement-p-style">
3572
+ <xsl:if test="@align">
3573
+ <xsl:attribute name="text-align">
3574
+ <xsl:value-of select="@align"/>
3575
+ </xsl:attribute>
3576
+ </xsl:if>
3577
+ </xsl:template>
3578
+
3556
3579
  <xsl:attribute-set name="feedback-statement-style">
3557
3580
  </xsl:attribute-set> <!-- feedback-statement-style -->
3558
3581
 
3582
+ <xsl:template name="refine_feedback-statement-style">
3583
+ </xsl:template>
3584
+
3559
3585
  <xsl:attribute-set name="feedback-statement-title-style">
3560
3586
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3561
3587
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3562
3588
 
3589
+ <xsl:template name="refine_feedback-statement-title-style">
3590
+
3591
+ </xsl:template>
3592
+
3563
3593
  <xsl:attribute-set name="feedback-statement-p-style">
3564
3594
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
3565
3595
 
3596
+ <xsl:template name="refine_feedback-statement-p-style">
3597
+ </xsl:template>
3598
+
3566
3599
  <!-- End boilerplate sections styles -->
3567
3600
 
3568
3601
  <!-- ================================= -->
@@ -3588,6 +3621,7 @@
3588
3621
 
3589
3622
  <xsl:template match="mn:license-statement">
3590
3623
  <fo:block xsl:use-attribute-sets="license-statement-style">
3624
+ <xsl:call-template name="refine_license-statement-style"/>
3591
3625
  <xsl:apply-templates/>
3592
3626
  </fo:block>
3593
3627
  </xsl:template> <!-- license-statement -->
@@ -3605,6 +3639,7 @@
3605
3639
  <xsl:template match="mn:legal-statement">
3606
3640
  <xsl:param name="isLegacy">false</xsl:param>
3607
3641
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3642
+ <xsl:call-template name="refine_legal-statement-style"/>
3608
3643
  <xsl:apply-templates/>
3609
3644
  </fo:block>
3610
3645
  </xsl:template> <!-- legal-statement -->
@@ -3774,6 +3809,27 @@
3774
3809
  <xsl:attribute-set name="sourcecode-container-style">
3775
3810
  </xsl:attribute-set>
3776
3811
 
3812
+ <xsl:template name="refine_sourcecode-container-style">
3813
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
3814
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3815
+ </xsl:if>
3816
+
3817
+ <xsl:if test="ancestor::mn:example">
3818
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3819
+ </xsl:if>
3820
+
3821
+ <xsl:copy-of select="@id"/>
3822
+
3823
+ <xsl:if test="parent::mn:note">
3824
+ <xsl:attribute name="margin-left">
3825
+ <xsl:choose>
3826
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
3827
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3828
+ </xsl:choose>
3829
+ </xsl:attribute>
3830
+ </xsl:if>
3831
+ </xsl:template>
3832
+
3777
3833
  <xsl:attribute-set name="sourcecode-style">
3778
3834
  <xsl:attribute name="white-space">pre</xsl:attribute>
3779
3835
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -3785,6 +3841,12 @@
3785
3841
  <xsl:template name="refine_sourcecode-style">
3786
3842
  </xsl:template> <!-- refine_sourcecode-style -->
3787
3843
 
3844
+ <xsl:attribute-set name="sourcecode-number-style">
3845
+ </xsl:attribute-set>
3846
+
3847
+ <xsl:template name="refine_sourcecode-number-style">
3848
+ </xsl:template>
3849
+
3788
3850
  <xsl:attribute-set name="sourcecode-name-style">
3789
3851
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3790
3852
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -3793,6 +3855,9 @@
3793
3855
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3794
3856
  </xsl:attribute-set> <!-- sourcecode-name-style -->
3795
3857
 
3858
+ <xsl:template name="refine_sourcecode-name-style">
3859
+ </xsl:template>
3860
+
3796
3861
  <xsl:template name="add-zero-spaces-equal">
3797
3862
  <xsl:param name="text" select="."/>
3798
3863
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -3880,24 +3945,8 @@
3880
3945
  <xsl:otherwise>
3881
3946
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
3882
3947
 
3883
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
3884
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3885
- </xsl:if>
3886
-
3887
- <xsl:if test="ancestor::mn:example">
3888
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3889
- </xsl:if>
3890
-
3891
- <xsl:copy-of select="@id"/>
3948
+ <xsl:call-template name="refine_sourcecode-container-style"/>
3892
3949
 
3893
- <xsl:if test="parent::mn:note">
3894
- <xsl:attribute name="margin-left">
3895
- <xsl:choose>
3896
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
3897
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3898
- </xsl:choose>
3899
- </xsl:attribute>
3900
- </xsl:if>
3901
3950
  <fo:block-container margin-left="0mm" role="SKIP">
3902
3951
 
3903
3952
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -4224,6 +4273,7 @@
4224
4273
  <xsl:template match="mn:sourcecode/mn:fmt-name">
4225
4274
  <xsl:if test="normalize-space() != ''">
4226
4275
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4276
+ <xsl:call-template name="refine_sourcecode-name-style"/>
4227
4277
  <xsl:apply-templates/>
4228
4278
  </fo:block>
4229
4279
  </xsl:if>
@@ -4271,12 +4321,31 @@
4271
4321
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4272
4322
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4273
4323
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4274
- </xsl:attribute-set>
4324
+ </xsl:attribute-set> <!-- pre-style -->
4325
+
4326
+ <xsl:template name="refine_pre-style">
4327
+ </xsl:template>
4275
4328
 
4276
4329
  <xsl:attribute-set name="tt-style">
4277
4330
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4278
4331
  </xsl:attribute-set>
4279
4332
 
4333
+ <xsl:template name="refine_tt-style">
4334
+ <xsl:variable name="_font-size"> <!-- inherit -->10
4335
+ </xsl:variable>
4336
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4337
+ <xsl:if test="$font-size != ''">
4338
+ <xsl:attribute name="font-size">
4339
+ <xsl:choose>
4340
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
4341
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
4342
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4343
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4344
+ </xsl:choose>
4345
+ </xsl:attribute>
4346
+ </xsl:if>
4347
+ </xsl:template>
4348
+
4280
4349
  <xsl:variable name="color-added-text">
4281
4350
  <xsl:text>rgb(0, 255, 0)</xsl:text>
4282
4351
  </xsl:variable>
@@ -4289,9 +4358,14 @@
4289
4358
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
4290
4359
  </xsl:attribute-set>
4291
4360
 
4361
+ <xsl:template name="refine_add-style">
4362
+ </xsl:template>
4363
+
4292
4364
  <xsl:variable name="add-style">
4293
- <add-style xsl:use-attribute-sets="add-style"/>
4294
- </xsl:variable>
4365
+ <add-style xsl:use-attribute-sets="add-style">
4366
+ <xsl:call-template name="refine_add-style"/>
4367
+ </add-style>
4368
+ </xsl:variable>
4295
4369
  <xsl:template name="append_add-style">
4296
4370
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
4297
4371
  </xsl:template>
@@ -4304,24 +4378,77 @@
4304
4378
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4305
4379
  </xsl:attribute-set>
4306
4380
 
4381
+ <xsl:template name="refine_del-style">
4382
+ </xsl:template>
4383
+
4384
+ <xsl:attribute-set name="strong-style">
4385
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4386
+ </xsl:attribute-set>
4387
+
4388
+ <xsl:template name="refine_strong_style">
4389
+ <xsl:if test="ancestor::*['preferred']">
4390
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4391
+ </xsl:if>
4392
+ </xsl:template> <!-- refine_strong_style -->
4393
+
4394
+ <xsl:attribute-set name="em-style">
4395
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4396
+ </xsl:attribute-set>
4397
+
4398
+ <xsl:template name="refine_em_style">
4399
+ </xsl:template> <!-- refine_em_style -->
4400
+
4401
+ <xsl:attribute-set name="sup-style">
4402
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4403
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4404
+ </xsl:attribute-set>
4405
+
4406
+ <xsl:template name="refine_sup-style">
4407
+ </xsl:template>
4408
+
4409
+ <xsl:attribute-set name="sub-style">
4410
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4411
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
4412
+ </xsl:attribute-set>
4413
+
4414
+ <xsl:template name="refine_sub-style">
4415
+ </xsl:template>
4416
+
4417
+ <xsl:attribute-set name="underline-style">
4418
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4419
+ </xsl:attribute-set>
4420
+
4421
+ <xsl:template name="refine_underline-style">
4422
+ </xsl:template>
4423
+
4424
+ <xsl:attribute-set name="hi-style">
4425
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
4426
+ </xsl:attribute-set>
4427
+
4428
+ <xsl:template name="refine_hi-style">
4429
+ </xsl:template>
4430
+
4431
+ <xsl:attribute-set name="strike-style">
4432
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4433
+ </xsl:attribute-set>
4434
+
4435
+ <xsl:template name="refine_strike-style">
4436
+ </xsl:template>
4437
+
4307
4438
  <xsl:template match="mn:br">
4308
4439
  <xsl:value-of select="$linebreak"/>
4309
4440
  </xsl:template>
4310
4441
 
4311
- <xsl:template match="mn:em">
4312
- <fo:inline font-style="italic">
4313
- <xsl:call-template name="refine_italic_style"/>
4442
+ <xsl:template match="mn:em">
4443
+ <fo:inline xsl:use-attribute-sets="em-style">
4444
+ <xsl:call-template name="refine_em_style"/>
4314
4445
  <xsl:apply-templates/>
4315
4446
  </fo:inline>
4316
4447
  </xsl:template>
4317
4448
 
4318
- <xsl:template name="refine_italic_style">
4319
- </xsl:template>
4320
-
4321
4449
  <xsl:template match="mn:strong | *[local-name()='b']">
4322
4450
  <xsl:param name="split_keep-within-line"/>
4323
- <fo:inline font-weight="bold">
4324
-
4451
+ <fo:inline xsl:use-attribute-sets="strong-style">
4325
4452
  <xsl:call-template name="refine_strong_style"/>
4326
4453
 
4327
4454
  <xsl:apply-templates>
@@ -4330,44 +4457,27 @@
4330
4457
  </fo:inline>
4331
4458
  </xsl:template>
4332
4459
 
4333
- <xsl:template name="refine_strong_style">
4334
- <xsl:if test="ancestor::*['preferred']">
4335
- <xsl:attribute name="role">SKIP</xsl:attribute>
4336
- </xsl:if>
4337
- </xsl:template>
4338
-
4339
4460
  <xsl:template match="*[local-name()='padding']">
4340
4461
  <fo:inline padding-right="{@value}"> </fo:inline>
4341
4462
  </xsl:template>
4342
4463
 
4343
4464
  <xsl:template match="mn:sup">
4344
- <fo:inline font-size="80%" vertical-align="super">
4465
+ <fo:inline xsl:use-attribute-sets="sup-style">
4466
+ <xsl:call-template name="refine_sup-style"/>
4345
4467
  <xsl:apply-templates/>
4346
4468
  </fo:inline>
4347
4469
  </xsl:template>
4348
4470
 
4349
4471
  <xsl:template match="mn:sub">
4350
- <fo:inline font-size="80%" vertical-align="sub">
4472
+ <fo:inline xsl:use-attribute-sets="sub-style">
4473
+ <xsl:call-template name="refine_sub-style"/>
4351
4474
  <xsl:apply-templates/>
4352
4475
  </fo:inline>
4353
4476
  </xsl:template>
4354
4477
 
4355
4478
  <xsl:template match="mn:tt">
4356
4479
  <fo:inline xsl:use-attribute-sets="tt-style">
4357
-
4358
- <xsl:variable name="_font-size"> <!-- inherit -->10
4359
- </xsl:variable>
4360
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4361
- <xsl:if test="$font-size != ''">
4362
- <xsl:attribute name="font-size">
4363
- <xsl:choose>
4364
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
4365
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
4366
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4367
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4368
- </xsl:choose>
4369
- </xsl:attribute>
4370
- </xsl:if>
4480
+ <xsl:call-template name="refine_tt-style"/>
4371
4481
  <xsl:apply-templates/>
4372
4482
  </fo:inline>
4373
4483
  </xsl:template> <!-- tt -->
@@ -4386,7 +4496,8 @@
4386
4496
  </xsl:template>
4387
4497
 
4388
4498
  <xsl:template match="mn:underline">
4389
- <fo:inline text-decoration="underline">
4499
+ <fo:inline xsl:use-attribute-sets="underline-style">
4500
+ <xsl:call-template name="refine_underline-style"/>
4390
4501
  <xsl:apply-templates/>
4391
4502
  </fo:inline>
4392
4503
  </xsl:template>
@@ -4544,6 +4655,7 @@
4544
4655
 
4545
4656
  <xsl:template match="mn:del">
4546
4657
  <fo:inline xsl:use-attribute-sets="del-style">
4658
+ <xsl:call-template name="refine_del-style"/>
4547
4659
  <xsl:apply-templates/>
4548
4660
  </fo:inline>
4549
4661
  </xsl:template>
@@ -4553,7 +4665,8 @@
4553
4665
 
4554
4666
  <!-- highlight text -->
4555
4667
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
4556
- <fo:inline background-color="yellow">
4668
+ <fo:inline xsl:use-attribute-sets="hi-style">
4669
+ <xsl:call-template name="refine_hi-style"/>
4557
4670
  <xsl:apply-templates/>
4558
4671
  </fo:inline>
4559
4672
  </xsl:template>
@@ -4639,7 +4752,8 @@
4639
4752
  </xsl:template>
4640
4753
 
4641
4754
  <xsl:template match="mn:strike">
4642
- <fo:inline text-decoration="line-through">
4755
+ <fo:inline xsl:use-attribute-sets="strike-style">
4756
+ <xsl:call-template name="refine_strike-style"/>
4643
4757
  <xsl:apply-templates/>
4644
4758
  </fo:inline>
4645
4759
  </xsl:template>
@@ -4719,6 +4833,7 @@
4719
4833
 
4720
4834
  <xsl:template match="mn:pre" name="pre">
4721
4835
  <fo:block xsl:use-attribute-sets="pre-style">
4836
+ <xsl:call-template name="refine_pre-style"/>
4722
4837
  <xsl:copy-of select="@id"/>
4723
4838
  <xsl:choose>
4724
4839
 
@@ -4749,22 +4864,40 @@
4749
4864
  <xsl:attribute-set name="permission-style">
4750
4865
  </xsl:attribute-set>
4751
4866
 
4867
+ <xsl:template name="refine_permission-style">
4868
+ </xsl:template>
4869
+
4752
4870
  <xsl:attribute-set name="permission-name-style">
4753
4871
  </xsl:attribute-set>
4754
4872
 
4873
+ <xsl:template name="refine_permission-name-style">
4874
+ </xsl:template>
4875
+
4755
4876
  <xsl:attribute-set name="permission-label-style">
4756
4877
  </xsl:attribute-set>
4757
4878
 
4879
+ <xsl:template name="refine_permission-label-style">
4880
+ </xsl:template>
4881
+
4758
4882
  <xsl:attribute-set name="requirement-style">
4759
4883
  </xsl:attribute-set>
4760
4884
 
4885
+ <xsl:template name="refine_requirement-style">
4886
+ </xsl:template>
4887
+
4761
4888
  <xsl:attribute-set name="requirement-name-style">
4762
4889
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4763
4890
  </xsl:attribute-set>
4764
4891
 
4892
+ <xsl:template name="refine_requirement-name-style">
4893
+ </xsl:template>
4894
+
4765
4895
  <xsl:attribute-set name="requirement-label-style">
4766
4896
  </xsl:attribute-set>
4767
4897
 
4898
+ <xsl:template name="refine_requirement-label-style">
4899
+ </xsl:template>
4900
+
4768
4901
  <xsl:attribute-set name="subject-style">
4769
4902
  </xsl:attribute-set>
4770
4903
 
@@ -4792,18 +4925,28 @@
4792
4925
  <xsl:attribute-set name="recommendation-style">
4793
4926
  </xsl:attribute-set>
4794
4927
 
4928
+ <xsl:template name="refine_recommendation-style">
4929
+ </xsl:template>
4930
+
4795
4931
  <xsl:attribute-set name="recommendation-name-style">
4796
4932
  </xsl:attribute-set>
4797
4933
 
4934
+ <xsl:template name="refine_recommendation-name-style">
4935
+ </xsl:template>
4936
+
4798
4937
  <xsl:attribute-set name="recommendation-label-style">
4799
4938
  </xsl:attribute-set>
4800
4939
 
4940
+ <xsl:template name="refine_recommendation-label-style">
4941
+ </xsl:template>
4942
+
4801
4943
  <!-- ========== -->
4802
4944
  <!-- permission -->
4803
4945
  <!-- ========== -->
4804
4946
  <xsl:template match="mn:permission">
4805
4947
  <xsl:call-template name="setNamedDestination"/>
4806
4948
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4949
+ <xsl:call-template name="refine_permission-style"/>
4807
4950
  <xsl:apply-templates select="mn:fmt-name"/>
4808
4951
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4809
4952
  </fo:block>
@@ -4812,6 +4955,7 @@
4812
4955
  <xsl:template match="mn:permission/mn:fmt-name">
4813
4956
  <xsl:if test="normalize-space() != ''">
4814
4957
  <fo:block xsl:use-attribute-sets="permission-name-style">
4958
+ <xsl:call-template name="refine_permission-name-style"/>
4815
4959
  <xsl:apply-templates/>
4816
4960
  </fo:block>
4817
4961
  </xsl:if>
@@ -4819,6 +4963,7 @@
4819
4963
 
4820
4964
  <xsl:template match="mn:permission/mn:label">
4821
4965
  <fo:block xsl:use-attribute-sets="permission-label-style">
4966
+ <xsl:call-template name="refine_permission-label-style"/>
4822
4967
  <xsl:apply-templates/>
4823
4968
  </fo:block>
4824
4969
  </xsl:template>
@@ -4831,6 +4976,7 @@
4831
4976
  <xsl:template match="mn:requirement">
4832
4977
  <xsl:call-template name="setNamedDestination"/>
4833
4978
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4979
+ <xsl:call-template name="refine_requirement-style"/>
4834
4980
  <xsl:apply-templates select="mn:fmt-name"/>
4835
4981
  <xsl:apply-templates select="mn:label"/>
4836
4982
  <xsl:apply-templates select="@obligation"/>
@@ -4843,6 +4989,7 @@
4843
4989
  <xsl:if test="normalize-space() != ''">
4844
4990
 
4845
4991
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4992
+ <xsl:call-template name="refine_requirement-name-style"/>
4846
4993
  <xsl:apply-templates/>
4847
4994
  </fo:block>
4848
4995
  </xsl:if>
@@ -4850,6 +4997,7 @@
4850
4997
 
4851
4998
  <xsl:template match="mn:requirement/mn:label">
4852
4999
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5000
+ <xsl:call-template name="refine_requirement-label-style"/>
4853
5001
  <xsl:apply-templates/>
4854
5002
  </fo:block>
4855
5003
  </xsl:template>
@@ -4875,6 +5023,7 @@
4875
5023
  <xsl:template match="mn:recommendation">
4876
5024
  <xsl:call-template name="setNamedDestination"/>
4877
5025
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5026
+ <xsl:call-template name="refine_recommendation-style"/>
4878
5027
  <xsl:apply-templates select="mn:fmt-name"/>
4879
5028
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4880
5029
  </fo:block>
@@ -4884,6 +5033,7 @@
4884
5033
  <xsl:if test="normalize-space() != ''">
4885
5034
 
4886
5035
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5036
+ <xsl:call-template name="refine_recommendation-name-style"/>
4887
5037
  <xsl:apply-templates/>
4888
5038
  </fo:block>
4889
5039
  </xsl:if>
@@ -4891,6 +5041,7 @@
4891
5041
 
4892
5042
  <xsl:template match="mn:recommendation/mn:label">
4893
5043
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5044
+ <xsl:call-template name="refine_recommendation-label-style"/>
4894
5045
  <xsl:apply-templates/>
4895
5046
  </fo:block>
4896
5047
  </xsl:template>
@@ -5072,37 +5223,73 @@
5072
5223
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
5073
5224
  </xsl:attribute-set> <!-- term-style -->
5074
5225
 
5226
+ <xsl:template name="refine_term-style">
5227
+ </xsl:template>
5228
+
5075
5229
  <xsl:attribute-set name="term-name-style">
5076
5230
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5077
5231
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5078
5232
  </xsl:attribute-set> <!-- term-name-style -->
5079
5233
 
5080
- <xsl:attribute-set name="preferred-block-style">
5234
+ <xsl:template name="refine_term-name-style">
5235
+ </xsl:template>
5236
+
5237
+ <xsl:attribute-set name="preferred-style">
5238
+ </xsl:attribute-set> <!-- preferred-style -->
5239
+
5240
+ <xsl:template name="refine_preferred-style">
5241
+ </xsl:template>
5242
+
5243
+ <xsl:attribute-set name="preferred-block-style">
5081
5244
  <xsl:attribute name="line-height">1.1</xsl:attribute>
5082
5245
  </xsl:attribute-set> <!-- preferred-block-style -->
5083
5246
 
5247
+ <xsl:template name="refine_preferred-block-style">
5248
+ </xsl:template>
5249
+
5084
5250
  <xsl:attribute-set name="preferred-term-style">
5085
5251
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5086
5252
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5087
5253
  </xsl:attribute-set> <!-- preferred-term-style -->
5088
5254
 
5255
+ <xsl:template name="refine_preferred-term-style">
5256
+ <xsl:if test="mn:strong">
5257
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5258
+ </xsl:if>
5259
+ </xsl:template>
5260
+
5089
5261
  <xsl:attribute-set name="domain-style">
5090
5262
  </xsl:attribute-set> <!-- domain-style -->
5091
5263
 
5264
+ <xsl:template name="refine_domain-style">
5265
+ </xsl:template>
5266
+
5092
5267
  <xsl:attribute-set name="admitted-style">
5093
5268
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5094
5269
  </xsl:attribute-set> <!-- admitted-style -->
5095
5270
 
5271
+ <xsl:template name="refine_admitted-style">
5272
+ </xsl:template>
5273
+
5096
5274
  <xsl:attribute-set name="deprecates-style">
5097
5275
  </xsl:attribute-set> <!-- deprecates-style -->
5098
5276
 
5277
+ <xsl:template name="refine_deprecates-style">
5278
+ </xsl:template>
5279
+
5099
5280
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5100
5281
  </xsl:attribute-set>
5101
5282
 
5283
+ <xsl:template name="refine_related-block-style">
5284
+ </xsl:template>
5285
+
5102
5286
  <xsl:attribute-set name="definition-style">
5103
5287
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5104
5288
  </xsl:attribute-set> <!-- definition-style -->
5105
5289
 
5290
+ <xsl:template name="refine_definition-style">
5291
+ </xsl:template>
5292
+
5106
5293
  <xsl:attribute-set name="termsource-style">
5107
5294
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
5108
5295
  </xsl:attribute-set> <!-- termsource-style -->
@@ -5113,9 +5300,15 @@
5113
5300
  <xsl:attribute-set name="termsource-text-style">
5114
5301
  </xsl:attribute-set> <!-- termsource-text-style -->
5115
5302
 
5303
+ <xsl:template name="refine_termsource-text-style">
5304
+ </xsl:template>
5305
+
5116
5306
  <xsl:attribute-set name="origin-style">
5117
5307
  </xsl:attribute-set> <!-- origin-style -->
5118
5308
 
5309
+ <xsl:template name="refine_origin-style">
5310
+ </xsl:template>
5311
+
5119
5312
  <!-- ====== -->
5120
5313
  <!-- term -->
5121
5314
  <!-- ====== -->
@@ -5131,9 +5324,8 @@
5131
5324
  <xsl:template match="mn:term">
5132
5325
  <xsl:call-template name="setNamedDestination"/>
5133
5326
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
5327
+ <xsl:call-template name="refine_term-style"/>
5134
5328
 
5135
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5136
- </xsl:if>
5137
5329
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5138
5330
  </fo:block>
5139
5331
  </xsl:template>
@@ -5209,6 +5401,7 @@
5209
5401
  <!-- text SOURCE: -->
5210
5402
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5211
5403
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5404
+ <xsl:call-template name="refine_termsource-text-style"/>
5212
5405
  <xsl:value-of select="."/>
5213
5406
  </fo:inline>
5214
5407
  </xsl:template>
@@ -5221,6 +5414,7 @@
5221
5414
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5222
5415
  </xsl:if>
5223
5416
  <fo:inline xsl:use-attribute-sets="origin-style">
5417
+ <xsl:call-template name="refine_origin-style"/>
5224
5418
  <xsl:apply-templates/>
5225
5419
  </fo:inline>
5226
5420
  </fo:basic-link>
@@ -5270,9 +5464,12 @@
5270
5464
  </xsl:variable>
5271
5465
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5272
5466
 
5467
+ <xsl:call-template name="refine_preferred-block-style"/>
5468
+
5273
5469
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5274
5470
 
5275
5471
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5472
+ <xsl:call-template name="refine_term-name-style"/>
5276
5473
 
5277
5474
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5278
5475
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -5283,7 +5480,7 @@
5283
5480
  </xsl:if>
5284
5481
 
5285
5482
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
5286
- <xsl:call-template name="setStyle_preferred"/>
5483
+ <xsl:call-template name="refine_preferred-term-style"/>
5287
5484
 
5288
5485
  <xsl:apply-templates/>
5289
5486
  </fo:block>
@@ -5304,22 +5501,18 @@
5304
5501
 
5305
5502
  <xsl:template match="mn:fmt-admitted">
5306
5503
  <fo:block xsl:use-attribute-sets="admitted-style">
5504
+ <xsl:call-template name="refine_admitted-style"/>
5307
5505
  <xsl:apply-templates/>
5308
5506
  </fo:block>
5309
5507
  </xsl:template>
5310
5508
 
5311
5509
  <xsl:template match="mn:fmt-deprecates">
5312
5510
  <fo:block xsl:use-attribute-sets="deprecates-style">
5511
+ <xsl:call-template name="refine_deprecates-style"/>
5313
5512
  <xsl:apply-templates/>
5314
5513
  </fo:block>
5315
5514
  </xsl:template>
5316
5515
 
5317
- <xsl:template name="setStyle_preferred">
5318
- <xsl:if test="mn:strong">
5319
- <xsl:attribute name="font-weight">normal</xsl:attribute>
5320
- </xsl:if>
5321
- </xsl:template>
5322
-
5323
5516
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5324
5517
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5325
5518
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -5329,6 +5522,7 @@
5329
5522
 
5330
5523
  <xsl:template match="mn:fmt-related">
5331
5524
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
5525
+ <xsl:call-template name="refine_related-block-style"/>
5332
5526
  <xsl:apply-templates/>
5333
5527
  </fo:block>
5334
5528
  </xsl:template>
@@ -5343,6 +5537,7 @@
5343
5537
  <!-- ========== -->
5344
5538
  <xsl:template match="mn:fmt-definition">
5345
5539
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5540
+ <xsl:call-template name="refine_definition-style"/>
5346
5541
  <xsl:apply-templates/>
5347
5542
  </fo:block>
5348
5543
  </xsl:template>
@@ -5394,6 +5589,9 @@
5394
5589
  <xsl:attribute-set name="example-body-style">
5395
5590
  </xsl:attribute-set> <!-- example-body-style -->
5396
5591
 
5592
+ <xsl:template name="refine_example-body-style">
5593
+ </xsl:template>
5594
+
5397
5595
  <xsl:attribute-set name="example-name-style">
5398
5596
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
5399
5597
  </xsl:attribute-set> <!-- example-name-style -->
@@ -5442,6 +5640,8 @@
5442
5640
  <xsl:when test="contains($element, 'block')">
5443
5641
  <fo:block xsl:use-attribute-sets="example-p-style">
5444
5642
 
5643
+ <xsl:call-template name="refine_example-p-style"/>
5644
+
5445
5645
  <xsl:apply-templates/>
5446
5646
  </fo:block>
5447
5647
  </xsl:when>
@@ -5493,6 +5693,7 @@
5493
5693
  </fo:block>
5494
5694
 
5495
5695
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5696
+ <xsl:call-template name="refine_example-body-style"/>
5496
5697
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5497
5698
  <xsl:variable name="example_body">
5498
5699
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -5555,6 +5756,7 @@
5555
5756
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5556
5757
  <!-- display further elements in blocks -->
5557
5758
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5759
+ <xsl:call-template name="refine_example-body-style"/>
5558
5760
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5559
5761
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5560
5762
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -5682,6 +5884,12 @@
5682
5884
  </xsl:if>
5683
5885
  </xsl:template> <!-- refine_table-style -->
5684
5886
 
5887
+ <xsl:attribute-set name="table-number-style">
5888
+ </xsl:attribute-set>
5889
+
5890
+ <xsl:template name="refine_table-number-style">
5891
+ </xsl:template>
5892
+
5685
5893
  <xsl:attribute-set name="table-name-style">
5686
5894
  <xsl:attribute name="role">Caption</xsl:attribute>
5687
5895
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -5819,6 +6027,9 @@
5819
6027
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
5820
6028
  </xsl:attribute-set> <!-- table-fn-number-style -->
5821
6029
 
6030
+ <xsl:template name="refine_table-fn-number-style">
6031
+ </xsl:template>
6032
+
5822
6033
  <xsl:attribute-set name="table-fmt-fn-label-style">
5823
6034
  <xsl:attribute name="font-size">80%</xsl:attribute>
5824
6035
  <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
@@ -5827,30 +6038,12 @@
5827
6038
  <xsl:template name="refine_table-fmt-fn-label-style">
5828
6039
  </xsl:template>
5829
6040
 
5830
- <xsl:attribute-set name="fn-container-body-style">
5831
- <xsl:attribute name="text-indent">0</xsl:attribute>
5832
- <xsl:attribute name="start-indent">0</xsl:attribute>
5833
- </xsl:attribute-set>
5834
-
5835
6041
  <xsl:attribute-set name="table-fn-body-style">
5836
6042
  </xsl:attribute-set>
5837
6043
 
5838
- <xsl:attribute-set name="figure-fn-number-style">
5839
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
5840
- </xsl:attribute-set> <!-- figure-fn-number-style -->
5841
-
5842
- <xsl:attribute-set name="figure-fmt-fn-label-style">
5843
- <xsl:attribute name="font-size">80%</xsl:attribute>
5844
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5845
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
5846
-
5847
- <xsl:template name="refine_figure-fmt-fn-label-style">
6044
+ <xsl:template name="refine_table-fn-body-style">
5848
6045
  </xsl:template>
5849
6046
 
5850
- <xsl:attribute-set name="figure-fn-body-style">
5851
- <xsl:attribute name="text-align">justify</xsl:attribute>
5852
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5853
- </xsl:attribute-set>
5854
6047
  <!-- ========================== -->
5855
6048
  <!-- END Table styles -->
5856
6049
  <!-- ========================== -->
@@ -6166,7 +6359,7 @@
6166
6359
 
6167
6360
  </fo:block>
6168
6361
 
6169
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
6362
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
6170
6363
  <xsl:if test="$continued = 'true'">
6171
6364
 
6172
6365
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -7175,6 +7368,7 @@
7175
7368
  </xsl:apply-templates>
7176
7369
 
7177
7370
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
7371
+ <xsl:call-template name="refine_table-fn-body-style"/>
7178
7372
  <!-- <xsl:copy-of select="./node()"/> -->
7179
7373
  <xsl:apply-templates/>
7180
7374
  </fo:inline>
@@ -7193,6 +7387,7 @@
7193
7387
  <xsl:param name="process">false</xsl:param>
7194
7388
  <xsl:if test="$process = 'true'">
7195
7389
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
7390
+ <xsl:call-template name="refine_table-fn-number-style"/>
7196
7391
 
7197
7392
  <!-- tab is padding-right -->
7198
7393
  <xsl:apply-templates select=".//mn:tab">
@@ -8064,9 +8259,18 @@
8064
8259
  <xsl:attribute-set name="dl-block-style">
8065
8260
  </xsl:attribute-set>
8066
8261
 
8262
+ <xsl:template name="refine_dl-block-style">
8263
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
8264
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
8265
+ </xsl:if>
8266
+ </xsl:template>
8267
+
8067
8268
  <xsl:attribute-set name="dt-row-style">
8068
8269
  </xsl:attribute-set>
8069
8270
 
8271
+ <xsl:template name="refine_dt-row-style">
8272
+ </xsl:template>
8273
+
8070
8274
  <xsl:attribute-set name="dt-cell-style">
8071
8275
  </xsl:attribute-set>
8072
8276
 
@@ -8086,6 +8290,9 @@
8086
8290
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8087
8291
  </xsl:attribute-set> <!-- dl-name-style -->
8088
8292
 
8293
+ <xsl:template name="refine_dl-name-style">
8294
+ </xsl:template>
8295
+
8089
8296
  <xsl:attribute-set name="dd-cell-style">
8090
8297
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
8091
8298
  </xsl:attribute-set>
@@ -8124,9 +8331,7 @@
8124
8331
  <!-- <dl><xsl:copy-of select="."/></dl> -->
8125
8332
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
8126
8333
 
8127
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
8128
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
8129
- </xsl:if>
8334
+ <xsl:call-template name="refine_dl-block-style"/>
8130
8335
 
8131
8336
  <xsl:call-template name="setBlockSpanAll"/>
8132
8337
  <xsl:if test="not(ancestor::mn:quote)">
@@ -8429,6 +8634,8 @@
8429
8634
  <xsl:if test="$process = 'true'">
8430
8635
  <fo:block xsl:use-attribute-sets="dl-name-style">
8431
8636
 
8637
+ <xsl:call-template name="refine_dl-name-style"/>
8638
+
8432
8639
  <xsl:apply-templates/>
8433
8640
  </fo:block>
8434
8641
  </xsl:if>
@@ -8617,6 +8824,8 @@
8617
8824
  <xsl:param name="split_keep-within-line"/>
8618
8825
 
8619
8826
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
8827
+ <xsl:call-template name="refine_dt-row-style"/>
8828
+
8620
8829
  <xsl:call-template name="insert_dt_cell">
8621
8830
  <xsl:with-param name="key_iso" select="$key_iso"/>
8622
8831
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -8830,18 +9039,25 @@
8830
9039
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
8831
9040
  </xsl:attribute-set>
8832
9041
 
9042
+ <xsl:template name="refine_appendix-style">
9043
+ </xsl:template>
9044
+
8833
9045
  <xsl:attribute-set name="appendix-example-style">
8834
9046
  <xsl:attribute name="font-size">10pt</xsl:attribute>
8835
9047
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
8836
9048
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
8837
9049
  </xsl:attribute-set>
8838
9050
 
9051
+ <xsl:template name="refine_appendix-example-style">
9052
+ </xsl:template>
9053
+
8839
9054
  <!-- ======================== -->
8840
9055
  <!-- Appendix processing -->
8841
9056
  <!-- ======================== -->
8842
9057
  <xsl:template match="mn:appendix">
8843
9058
  <xsl:call-template name="setNamedDestination"/>
8844
9059
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
9060
+ <xsl:call-template name="refine_appendix-style"/>
8845
9061
  <xsl:apply-templates select="mn:fmt-title"/>
8846
9062
  </fo:block>
8847
9063
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -8860,6 +9076,7 @@
8860
9076
  <xsl:template match="mn:appendix//mn:example" priority="2">
8861
9077
  <xsl:call-template name="setNamedDestination"/>
8862
9078
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
9079
+ <xsl:call-template name="refine_appendix-example-style"/>
8863
9080
  <xsl:apply-templates select="mn:fmt-name"/>
8864
9081
  </fo:block>
8865
9082
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -8868,7 +9085,16 @@
8868
9085
  <xsl:attribute-set name="xref-style">
8869
9086
  <xsl:attribute name="color">blue</xsl:attribute>
8870
9087
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
8871
- </xsl:attribute-set>
9088
+ </xsl:attribute-set> <!-- xref-style -->
9089
+
9090
+ <xsl:template name="refine_xref-style">
9091
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
9092
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9093
+ </xsl:if>
9094
+ <xsl:if test="parent::mn:add">
9095
+ <xsl:call-template name="append_add-style"/>
9096
+ </xsl:if>
9097
+ </xsl:template> <!-- refine_xref-style -->
8872
9098
 
8873
9099
  <xsl:template match="mn:fmt-xref">
8874
9100
  <xsl:call-template name="insert_basic_link">
@@ -8877,12 +9103,8 @@
8877
9103
  <xsl:call-template name="getAltText"/>
8878
9104
  </xsl:variable>
8879
9105
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
8880
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
8881
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8882
- </xsl:if>
8883
- <xsl:if test="parent::mn:add">
8884
- <xsl:call-template name="append_add-style"/>
8885
- </xsl:if>
9106
+ <xsl:call-template name="refine_xref-style"/>
9107
+
8886
9108
  <xsl:apply-templates/>
8887
9109
  </fo:basic-link>
8888
9110
  </xsl:with-param>
@@ -8993,21 +9215,21 @@
8993
9215
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
8994
9216
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
8995
9217
  <xsl:attribute name="text-align">justify</xsl:attribute>
8996
- </xsl:attribute-set>
9218
+ </xsl:attribute-set> <!-- note-style -->
8997
9219
 
8998
9220
  <xsl:template name="refine_note-style">
8999
9221
  <xsl:if test="parent::mn:references">
9000
9222
  <xsl:attribute name="margin-top">2pt</xsl:attribute>
9001
9223
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
9002
9224
  </xsl:if>
9003
- </xsl:template>
9225
+ </xsl:template> <!-- refine_note-style -->
9004
9226
 
9005
9227
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
9006
9228
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
9007
9229
 
9008
9230
  <xsl:attribute-set name="note-name-style">
9009
9231
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
9010
- </xsl:attribute-set>
9232
+ </xsl:attribute-set> <!-- note-name-style -->
9011
9233
 
9012
9234
  <xsl:template name="refine_note-name-style">
9013
9235
  </xsl:template> <!-- refine_note-name-style -->
@@ -9022,20 +9244,23 @@
9022
9244
  <xsl:attribute-set name="note-p-style">
9023
9245
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
9024
9246
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9025
- </xsl:attribute-set>
9247
+ </xsl:attribute-set> <!-- note-p-style -->
9248
+
9249
+ <xsl:template name="refine_note-p-style">
9250
+ </xsl:template>
9026
9251
 
9027
9252
  <xsl:attribute-set name="termnote-style">
9028
9253
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9029
9254
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
9030
9255
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
9031
9256
  <xsl:attribute name="text-align">justify</xsl:attribute>
9032
- </xsl:attribute-set>
9257
+ </xsl:attribute-set> <!-- termnote-style -->
9033
9258
 
9034
9259
  <xsl:template name="refine_termnote-style">
9035
9260
  </xsl:template> <!-- refine_termnote-style -->
9036
9261
 
9037
9262
  <xsl:attribute-set name="termnote-name-style">
9038
- </xsl:attribute-set>
9263
+ </xsl:attribute-set> <!-- termnote-name-style -->
9039
9264
 
9040
9265
  <xsl:template name="refine_termnote-name-style">
9041
9266
  </xsl:template>
@@ -9043,6 +9268,9 @@
9043
9268
  <xsl:attribute-set name="termnote-p-style">
9044
9269
  </xsl:attribute-set>
9045
9270
 
9271
+ <xsl:template name="refine_termnote-p-style">
9272
+ </xsl:template>
9273
+
9046
9274
  <!-- ====== -->
9047
9275
  <!-- note -->
9048
9276
  <!-- termnote -->
@@ -9103,11 +9331,13 @@
9103
9331
  <xsl:choose>
9104
9332
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
9105
9333
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
9334
+ <xsl:call-template name="refine_note-p-style"/>
9106
9335
  <xsl:apply-templates/>
9107
9336
  </fo:inline>
9108
9337
  </xsl:when>
9109
9338
  <xsl:otherwise>
9110
9339
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
9340
+ <xsl:call-template name="refine_note-p-style"/>
9111
9341
  <xsl:apply-templates/>
9112
9342
  </fo:block>
9113
9343
  </xsl:otherwise>
@@ -9199,11 +9429,13 @@
9199
9429
  <xsl:choose>
9200
9430
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
9201
9431
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
9432
+ <xsl:call-template name="refine_termnote-p-style"/>
9202
9433
  <xsl:apply-templates/>
9203
9434
  </fo:inline>
9204
9435
  </xsl:when>
9205
9436
  <xsl:otherwise>
9206
9437
  <fo:block xsl:use-attribute-sets="termnote-p-style">
9438
+ <xsl:call-template name="refine_termnote-p-style"/>
9207
9439
  <xsl:apply-templates/>
9208
9440
  </fo:block>
9209
9441
  </xsl:otherwise>
@@ -9219,7 +9451,7 @@
9219
9451
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
9220
9452
  <xsl:attribute name="font-style">italic</xsl:attribute>
9221
9453
  <xsl:attribute name="text-align">justify</xsl:attribute>
9222
- </xsl:attribute-set>
9454
+ </xsl:attribute-set> <!-- quote-style -->
9223
9455
 
9224
9456
  <xsl:template name="refine_quote-style">
9225
9457
  <xsl:if test="ancestor::mn:boilerplate">
@@ -9233,6 +9465,9 @@
9233
9465
  <xsl:attribute name="text-align">right</xsl:attribute>
9234
9466
  </xsl:attribute-set>
9235
9467
 
9468
+ <xsl:template name="refine_quote-source-style">
9469
+ </xsl:template>
9470
+
9236
9471
  <!-- ====== -->
9237
9472
  <!-- quote -->
9238
9473
  <!-- source -->
@@ -9264,6 +9499,7 @@
9264
9499
  </fo:block-container>
9265
9500
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9266
9501
  <fo:block xsl:use-attribute-sets="quote-source-style">
9502
+ <xsl:call-template name="refine_quote-source-style"/>
9267
9503
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9268
9504
  <xsl:apply-templates select="mn:author"/>
9269
9505
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -9326,6 +9562,15 @@
9326
9562
  <xsl:attribute-set name="figure-style">
9327
9563
  </xsl:attribute-set>
9328
9564
 
9565
+ <xsl:template name="refine_figure-style">
9566
+ </xsl:template>
9567
+
9568
+ <xsl:attribute-set name="figure-number-style">
9569
+ </xsl:attribute-set>
9570
+
9571
+ <xsl:template name="refine_figure-number-style">
9572
+ </xsl:template>
9573
+
9329
9574
  <xsl:attribute-set name="figure-name-style">
9330
9575
  <xsl:attribute name="role">Caption</xsl:attribute>
9331
9576
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -9333,7 +9578,7 @@
9333
9578
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
9334
9579
  <xsl:attribute name="space-after">12pt</xsl:attribute>
9335
9580
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
9336
- </xsl:attribute-set>
9581
+ </xsl:attribute-set> <!-- figure-name-style -->
9337
9582
 
9338
9583
  <xsl:template name="refine_figure-name-style">
9339
9584
  </xsl:template> <!-- refine_figure-name-style -->
@@ -9341,7 +9586,7 @@
9341
9586
  <xsl:attribute-set name="image-style">
9342
9587
  <xsl:attribute name="role">SKIP</xsl:attribute>
9343
9588
  <xsl:attribute name="text-align">center</xsl:attribute>
9344
- </xsl:attribute-set>
9589
+ </xsl:attribute-set> <!-- image-style -->
9345
9590
 
9346
9591
  <xsl:template name="refine_image-style">
9347
9592
  </xsl:template>
@@ -9351,14 +9596,51 @@
9351
9596
  <xsl:attribute name="content-height">100%</xsl:attribute>
9352
9597
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9353
9598
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
9354
- </xsl:attribute-set>
9599
+ </xsl:attribute-set> <!-- image-graphic-style -->
9600
+
9601
+ <xsl:template name="refine_image-graphic-style">
9602
+ </xsl:template>
9355
9603
 
9356
9604
  <xsl:attribute-set name="figure-source-style">
9357
9605
  </xsl:attribute-set>
9358
9606
 
9607
+ <xsl:template name="refine_figure-source-style">
9608
+ </xsl:template>
9609
+
9359
9610
  <xsl:attribute-set name="figure-pseudocode-p-style">
9360
9611
  </xsl:attribute-set>
9361
9612
 
9613
+ <xsl:template name="refine_figure-pseudocode-p-style">
9614
+ </xsl:template>
9615
+
9616
+ <xsl:attribute-set name="figure-fn-number-style">
9617
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
9618
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
9619
+
9620
+ <xsl:template name="refine_figure-fn-number-style">
9621
+ </xsl:template>
9622
+
9623
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
9624
+ <xsl:attribute name="font-size">80%</xsl:attribute>
9625
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
9626
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
9627
+
9628
+ <xsl:template name="refine_figure-fmt-fn-label-style">
9629
+ </xsl:template>
9630
+
9631
+ <xsl:attribute-set name="figure-fn-body-style">
9632
+ <xsl:attribute name="text-align">justify</xsl:attribute>
9633
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9634
+ </xsl:attribute-set>
9635
+
9636
+ <xsl:template name="refine_figure-fn-body-style">
9637
+ <xsl:variable name="key_iso">true
9638
+ </xsl:variable>
9639
+ <xsl:if test="normalize-space($key_iso) = 'true'">
9640
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
9641
+ </xsl:if>
9642
+ </xsl:template>
9643
+
9362
9644
  <!-- ============================ -->
9363
9645
  <!-- figure's footnotes rendering -->
9364
9646
  <!-- ============================ -->
@@ -9471,9 +9753,8 @@
9471
9753
  </fo:table-cell>
9472
9754
  <fo:table-cell>
9473
9755
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
9474
- <xsl:if test="normalize-space($key_iso) = 'true'">
9475
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
9476
- </xsl:if>
9756
+ <xsl:call-template name="refine_figure-fn-body-style"/>
9757
+
9477
9758
  <!-- <xsl:copy-of select="./node()"/> -->
9478
9759
  <xsl:apply-templates/>
9479
9760
  </fo:block>
@@ -9491,6 +9772,7 @@
9491
9772
  <xsl:param name="process">false</xsl:param>
9492
9773
  <xsl:if test="$process = 'true'">
9493
9774
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
9775
+ <xsl:call-template name="refine_figure-fn-number-style"/>
9494
9776
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
9495
9777
 
9496
9778
  <!-- tab is padding-right -->
@@ -9528,6 +9810,7 @@
9528
9810
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9529
9811
  </xsl:if>
9530
9812
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
9813
+ <xsl:call-template name="refine_figure-fn-number-style"/>
9531
9814
  <!-- <xsl:value-of select="@reference"/> -->
9532
9815
  <xsl:apply-templates/>
9533
9816
  </fo:inline>
@@ -9575,6 +9858,8 @@
9575
9858
 
9576
9859
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9577
9860
 
9861
+ <xsl:call-template name="refine_figure-style"/>
9862
+
9578
9863
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9579
9864
  <xsl:call-template name="setIDforNamedDestination"/>
9580
9865
  </xsl:for-each>
@@ -9618,6 +9903,7 @@
9618
9903
 
9619
9904
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
9620
9905
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
9906
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
9621
9907
  <xsl:apply-templates/>
9622
9908
  </fo:block>
9623
9909
  </xsl:template>
@@ -9747,6 +10033,8 @@
9747
10033
  </xsl:variable>
9748
10034
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
9749
10035
 
10036
+ <xsl:call-template name="refine_image-graphic-style"/>
10037
+
9750
10038
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
9751
10039
  <xsl:variable name="scale">
9752
10040
  <xsl:call-template name="getImageScale">
@@ -10446,6 +10734,9 @@
10446
10734
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10447
10735
  </xsl:attribute-set> <!-- formula-style -->
10448
10736
 
10737
+ <xsl:template name="refine_formula-style">
10738
+ </xsl:template>
10739
+
10449
10740
  <xsl:attribute-set name="formula-stem-block-style">
10450
10741
  <xsl:attribute name="text-align">center</xsl:attribute>
10451
10742
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -10517,6 +10808,8 @@
10517
10808
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10518
10809
  <fo:block xsl:use-attribute-sets="formula-style">
10519
10810
 
10811
+ <xsl:call-template name="refine_formula-style"/>
10812
+
10520
10813
  <fo:table table-layout="fixed" width="100%">
10521
10814
  <fo:table-column column-width="95%"/>
10522
10815
  <fo:table-column column-width="5%"/>
@@ -10944,6 +11237,9 @@
10944
11237
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10945
11238
  </xsl:attribute-set> <!-- list-name-style -->
10946
11239
 
11240
+ <xsl:template name="refine_list-name-style">
11241
+ </xsl:template>
11242
+
10947
11243
  <xsl:attribute-set name="list-item-style">
10948
11244
  </xsl:attribute-set>
10949
11245
 
@@ -11242,6 +11538,7 @@
11242
11538
  <xsl:param name="process">false</xsl:param>
11243
11539
  <xsl:if test="$process = 'true'">
11244
11540
  <fo:block xsl:use-attribute-sets="list-name-style">
11541
+ <xsl:call-template name="refine_list-name-style"/>
11245
11542
  <xsl:apply-templates/>
11246
11543
  </fo:block>
11247
11544
  </xsl:if>
@@ -11302,28 +11599,49 @@
11302
11599
  <!-- END Lists processing -->
11303
11600
  <!-- ===================================== -->
11304
11601
 
11602
+ <xsl:attribute-set name="footnote-separator-leader-style">
11603
+ </xsl:attribute-set>
11604
+
11605
+ <xsl:template name="refine_footnote-separator-leader-style">
11606
+ </xsl:template>
11607
+
11608
+ <xsl:attribute-set name="fn-container-body-style">
11609
+ <xsl:attribute name="text-indent">0</xsl:attribute>
11610
+ <xsl:attribute name="start-indent">0</xsl:attribute>
11611
+ </xsl:attribute-set>
11612
+
11613
+ <xsl:template name="refine_fn-container-body-style">
11614
+ </xsl:template>
11615
+
11305
11616
  <xsl:attribute-set name="fn-reference-style">
11306
11617
  <xsl:attribute name="font-size">80%</xsl:attribute>
11307
11618
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11308
-
11309
- </xsl:attribute-set>
11619
+ </xsl:attribute-set> <!-- fn-reference-style -->
11310
11620
 
11311
11621
  <xsl:template name="refine_fn-reference-style">
11312
11622
  <xsl:if test="ancestor::*[local-name()='table']">
11313
11623
  <xsl:attribute name="font-weight">normal</xsl:attribute>
11314
11624
  <xsl:attribute name="baseline-shift">15%</xsl:attribute>
11315
11625
  </xsl:if>
11626
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11627
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11316
11628
  </xsl:template> <!-- refine_fn-reference-style -->
11317
11629
 
11318
11630
  <xsl:attribute-set name="fn-style">
11319
11631
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11320
11632
  </xsl:attribute-set>
11321
11633
 
11634
+ <xsl:template name="refine_fn-style">
11635
+ </xsl:template>
11636
+
11322
11637
  <xsl:attribute-set name="fn-num-style">
11323
11638
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11324
11639
  <xsl:attribute name="font-size">65%</xsl:attribute>
11325
11640
  <xsl:attribute name="vertical-align">super</xsl:attribute>
11326
- </xsl:attribute-set>
11641
+ </xsl:attribute-set> <!-- fn-num-style -->
11642
+
11643
+ <xsl:template name="refine_fn-num-style">
11644
+ </xsl:template>
11327
11645
 
11328
11646
  <xsl:attribute-set name="fn-body-style">
11329
11647
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -11334,7 +11652,7 @@
11334
11652
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11335
11653
  <xsl:attribute name="line-height">124%</xsl:attribute>
11336
11654
  <xsl:attribute name="text-align">justify</xsl:attribute>
11337
- </xsl:attribute-set>
11655
+ </xsl:attribute-set> <!-- fn-body-style" -->
11338
11656
 
11339
11657
  <xsl:template name="refine_fn-body-style">
11340
11658
  </xsl:template> <!-- refine_fn-body-style -->
@@ -11399,10 +11717,12 @@
11399
11717
  <xsl:choose>
11400
11718
  <xsl:when test="ancestor::mn:bibitem">
11401
11719
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
11720
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
11402
11721
  </fn_styles>
11403
11722
  </xsl:when>
11404
11723
  <xsl:otherwise>
11405
11724
  <fn_styles xsl:use-attribute-sets="fn-num-style">
11725
+ <xsl:call-template name="refine_fn-num-style"/>
11406
11726
  </fn_styles>
11407
11727
  </xsl:otherwise>
11408
11728
  </xsl:choose>
@@ -11412,9 +11732,12 @@
11412
11732
  <xsl:copy-of select="."/>
11413
11733
  </xsl:for-each>
11414
11734
 
11415
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11735
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11736
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11416
11737
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11417
- </xsl:if>
11738
+ </xsl:if> -->
11739
+
11740
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11418
11741
 
11419
11742
  <xsl:call-template name="insert_basic_link">
11420
11743
  <xsl:with-param name="element">
@@ -11437,10 +11760,12 @@
11437
11760
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
11438
11761
 
11439
11762
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
11763
+ <xsl:call-template name="refine_fn-style"/>
11440
11764
  <xsl:copy-of select="$footnote_inline"/>
11441
11765
  <fo:footnote-body role="Note">
11442
11766
 
11443
11767
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
11768
+ <xsl:call-template name="refine_fn-container-body-style"/>
11444
11769
 
11445
11770
  <xsl:variable name="fn_block">
11446
11771
  <xsl:call-template name="refine_fn-body-style"/>
@@ -11539,17 +11864,30 @@
11539
11864
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11540
11865
  </xsl:attribute-set> <!-- admonition-style -->
11541
11866
 
11867
+ <xsl:template name="refine_admonition-style">
11868
+ </xsl:template>
11869
+
11542
11870
  <xsl:attribute-set name="admonition-container-style">
11543
11871
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
11544
11872
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
11545
11873
  </xsl:attribute-set> <!-- admonition-container-style -->
11546
11874
 
11875
+ <xsl:template name="refine_admonition-container-style">
11876
+ </xsl:template>
11877
+
11547
11878
  <xsl:attribute-set name="admonition-name-style">
11548
11879
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
11549
11880
  </xsl:attribute-set> <!-- admonition-name-style -->
11550
11881
 
11882
+ <xsl:template name="refine_admonition-name-style">
11883
+ </xsl:template>
11884
+
11551
11885
  <xsl:attribute-set name="admonition-p-style">
11552
11886
  </xsl:attribute-set> <!-- admonition-p-style -->
11887
+
11888
+ <xsl:template name="refine_admonition-p-style">
11889
+ </xsl:template>
11890
+
11553
11891
  <!-- end admonition -->
11554
11892
 
11555
11893
  <!-- ================ -->
@@ -11558,6 +11896,8 @@
11558
11896
  <xsl:template match="mn:admonition">
11559
11897
  <fo:block xsl:use-attribute-sets="admonition-style">
11560
11898
 
11899
+ <xsl:call-template name="refine_admonition-style"/>
11900
+
11561
11901
  <xsl:call-template name="setBlockSpanAll"/>
11562
11902
 
11563
11903
  <xsl:if test="@type = 'editorial'">
@@ -11625,6 +11965,7 @@
11625
11965
 
11626
11966
  <xsl:template match="mn:admonition/mn:p">
11627
11967
  <fo:block xsl:use-attribute-sets="admonition-p-style">
11968
+ <xsl:call-template name="refine_admonition-p-style"/>
11628
11969
 
11629
11970
  <xsl:apply-templates/>
11630
11971
  </fo:block>
@@ -11634,11 +11975,21 @@
11634
11975
  <!-- END Admonition -->
11635
11976
  <!-- ================ -->
11636
11977
 
11978
+ <xsl:attribute-set name="references-non-normative-title-style">
11979
+ </xsl:attribute-set>
11980
+
11981
+ <xsl:template name="refine_references-non-normative-title-style">
11982
+
11983
+ </xsl:template>
11984
+
11637
11985
  <!-- bibitem in Normative References (references/@normative="true") -->
11638
11986
  <xsl:attribute-set name="bibitem-normative-style">
11639
11987
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11640
11988
  </xsl:attribute-set> <!-- bibitem-normative-style -->
11641
11989
 
11990
+ <xsl:template name="refine_bibitem-normative-style">
11991
+ </xsl:template>
11992
+
11642
11993
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
11643
11994
  <xsl:attribute-set name="bibitem-normative-list-style">
11644
11995
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -11646,9 +11997,15 @@
11646
11997
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11647
11998
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
11648
11999
 
12000
+ <xsl:template name="refine_bibitem-normative-list-style">
12001
+ </xsl:template>
12002
+
11649
12003
  <xsl:attribute-set name="bibitem-non-normative-style">
11650
12004
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
11651
12005
 
12006
+ <xsl:template name="refine_bibitem-non-normative-style">
12007
+ </xsl:template>
12008
+
11652
12009
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
11653
12010
  <xsl:attribute-set name="bibitem-non-normative-list-style">
11654
12011
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -11656,18 +12013,30 @@
11656
12013
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11657
12014
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
11658
12015
 
12016
+ <xsl:template name="refine_bibitem-non-normative-list-style">
12017
+ </xsl:template>
12018
+
11659
12019
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
11660
12020
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11661
12021
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11662
12022
  </xsl:attribute-set>
11663
12023
 
12024
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
12025
+ </xsl:template>
12026
+
11664
12027
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
11665
12028
  <xsl:attribute-set name="bibitem-normative-list-body-style">
11666
12029
  </xsl:attribute-set>
11667
12030
 
12031
+ <xsl:template name="refine_bibitem-normative-list-body-style">
12032
+ </xsl:template>
12033
+
11668
12034
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
11669
12035
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
11670
12036
 
12037
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
12038
+ </xsl:template>
12039
+
11671
12040
  <!-- footnote reference number for bibitem, in the text -->
11672
12041
  <xsl:attribute-set name="bibitem-note-fn-style">
11673
12042
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -11676,6 +12045,9 @@
11676
12045
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
11677
12046
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
11678
12047
 
12048
+ <xsl:template name="refine_bibitem-note-fn-style">
12049
+ </xsl:template>
12050
+
11679
12051
  <!-- footnote number on the page bottom -->
11680
12052
  <xsl:attribute-set name="bibitem-note-fn-number-style">
11681
12053
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -11694,6 +12066,9 @@
11694
12066
  <xsl:attribute-set name="references-non-normative-style">
11695
12067
  </xsl:attribute-set> <!-- references-non-normative-style -->
11696
12068
 
12069
+ <xsl:template name="refine_references-non-normative-style">
12070
+ </xsl:template>
12071
+
11697
12072
  <!-- ======================= -->
11698
12073
  <!-- Bibliography rendering -->
11699
12074
  <!-- ======================= -->
@@ -11735,6 +12110,7 @@
11735
12110
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11736
12111
 
11737
12112
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
12113
+ <xsl:call-template name="refine_references-non-normative-style"/>
11738
12114
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11739
12115
  </fo:block>
11740
12116
  </xsl:template> <!-- references -->
@@ -11748,21 +12124,25 @@
11748
12124
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11749
12125
  <xsl:call-template name="setNamedDestination"/>
11750
12126
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
12127
+ <xsl:call-template name="refine_bibitem-normative-style"/>
12128
+
11751
12129
  <xsl:call-template name="processBibitem"/>
11752
12130
  </fo:block>
11753
12131
 
11754
12132
  </xsl:template> <!-- bibitem -->
11755
12133
 
11756
12134
  <!-- Bibliography (non-normative references) -->
11757
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
12135
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
11758
12136
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11759
12137
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11760
12138
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11761
12139
  <xsl:call-template name="setNamedDestination"/>
11762
12140
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12141
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
12142
+
11763
12143
  <fo:list-item>
11764
12144
  <fo:list-item-label end-indent="label-end()">
11765
- <fo:block role="SKIP">
12145
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
11766
12146
  <fo:inline role="SKIP">
11767
12147
  <xsl:apply-templates select="mn:biblio-tag">
11768
12148
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -11772,6 +12152,7 @@
11772
12152
  </fo:list-item-label>
11773
12153
  <fo:list-item-body start-indent="body-start()">
11774
12154
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12155
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
11775
12156
  <xsl:call-template name="processBibitem">
11776
12157
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11777
12158
  </xsl:call-template>
@@ -11782,12 +12163,17 @@
11782
12163
 
11783
12164
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11784
12165
 
12166
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
12167
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
12168
+
11785
12169
  <xsl:template name="insertListItem_Bibitem">
11786
12170
  <xsl:choose>
11787
12171
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11788
12172
  <xsl:otherwise>
11789
12173
  <xsl:call-template name="setNamedDestination"/>
11790
12174
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
12175
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
12176
+
11791
12177
  <fo:list-item-label end-indent="label-end()">
11792
12178
  <fo:block role="SKIP">
11793
12179
  <fo:inline role="SKIP">
@@ -11798,16 +12184,18 @@
11798
12184
  </fo:block>
11799
12185
  </fo:list-item-label>
11800
12186
  <fo:list-item-body start-indent="body-start()">
11801
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12187
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
12188
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
11802
12189
  <xsl:call-template name="processBibitem">
11803
12190
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11804
12191
  </xsl:call-template>
11805
12192
  </fo:block>
12193
+ <xsl:call-template name="processBibitemFollowingNotes"/>
11806
12194
  </fo:list-item-body>
11807
12195
  </fo:list-item>
11808
12196
  </xsl:otherwise>
11809
12197
  </xsl:choose>
11810
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
12198
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
11811
12199
  <xsl:with-param name="skip">false</xsl:with-param>
11812
12200
  </xsl:apply-templates>
11813
12201
  </xsl:template>
@@ -11827,25 +12215,16 @@
11827
12215
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11828
12216
  </xsl:apply-templates>
11829
12217
  <xsl:apply-templates select="mn:formattedref"/>
12218
+ <xsl:call-template name="processBibitemFollowingNotes"/>
11830
12219
  <!-- end bibitem processing -->
11831
-
11832
- <xsl:call-template name="processBibliographyNote"/>
11833
12220
  </xsl:template> <!-- processBibitem (bibitem) -->
11834
12221
 
11835
- <xsl:template name="processBibliographyNote">
11836
- <xsl:if test="self::mn:note">
11837
- <xsl:variable name="note_node">
11838
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
11839
- <xsl:copy> <!-- skip @id -->
11840
- <xsl:copy-of select="node()"/>
11841
- </xsl:copy>
11842
- </xsl:element>
11843
- </xsl:variable>
11844
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
11845
- <xsl:call-template name="note"/>
11846
- </xsl:for-each> -->
12222
+ <xsl:template name="processBibitemFollowingNotes">
12223
+ <!-- current context is bibitem element -->
12224
+ <xsl:variable name="bibitem_id" select="@id"/>
12225
+ <xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
11847
12226
  <xsl:call-template name="note"/>
11848
- </xsl:if>
12227
+ </xsl:for-each>
11849
12228
  </xsl:template>
11850
12229
 
11851
12230
  <xsl:template match="mn:title" mode="title">
@@ -12047,13 +12426,19 @@
12047
12426
  <xsl:attribute name="role">H1</xsl:attribute>
12048
12427
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12049
12428
  <xsl:attribute name="span">all</xsl:attribute>
12050
- </xsl:attribute-set>
12429
+ </xsl:attribute-set> <!-- indexsect-title-style -->
12430
+
12431
+ <xsl:template name="refine_indexsect-title-style">
12432
+ </xsl:template>
12051
12433
 
12052
12434
  <xsl:attribute-set name="indexsect-clause-title-style">
12053
12435
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
12054
12436
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12055
12437
  <xsl:attribute name="margin-left">25mm</xsl:attribute>
12056
- </xsl:attribute-set>
12438
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
12439
+
12440
+ <xsl:template name="refine_indexsect-clause-title-style">
12441
+ </xsl:template>
12057
12442
  <!-- End Index section styles -->
12058
12443
 
12059
12444
  <!-- =================== -->
@@ -12247,6 +12632,7 @@
12247
12632
 
12248
12633
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12249
12634
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12635
+ <xsl:call-template name="refine_indexsect-title-style"/>
12250
12636
  <!-- Index -->
12251
12637
  <xsl:apply-templates/>
12252
12638
  </fo:block>
@@ -12255,6 +12641,7 @@
12255
12641
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12256
12642
  <!-- Letter A, B, C, ... -->
12257
12643
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12644
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
12258
12645
  <xsl:apply-templates/>
12259
12646
  </fo:block>
12260
12647
  </xsl:template>
@@ -12454,9 +12841,15 @@
12454
12841
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
12455
12842
  </xsl:attribute-set> <!-- END: toc-leader-style -->
12456
12843
 
12844
+ <xsl:template name="refine_toc-leader-style">
12845
+ </xsl:template>
12846
+
12457
12847
  <xsl:attribute-set name="toc-pagenumber-style">
12458
12848
  </xsl:attribute-set>
12459
12849
 
12850
+ <xsl:template name="refine_toc-pagenumber-style">
12851
+ </xsl:template>
12852
+
12460
12853
  <!-- List of Figures, Tables -->
12461
12854
  <xsl:attribute-set name="toc-listof-title-style">
12462
12855
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -12470,12 +12863,18 @@
12470
12863
  <xsl:attribute-set name="toc-listof-item-block-style">
12471
12864
  </xsl:attribute-set>
12472
12865
 
12866
+ <xsl:template name="refine_toc-listof-item-block-style">
12867
+ </xsl:template>
12868
+
12473
12869
  <xsl:attribute-set name="toc-listof-item-style">
12474
12870
  <xsl:attribute name="role">TOCI</xsl:attribute>
12475
12871
  <xsl:attribute name="margin-left">17mm</xsl:attribute>
12476
12872
  <xsl:attribute name="text-indent">-12mm</xsl:attribute>
12477
12873
  </xsl:attribute-set>
12478
12874
 
12875
+ <xsl:template name="refine_toc-listof-item-style">
12876
+ </xsl:template>
12877
+
12479
12878
  <xsl:template name="processPrefaceSectionsDefault_Contents">
12480
12879
  <xsl:variable name="nodes_preface_">
12481
12880
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -13587,23 +13986,55 @@
13587
13986
  <!-- Ruby text (CJK languages) rendering -->
13588
13987
  <!-- ===================================== -->
13589
13988
  <!-- ===================================== -->
13989
+
13990
+ <xsl:attribute-set name="ruby-style">
13991
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
13992
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
13993
+ </xsl:attribute-set>
13994
+
13995
+ <xsl:template name="refine_ruby-style">
13996
+ <xsl:if test="not(ancestor::mn:ruby)">
13997
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
13998
+ </xsl:if>
13999
+ <xsl:variable name="rt_text" select="mn:rt"/>
14000
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
14001
+ <!-- Example: width="2em" -->
14002
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
14003
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
14004
+ <xsl:variable name="text_width">
14005
+ <xsl:choose>
14006
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
14007
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
14008
+ </xsl:choose>
14009
+ </xsl:variable>
14010
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
14011
+ </xsl:template> <!-- refine_ruby-style -->
14012
+
14013
+ <xsl:attribute-set name="rb-style">
14014
+ <xsl:attribute name="line-height">1em</xsl:attribute>
14015
+ <xsl:attribute name="text-align">center</xsl:attribute>
14016
+ </xsl:attribute-set>
14017
+
14018
+ <xsl:template name="refine_rb-style">
14019
+ </xsl:template>
14020
+
14021
+ <xsl:attribute-set name="rt-style">
14022
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
14023
+ <xsl:attribute name="text-align">center</xsl:attribute>
14024
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
14025
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
14026
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
14027
+ </xsl:attribute-set>
14028
+
14029
+ <xsl:template name="refine_rt-style">
14030
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
14031
+ <xsl:attribute name="space-before">0em</xsl:attribute>
14032
+ </xsl:if>
14033
+ </xsl:template>
14034
+
13590
14035
  <xsl:template match="mn:ruby">
13591
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
13592
- <xsl:if test="not(ancestor::mn:ruby)">
13593
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
13594
- </xsl:if>
13595
- <xsl:variable name="rt_text" select="mn:rt"/>
13596
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
13597
- <!-- Example: width="2em" -->
13598
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
13599
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
13600
- <xsl:variable name="text_width">
13601
- <xsl:choose>
13602
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
13603
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
13604
- </xsl:choose>
13605
- </xsl:variable>
13606
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
14036
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
14037
+ <xsl:call-template name="refine_ruby-style"/>
13607
14038
 
13608
14039
  <xsl:choose>
13609
14040
  <xsl:when test="ancestor::mn:ruby">
@@ -13621,17 +14052,14 @@
13621
14052
  </xsl:template>
13622
14053
 
13623
14054
  <xsl:template match="mn:rb">
13624
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
14055
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
13625
14056
  </xsl:template>
13626
14057
 
13627
14058
  <xsl:template match="mn:rt">
13628
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
13629
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
13630
- <xsl:attribute name="space-before">0em</xsl:attribute>
13631
- </xsl:if>
14059
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
14060
+ <xsl:call-template name="refine_rt-style"/>
13632
14061
  <xsl:apply-templates/>
13633
14062
  </fo:block>
13634
-
13635
14063
  </xsl:template>
13636
14064
 
13637
14065
  <!-- ===================================== -->
@@ -13640,6 +14068,18 @@
13640
14068
  <!-- ===================================== -->
13641
14069
  <!-- ===================================== -->
13642
14070
 
14071
+ <xsl:attribute-set name="annex-title-style">
14072
+ </xsl:attribute-set>
14073
+
14074
+ <xsl:template name="refine_annex-title-style">
14075
+ </xsl:template>
14076
+
14077
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
14078
+ </xsl:attribute-set>
14079
+
14080
+ <xsl:template name="refine_p-zzSTDTitle1-style">
14081
+ </xsl:template>
14082
+
13643
14083
  <xsl:template name="processPrefaceSectionsDefault">
13644
14084
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
13645
14085
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -13978,10 +14418,17 @@
13978
14418
  </xsl:choose>
13979
14419
  </xsl:template>
13980
14420
 
14421
+ <xsl:attribute-set name="clause-style">
14422
+
14423
+ </xsl:attribute-set>
14424
+
14425
+ <xsl:template name="refine_clause-style">
14426
+ </xsl:template>
14427
+
13981
14428
  <!-- main sections -->
13982
14429
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
13983
14430
  <xsl:call-template name="setNamedDestination"/>
13984
- <fo:block>
14431
+ <fo:block role="Sect">
13985
14432
  <xsl:call-template name="setId"/>
13986
14433
 
13987
14434
  <xsl:call-template name="sections_element_style"/>
@@ -14111,6 +14558,10 @@
14111
14558
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
14112
14559
  </xsl:template>
14113
14560
 
14561
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
14562
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
14563
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
14564
+
14114
14565
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
14115
14566
  <xsl:template name="insert_basic_link">
14116
14567
  <xsl:param name="element"/>