metanorma-plateau 1.1.3 → 1.1.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.
@@ -1227,8 +1227,6 @@
1227
1227
  <xsl:template match="mn:note[not(ancestor::mn:table)]" priority="2">
1228
1228
 
1229
1229
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
1230
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1231
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1232
1230
 
1233
1231
  <xsl:call-template name="setBlockSpanAll"/>
1234
1232
 
@@ -1290,10 +1288,6 @@
1290
1288
 
1291
1289
  <xsl:call-template name="refine_list-item-label-style"/>
1292
1290
 
1293
- <xsl:if test="$doctype = 'technical-report'">
1294
- <xsl:attribute name="line-height">1.8</xsl:attribute>
1295
- </xsl:if>
1296
-
1297
1291
  <xsl:variable name="list_item_label">
1298
1292
  <xsl:call-template name="getListItemFormat"/>
1299
1293
  </xsl:variable>
@@ -2248,6 +2242,7 @@
2248
2242
  <xsl:variable name="en_dash">–</xsl:variable>
2249
2243
  <xsl:variable name="em_dash">—</xsl:variable>
2250
2244
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2245
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
2251
2246
  <xsl:variable name="cr">&#13;</xsl:variable>
2252
2247
  <xsl:variable name="lf">
2253
2248
  </xsl:variable>
@@ -2811,6 +2806,7 @@
2811
2806
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
2812
2807
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
2813
2808
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2809
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2814
2810
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
2815
2811
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
2816
2812
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -2825,10 +2821,10 @@
2825
2821
 
2826
2822
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
2827
2823
 
2828
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
2824
+ <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">
2829
2825
  <xsl:copy>
2830
2826
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2831
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
2827
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
2832
2828
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2833
2829
  </xsl:copy>
2834
2830
  </xsl:template>
@@ -3721,10 +3717,16 @@
3721
3717
  <xsl:attribute-set name="license-statement-style">
3722
3718
  </xsl:attribute-set> <!-- license-statement-style -->
3723
3719
 
3720
+ <xsl:template name="refine_license-statement-style">
3721
+ </xsl:template>
3722
+
3724
3723
  <xsl:attribute-set name="license-statement-title-style">
3725
3724
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3726
3725
  </xsl:attribute-set> <!-- license-statement-title-style -->
3727
3726
 
3727
+ <xsl:template name="refine_license-statement-title-style">
3728
+ </xsl:template>
3729
+
3728
3730
  <xsl:attribute-set name="license-statement-p-style">
3729
3731
  </xsl:attribute-set> <!-- license-statement-p-style -->
3730
3732
 
@@ -3735,23 +3737,47 @@
3735
3737
  <xsl:attribute-set name="legal-statement-style">
3736
3738
  </xsl:attribute-set> <!-- legal-statement-style -->
3737
3739
 
3740
+ <xsl:template name="refine_legal-statement-style">
3741
+ </xsl:template>
3742
+
3738
3743
  <xsl:attribute-set name="legal-statement-title-style">
3739
3744
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3740
3745
  </xsl:attribute-set> <!-- legal-statement-title-style -->
3741
3746
 
3747
+ <xsl:template name="refine_legal-statement-title-style">
3748
+ </xsl:template>
3749
+
3742
3750
  <xsl:attribute-set name="legal-statement-p-style">
3743
3751
  </xsl:attribute-set> <!-- legal-statement-p-style -->
3744
3752
 
3753
+ <xsl:template name="refine_legal-statement-p-style">
3754
+ <xsl:if test="@align">
3755
+ <xsl:attribute name="text-align">
3756
+ <xsl:value-of select="@align"/>
3757
+ </xsl:attribute>
3758
+ </xsl:if>
3759
+ </xsl:template>
3760
+
3745
3761
  <xsl:attribute-set name="feedback-statement-style">
3746
3762
  </xsl:attribute-set> <!-- feedback-statement-style -->
3747
3763
 
3764
+ <xsl:template name="refine_feedback-statement-style">
3765
+ </xsl:template>
3766
+
3748
3767
  <xsl:attribute-set name="feedback-statement-title-style">
3749
3768
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3750
3769
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3751
3770
 
3771
+ <xsl:template name="refine_feedback-statement-title-style">
3772
+
3773
+ </xsl:template>
3774
+
3752
3775
  <xsl:attribute-set name="feedback-statement-p-style">
3753
3776
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
3754
3777
 
3778
+ <xsl:template name="refine_feedback-statement-p-style">
3779
+ </xsl:template>
3780
+
3755
3781
  <!-- End boilerplate sections styles -->
3756
3782
 
3757
3783
  <!-- ================================= -->
@@ -3777,6 +3803,7 @@
3777
3803
 
3778
3804
  <xsl:template match="mn:license-statement">
3779
3805
  <fo:block xsl:use-attribute-sets="license-statement-style">
3806
+ <xsl:call-template name="refine_license-statement-style"/>
3780
3807
  <xsl:apply-templates/>
3781
3808
  </fo:block>
3782
3809
  </xsl:template> <!-- license-statement -->
@@ -3794,6 +3821,7 @@
3794
3821
  <xsl:template match="mn:legal-statement">
3795
3822
  <xsl:param name="isLegacy">false</xsl:param>
3796
3823
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3824
+ <xsl:call-template name="refine_legal-statement-style"/>
3797
3825
  <xsl:apply-templates/>
3798
3826
  </fo:block>
3799
3827
  </xsl:template> <!-- legal-statement -->
@@ -3961,6 +3989,27 @@
3961
3989
  <xsl:attribute-set name="sourcecode-container-style">
3962
3990
  </xsl:attribute-set>
3963
3991
 
3992
+ <xsl:template name="refine_sourcecode-container-style">
3993
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
3994
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3995
+ </xsl:if>
3996
+
3997
+ <xsl:if test="ancestor::mn:example">
3998
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3999
+ </xsl:if>
4000
+
4001
+ <xsl:copy-of select="@id"/>
4002
+
4003
+ <xsl:if test="parent::mn:note">
4004
+ <xsl:attribute name="margin-left">
4005
+ <xsl:choose>
4006
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
4007
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4008
+ </xsl:choose>
4009
+ </xsl:attribute>
4010
+ </xsl:if>
4011
+ </xsl:template>
4012
+
3964
4013
  <xsl:attribute-set name="sourcecode-style">
3965
4014
  <xsl:attribute name="white-space">pre</xsl:attribute>
3966
4015
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -3970,6 +4019,12 @@
3970
4019
  <xsl:template name="refine_sourcecode-style">
3971
4020
  </xsl:template> <!-- refine_sourcecode-style -->
3972
4021
 
4022
+ <xsl:attribute-set name="sourcecode-number-style">
4023
+ </xsl:attribute-set>
4024
+
4025
+ <xsl:template name="refine_sourcecode-number-style">
4026
+ </xsl:template>
4027
+
3973
4028
  <xsl:attribute-set name="sourcecode-name-style">
3974
4029
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3975
4030
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -3978,6 +4033,9 @@
3978
4033
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3979
4034
  </xsl:attribute-set> <!-- sourcecode-name-style -->
3980
4035
 
4036
+ <xsl:template name="refine_sourcecode-name-style">
4037
+ </xsl:template>
4038
+
3981
4039
  <xsl:template name="add-zero-spaces-equal">
3982
4040
  <xsl:param name="text" select="."/>
3983
4041
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -4065,24 +4123,8 @@
4065
4123
  <xsl:otherwise>
4066
4124
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
4067
4125
 
4068
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
4069
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4070
- </xsl:if>
4126
+ <xsl:call-template name="refine_sourcecode-container-style"/>
4071
4127
 
4072
- <xsl:if test="ancestor::mn:example">
4073
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4074
- </xsl:if>
4075
-
4076
- <xsl:copy-of select="@id"/>
4077
-
4078
- <xsl:if test="parent::mn:note">
4079
- <xsl:attribute name="margin-left">
4080
- <xsl:choose>
4081
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
4082
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4083
- </xsl:choose>
4084
- </xsl:attribute>
4085
- </xsl:if>
4086
4128
  <fo:block-container margin-left="0mm" role="SKIP">
4087
4129
 
4088
4130
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -4409,6 +4451,7 @@
4409
4451
  <xsl:template match="mn:sourcecode/mn:fmt-name">
4410
4452
  <xsl:if test="normalize-space() != ''">
4411
4453
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4454
+ <xsl:call-template name="refine_sourcecode-name-style"/>
4412
4455
  <xsl:apply-templates/>
4413
4456
  </fo:block>
4414
4457
  </xsl:if>
@@ -4455,11 +4498,30 @@
4455
4498
  <xsl:attribute-set name="pre-style">
4456
4499
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4457
4500
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4458
- </xsl:attribute-set>
4501
+ </xsl:attribute-set> <!-- pre-style -->
4502
+
4503
+ <xsl:template name="refine_pre-style">
4504
+ </xsl:template>
4459
4505
 
4460
4506
  <xsl:attribute-set name="tt-style">
4461
4507
  </xsl:attribute-set>
4462
4508
 
4509
+ <xsl:template name="refine_tt-style">
4510
+ <xsl:variable name="_font-size"> <!-- inherit -->
4511
+ </xsl:variable>
4512
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4513
+ <xsl:if test="$font-size != ''">
4514
+ <xsl:attribute name="font-size">
4515
+ <xsl:choose>
4516
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
4517
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
4518
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4519
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4520
+ </xsl:choose>
4521
+ </xsl:attribute>
4522
+ </xsl:if>
4523
+ </xsl:template>
4524
+
4463
4525
  <xsl:variable name="color-added-text">
4464
4526
  <xsl:text>rgb(0, 255, 0)</xsl:text>
4465
4527
  </xsl:variable>
@@ -4472,9 +4534,14 @@
4472
4534
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
4473
4535
  </xsl:attribute-set>
4474
4536
 
4537
+ <xsl:template name="refine_add-style">
4538
+ </xsl:template>
4539
+
4475
4540
  <xsl:variable name="add-style">
4476
- <add-style xsl:use-attribute-sets="add-style"/>
4477
- </xsl:variable>
4541
+ <add-style xsl:use-attribute-sets="add-style">
4542
+ <xsl:call-template name="refine_add-style"/>
4543
+ </add-style>
4544
+ </xsl:variable>
4478
4545
  <xsl:template name="append_add-style">
4479
4546
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
4480
4547
  </xsl:template>
@@ -4487,24 +4554,77 @@
4487
4554
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4488
4555
  </xsl:attribute-set>
4489
4556
 
4557
+ <xsl:template name="refine_del-style">
4558
+ </xsl:template>
4559
+
4560
+ <xsl:attribute-set name="strong-style">
4561
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4562
+ </xsl:attribute-set>
4563
+
4564
+ <xsl:template name="refine_strong_style">
4565
+ <xsl:if test="ancestor::*['preferred']">
4566
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4567
+ </xsl:if>
4568
+ </xsl:template> <!-- refine_strong_style -->
4569
+
4570
+ <xsl:attribute-set name="em-style">
4571
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4572
+ </xsl:attribute-set>
4573
+
4574
+ <xsl:template name="refine_em_style">
4575
+ </xsl:template> <!-- refine_em_style -->
4576
+
4577
+ <xsl:attribute-set name="sup-style">
4578
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4579
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4580
+ </xsl:attribute-set>
4581
+
4582
+ <xsl:template name="refine_sup-style">
4583
+ </xsl:template>
4584
+
4585
+ <xsl:attribute-set name="sub-style">
4586
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4587
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
4588
+ </xsl:attribute-set>
4589
+
4590
+ <xsl:template name="refine_sub-style">
4591
+ </xsl:template>
4592
+
4593
+ <xsl:attribute-set name="underline-style">
4594
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4595
+ </xsl:attribute-set>
4596
+
4597
+ <xsl:template name="refine_underline-style">
4598
+ </xsl:template>
4599
+
4600
+ <xsl:attribute-set name="hi-style">
4601
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
4602
+ </xsl:attribute-set>
4603
+
4604
+ <xsl:template name="refine_hi-style">
4605
+ </xsl:template>
4606
+
4607
+ <xsl:attribute-set name="strike-style">
4608
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4609
+ </xsl:attribute-set>
4610
+
4611
+ <xsl:template name="refine_strike-style">
4612
+ </xsl:template>
4613
+
4490
4614
  <xsl:template match="mn:br">
4491
4615
  <xsl:value-of select="$linebreak"/>
4492
4616
  </xsl:template>
4493
4617
 
4494
- <xsl:template match="mn:em">
4495
- <fo:inline font-style="italic">
4496
- <xsl:call-template name="refine_italic_style"/>
4618
+ <xsl:template match="mn:em">
4619
+ <fo:inline xsl:use-attribute-sets="em-style">
4620
+ <xsl:call-template name="refine_em_style"/>
4497
4621
  <xsl:apply-templates/>
4498
4622
  </fo:inline>
4499
4623
  </xsl:template>
4500
4624
 
4501
- <xsl:template name="refine_italic_style">
4502
- </xsl:template>
4503
-
4504
4625
  <xsl:template match="mn:strong | *[local-name()='b']">
4505
4626
  <xsl:param name="split_keep-within-line"/>
4506
- <fo:inline font-weight="bold">
4507
-
4627
+ <fo:inline xsl:use-attribute-sets="strong-style">
4508
4628
  <xsl:call-template name="refine_strong_style"/>
4509
4629
 
4510
4630
  <xsl:apply-templates>
@@ -4513,44 +4633,27 @@
4513
4633
  </fo:inline>
4514
4634
  </xsl:template>
4515
4635
 
4516
- <xsl:template name="refine_strong_style">
4517
- <xsl:if test="ancestor::*['preferred']">
4518
- <xsl:attribute name="role">SKIP</xsl:attribute>
4519
- </xsl:if>
4520
- </xsl:template>
4521
-
4522
4636
  <xsl:template match="*[local-name()='padding']">
4523
4637
  <fo:inline padding-right="{@value}"> </fo:inline>
4524
4638
  </xsl:template>
4525
4639
 
4526
4640
  <xsl:template match="mn:sup">
4527
- <fo:inline font-size="80%" vertical-align="super">
4641
+ <fo:inline xsl:use-attribute-sets="sup-style">
4642
+ <xsl:call-template name="refine_sup-style"/>
4528
4643
  <xsl:apply-templates/>
4529
4644
  </fo:inline>
4530
4645
  </xsl:template>
4531
4646
 
4532
4647
  <xsl:template match="mn:sub">
4533
- <fo:inline font-size="80%" vertical-align="sub">
4648
+ <fo:inline xsl:use-attribute-sets="sub-style">
4649
+ <xsl:call-template name="refine_sub-style"/>
4534
4650
  <xsl:apply-templates/>
4535
4651
  </fo:inline>
4536
4652
  </xsl:template>
4537
4653
 
4538
4654
  <xsl:template match="mn:tt">
4539
4655
  <fo:inline xsl:use-attribute-sets="tt-style">
4540
-
4541
- <xsl:variable name="_font-size"> <!-- inherit -->
4542
- </xsl:variable>
4543
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4544
- <xsl:if test="$font-size != ''">
4545
- <xsl:attribute name="font-size">
4546
- <xsl:choose>
4547
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
4548
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
4549
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4550
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
4551
- </xsl:choose>
4552
- </xsl:attribute>
4553
- </xsl:if>
4656
+ <xsl:call-template name="refine_tt-style"/>
4554
4657
  <xsl:apply-templates/>
4555
4658
  </fo:inline>
4556
4659
  </xsl:template> <!-- tt -->
@@ -4569,7 +4672,8 @@
4569
4672
  </xsl:template>
4570
4673
 
4571
4674
  <xsl:template match="mn:underline">
4572
- <fo:inline text-decoration="underline">
4675
+ <fo:inline xsl:use-attribute-sets="underline-style">
4676
+ <xsl:call-template name="refine_underline-style"/>
4573
4677
  <xsl:apply-templates/>
4574
4678
  </fo:inline>
4575
4679
  </xsl:template>
@@ -4727,6 +4831,7 @@
4727
4831
 
4728
4832
  <xsl:template match="mn:del">
4729
4833
  <fo:inline xsl:use-attribute-sets="del-style">
4834
+ <xsl:call-template name="refine_del-style"/>
4730
4835
  <xsl:apply-templates/>
4731
4836
  </fo:inline>
4732
4837
  </xsl:template>
@@ -4736,7 +4841,8 @@
4736
4841
 
4737
4842
  <!-- highlight text -->
4738
4843
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
4739
- <fo:inline background-color="yellow">
4844
+ <fo:inline xsl:use-attribute-sets="hi-style">
4845
+ <xsl:call-template name="refine_hi-style"/>
4740
4846
  <xsl:apply-templates/>
4741
4847
  </fo:inline>
4742
4848
  </xsl:template>
@@ -4822,7 +4928,8 @@
4822
4928
  </xsl:template>
4823
4929
 
4824
4930
  <xsl:template match="mn:strike">
4825
- <fo:inline text-decoration="line-through">
4931
+ <fo:inline xsl:use-attribute-sets="strike-style">
4932
+ <xsl:call-template name="refine_strike-style"/>
4826
4933
  <xsl:apply-templates/>
4827
4934
  </fo:inline>
4828
4935
  </xsl:template>
@@ -4902,6 +5009,7 @@
4902
5009
 
4903
5010
  <xsl:template match="mn:pre" name="pre">
4904
5011
  <fo:block xsl:use-attribute-sets="pre-style">
5012
+ <xsl:call-template name="refine_pre-style"/>
4905
5013
  <xsl:copy-of select="@id"/>
4906
5014
  <xsl:choose>
4907
5015
 
@@ -4932,22 +5040,40 @@
4932
5040
  <xsl:attribute-set name="permission-style">
4933
5041
  </xsl:attribute-set>
4934
5042
 
5043
+ <xsl:template name="refine_permission-style">
5044
+ </xsl:template>
5045
+
4935
5046
  <xsl:attribute-set name="permission-name-style">
4936
5047
  </xsl:attribute-set>
4937
5048
 
5049
+ <xsl:template name="refine_permission-name-style">
5050
+ </xsl:template>
5051
+
4938
5052
  <xsl:attribute-set name="permission-label-style">
4939
5053
  </xsl:attribute-set>
4940
5054
 
5055
+ <xsl:template name="refine_permission-label-style">
5056
+ </xsl:template>
5057
+
4941
5058
  <xsl:attribute-set name="requirement-style">
4942
5059
  </xsl:attribute-set>
4943
5060
 
5061
+ <xsl:template name="refine_requirement-style">
5062
+ </xsl:template>
5063
+
4944
5064
  <xsl:attribute-set name="requirement-name-style">
4945
5065
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4946
5066
  </xsl:attribute-set>
4947
5067
 
5068
+ <xsl:template name="refine_requirement-name-style">
5069
+ </xsl:template>
5070
+
4948
5071
  <xsl:attribute-set name="requirement-label-style">
4949
5072
  </xsl:attribute-set>
4950
5073
 
5074
+ <xsl:template name="refine_requirement-label-style">
5075
+ </xsl:template>
5076
+
4951
5077
  <xsl:attribute-set name="subject-style">
4952
5078
  </xsl:attribute-set>
4953
5079
 
@@ -4975,18 +5101,28 @@
4975
5101
  <xsl:attribute-set name="recommendation-style">
4976
5102
  </xsl:attribute-set>
4977
5103
 
5104
+ <xsl:template name="refine_recommendation-style">
5105
+ </xsl:template>
5106
+
4978
5107
  <xsl:attribute-set name="recommendation-name-style">
4979
5108
  </xsl:attribute-set>
4980
5109
 
5110
+ <xsl:template name="refine_recommendation-name-style">
5111
+ </xsl:template>
5112
+
4981
5113
  <xsl:attribute-set name="recommendation-label-style">
4982
5114
  </xsl:attribute-set>
4983
5115
 
5116
+ <xsl:template name="refine_recommendation-label-style">
5117
+ </xsl:template>
5118
+
4984
5119
  <!-- ========== -->
4985
5120
  <!-- permission -->
4986
5121
  <!-- ========== -->
4987
5122
  <xsl:template match="mn:permission">
4988
5123
  <xsl:call-template name="setNamedDestination"/>
4989
5124
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5125
+ <xsl:call-template name="refine_permission-style"/>
4990
5126
  <xsl:apply-templates select="mn:fmt-name"/>
4991
5127
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4992
5128
  </fo:block>
@@ -4995,6 +5131,7 @@
4995
5131
  <xsl:template match="mn:permission/mn:fmt-name">
4996
5132
  <xsl:if test="normalize-space() != ''">
4997
5133
  <fo:block xsl:use-attribute-sets="permission-name-style">
5134
+ <xsl:call-template name="refine_permission-name-style"/>
4998
5135
  <xsl:apply-templates/>
4999
5136
  </fo:block>
5000
5137
  </xsl:if>
@@ -5002,6 +5139,7 @@
5002
5139
 
5003
5140
  <xsl:template match="mn:permission/mn:label">
5004
5141
  <fo:block xsl:use-attribute-sets="permission-label-style">
5142
+ <xsl:call-template name="refine_permission-label-style"/>
5005
5143
  <xsl:apply-templates/>
5006
5144
  </fo:block>
5007
5145
  </xsl:template>
@@ -5014,6 +5152,7 @@
5014
5152
  <xsl:template match="mn:requirement">
5015
5153
  <xsl:call-template name="setNamedDestination"/>
5016
5154
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5155
+ <xsl:call-template name="refine_requirement-style"/>
5017
5156
  <xsl:apply-templates select="mn:fmt-name"/>
5018
5157
  <xsl:apply-templates select="mn:label"/>
5019
5158
  <xsl:apply-templates select="@obligation"/>
@@ -5026,6 +5165,7 @@
5026
5165
  <xsl:if test="normalize-space() != ''">
5027
5166
 
5028
5167
  <fo:block xsl:use-attribute-sets="requirement-name-style">
5168
+ <xsl:call-template name="refine_requirement-name-style"/>
5029
5169
  <xsl:apply-templates/>
5030
5170
  </fo:block>
5031
5171
  </xsl:if>
@@ -5033,6 +5173,7 @@
5033
5173
 
5034
5174
  <xsl:template match="mn:requirement/mn:label">
5035
5175
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5176
+ <xsl:call-template name="refine_requirement-label-style"/>
5036
5177
  <xsl:apply-templates/>
5037
5178
  </fo:block>
5038
5179
  </xsl:template>
@@ -5058,6 +5199,7 @@
5058
5199
  <xsl:template match="mn:recommendation">
5059
5200
  <xsl:call-template name="setNamedDestination"/>
5060
5201
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5202
+ <xsl:call-template name="refine_recommendation-style"/>
5061
5203
  <xsl:apply-templates select="mn:fmt-name"/>
5062
5204
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5063
5205
  </fo:block>
@@ -5067,6 +5209,7 @@
5067
5209
  <xsl:if test="normalize-space() != ''">
5068
5210
 
5069
5211
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5212
+ <xsl:call-template name="refine_recommendation-name-style"/>
5070
5213
  <xsl:apply-templates/>
5071
5214
  </fo:block>
5072
5215
  </xsl:if>
@@ -5074,6 +5217,7 @@
5074
5217
 
5075
5218
  <xsl:template match="mn:recommendation/mn:label">
5076
5219
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5220
+ <xsl:call-template name="refine_recommendation-label-style"/>
5077
5221
  <xsl:apply-templates/>
5078
5222
  </fo:block>
5079
5223
  </xsl:template>
@@ -5255,6 +5399,9 @@
5255
5399
  <xsl:attribute name="space-after">12pt</xsl:attribute>
5256
5400
  </xsl:attribute-set> <!-- term-style -->
5257
5401
 
5402
+ <xsl:template name="refine_term-style">
5403
+ </xsl:template>
5404
+
5258
5405
  <xsl:attribute-set name="term-name-style">
5259
5406
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5260
5407
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -5262,32 +5409,65 @@
5262
5409
  <xsl:attribute name="space-after">2pt</xsl:attribute>
5263
5410
  </xsl:attribute-set> <!-- term-name-style -->
5264
5411
 
5265
- <xsl:attribute-set name="preferred-block-style">
5412
+ <xsl:template name="refine_term-name-style">
5413
+ </xsl:template>
5414
+
5415
+ <xsl:attribute-set name="preferred-style">
5416
+ </xsl:attribute-set> <!-- preferred-style -->
5417
+
5418
+ <xsl:template name="refine_preferred-style">
5419
+ </xsl:template>
5420
+
5421
+ <xsl:attribute-set name="preferred-block-style">
5266
5422
  </xsl:attribute-set> <!-- preferred-block-style -->
5267
5423
 
5424
+ <xsl:template name="refine_preferred-block-style">
5425
+ </xsl:template>
5426
+
5268
5427
  <xsl:attribute-set name="preferred-term-style">
5269
5428
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5270
5429
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5271
5430
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5272
5431
  </xsl:attribute-set> <!-- preferred-term-style -->
5273
5432
 
5433
+ <xsl:template name="refine_preferred-term-style">
5434
+ <xsl:if test="mn:strong">
5435
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5436
+ </xsl:if>
5437
+ </xsl:template>
5438
+
5274
5439
  <xsl:attribute-set name="domain-style">
5275
5440
  </xsl:attribute-set> <!-- domain-style -->
5276
5441
 
5442
+ <xsl:template name="refine_domain-style">
5443
+ </xsl:template>
5444
+
5277
5445
  <xsl:attribute-set name="admitted-style">
5278
5446
  </xsl:attribute-set> <!-- admitted-style -->
5279
5447
 
5448
+ <xsl:template name="refine_admitted-style">
5449
+ </xsl:template>
5450
+
5280
5451
  <xsl:attribute-set name="deprecates-style">
5281
5452
  </xsl:attribute-set> <!-- deprecates-style -->
5282
5453
 
5454
+ <xsl:template name="refine_deprecates-style">
5455
+ </xsl:template>
5456
+
5283
5457
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5284
5458
  </xsl:attribute-set>
5285
5459
 
5460
+ <xsl:template name="refine_related-block-style">
5461
+ </xsl:template>
5462
+
5286
5463
  <xsl:attribute-set name="definition-style">
5287
5464
  <xsl:attribute name="space-before">2pt</xsl:attribute>
5288
5465
  <xsl:attribute name="space-after">2pt</xsl:attribute>
5289
5466
  </xsl:attribute-set> <!-- definition-style -->
5290
5467
 
5468
+ <xsl:template name="refine_definition-style">
5469
+ </xsl:template>
5470
+
5291
5471
  <xsl:attribute-set name="termsource-style">
5292
5472
  </xsl:attribute-set> <!-- termsource-style -->
5293
5473
 
@@ -5300,9 +5480,15 @@
5300
5480
  <xsl:attribute-set name="termsource-text-style">
5301
5481
  </xsl:attribute-set> <!-- termsource-text-style -->
5302
5482
 
5483
+ <xsl:template name="refine_termsource-text-style">
5484
+ </xsl:template>
5485
+
5303
5486
  <xsl:attribute-set name="origin-style">
5304
5487
  </xsl:attribute-set> <!-- origin-style -->
5305
5488
 
5489
+ <xsl:template name="refine_origin-style">
5490
+ </xsl:template>
5491
+
5306
5492
  <!-- ====== -->
5307
5493
  <!-- term -->
5308
5494
  <!-- ====== -->
@@ -5318,9 +5504,8 @@
5318
5504
  <xsl:template match="mn:term">
5319
5505
  <xsl:call-template name="setNamedDestination"/>
5320
5506
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
5507
+ <xsl:call-template name="refine_term-style"/>
5321
5508
 
5322
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5323
- </xsl:if>
5324
5509
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5325
5510
  </fo:block>
5326
5511
  </xsl:template>
@@ -5396,6 +5581,7 @@
5396
5581
  <!-- text SOURCE: -->
5397
5582
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5398
5583
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5584
+ <xsl:call-template name="refine_termsource-text-style"/>
5399
5585
  <xsl:value-of select="."/>
5400
5586
  </fo:inline>
5401
5587
  </xsl:template>
@@ -5408,6 +5594,7 @@
5408
5594
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5409
5595
  </xsl:if>
5410
5596
  <fo:inline xsl:use-attribute-sets="origin-style">
5597
+ <xsl:call-template name="refine_origin-style"/>
5411
5598
  <xsl:apply-templates/>
5412
5599
  </fo:inline>
5413
5600
  </fo:basic-link>
@@ -5457,9 +5644,12 @@
5457
5644
  </xsl:variable>
5458
5645
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5459
5646
 
5647
+ <xsl:call-template name="refine_preferred-block-style"/>
5648
+
5460
5649
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5461
5650
 
5462
5651
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5652
+ <xsl:call-template name="refine_term-name-style"/>
5463
5653
 
5464
5654
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5465
5655
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -5470,7 +5660,7 @@
5470
5660
  </xsl:if>
5471
5661
 
5472
5662
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
5473
- <xsl:call-template name="setStyle_preferred"/>
5663
+ <xsl:call-template name="refine_preferred-term-style"/>
5474
5664
 
5475
5665
  <xsl:apply-templates/>
5476
5666
  </fo:block>
@@ -5491,22 +5681,18 @@
5491
5681
 
5492
5682
  <xsl:template match="mn:fmt-admitted">
5493
5683
  <fo:block xsl:use-attribute-sets="admitted-style">
5684
+ <xsl:call-template name="refine_admitted-style"/>
5494
5685
  <xsl:apply-templates/>
5495
5686
  </fo:block>
5496
5687
  </xsl:template>
5497
5688
 
5498
5689
  <xsl:template match="mn:fmt-deprecates">
5499
5690
  <fo:block xsl:use-attribute-sets="deprecates-style">
5691
+ <xsl:call-template name="refine_deprecates-style"/>
5500
5692
  <xsl:apply-templates/>
5501
5693
  </fo:block>
5502
5694
  </xsl:template>
5503
5695
 
5504
- <xsl:template name="setStyle_preferred">
5505
- <xsl:if test="mn:strong">
5506
- <xsl:attribute name="font-weight">normal</xsl:attribute>
5507
- </xsl:if>
5508
- </xsl:template>
5509
-
5510
5696
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5511
5697
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5512
5698
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -5516,6 +5702,7 @@
5516
5702
 
5517
5703
  <xsl:template match="mn:fmt-related">
5518
5704
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
5705
+ <xsl:call-template name="refine_related-block-style"/>
5519
5706
  <xsl:apply-templates/>
5520
5707
  </fo:block>
5521
5708
  </xsl:template>
@@ -5530,6 +5717,7 @@
5530
5717
  <!-- ========== -->
5531
5718
  <xsl:template match="mn:fmt-definition">
5532
5719
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5720
+ <xsl:call-template name="refine_definition-style"/>
5533
5721
  <xsl:apply-templates/>
5534
5722
  </fo:block>
5535
5723
  </xsl:template>
@@ -5577,6 +5765,9 @@
5577
5765
  <xsl:attribute-set name="example-body-style">
5578
5766
  </xsl:attribute-set> <!-- example-body-style -->
5579
5767
 
5768
+ <xsl:template name="refine_example-body-style">
5769
+ </xsl:template>
5770
+
5580
5771
  <xsl:attribute-set name="example-name-style">
5581
5772
  </xsl:attribute-set> <!-- example-name-style -->
5582
5773
 
@@ -5625,6 +5816,8 @@
5625
5816
  <xsl:when test="contains($element, 'block')">
5626
5817
  <fo:block xsl:use-attribute-sets="example-p-style">
5627
5818
 
5819
+ <xsl:call-template name="refine_example-p-style"/>
5820
+
5628
5821
  <xsl:apply-templates/>
5629
5822
  </fo:block>
5630
5823
  </xsl:when>
@@ -5676,6 +5869,7 @@
5676
5869
  </fo:block>
5677
5870
 
5678
5871
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5872
+ <xsl:call-template name="refine_example-body-style"/>
5679
5873
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5680
5874
  <xsl:variable name="example_body">
5681
5875
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -5738,6 +5932,7 @@
5738
5932
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5739
5933
  <!-- display further elements in blocks -->
5740
5934
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5935
+ <xsl:call-template name="refine_example-body-style"/>
5741
5936
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5742
5937
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5743
5938
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -5858,6 +6053,12 @@
5858
6053
  <xsl:call-template name="setBordersTableArray"/>
5859
6054
  </xsl:template> <!-- refine_table-style -->
5860
6055
 
6056
+ <xsl:attribute-set name="table-number-style">
6057
+ </xsl:attribute-set>
6058
+
6059
+ <xsl:template name="refine_table-number-style">
6060
+ </xsl:template>
6061
+
5861
6062
  <xsl:attribute-set name="table-name-style">
5862
6063
  <xsl:attribute name="role">Caption</xsl:attribute>
5863
6064
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -5989,6 +6190,9 @@
5989
6190
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5990
6191
  </xsl:attribute-set> <!-- table-fn-number-style -->
5991
6192
 
6193
+ <xsl:template name="refine_table-fn-number-style">
6194
+ </xsl:template>
6195
+
5992
6196
  <xsl:attribute-set name="table-fmt-fn-label-style">
5993
6197
  <xsl:attribute name="font-size">80%</xsl:attribute>
5994
6198
  <xsl:attribute name="font-size">60%</xsl:attribute>
@@ -5998,32 +6202,12 @@
5998
6202
  <xsl:template name="refine_table-fmt-fn-label-style">
5999
6203
  </xsl:template>
6000
6204
 
6001
- <xsl:attribute-set name="fn-container-body-style">
6002
- <xsl:attribute name="text-indent">0</xsl:attribute>
6003
- <xsl:attribute name="start-indent">0</xsl:attribute>
6004
- </xsl:attribute-set>
6005
-
6006
6205
  <xsl:attribute-set name="table-fn-body-style">
6007
6206
  </xsl:attribute-set>
6008
6207
 
6009
- <xsl:attribute-set name="figure-fn-number-style">
6010
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
6011
- </xsl:attribute-set> <!-- figure-fn-number-style -->
6012
-
6013
- <xsl:attribute-set name="figure-fmt-fn-label-style">
6014
- <xsl:attribute name="font-size">80%</xsl:attribute>
6015
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6016
- <xsl:attribute name="font-size">60%</xsl:attribute>
6017
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6018
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
6019
-
6020
- <xsl:template name="refine_figure-fmt-fn-label-style">
6208
+ <xsl:template name="refine_table-fn-body-style">
6021
6209
  </xsl:template>
6022
6210
 
6023
- <xsl:attribute-set name="figure-fn-body-style">
6024
- <xsl:attribute name="text-align">justify</xsl:attribute>
6025
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6026
- </xsl:attribute-set>
6027
6211
  <!-- ========================== -->
6028
6212
  <!-- END Table styles -->
6029
6213
  <!-- ========================== -->
@@ -6340,7 +6524,7 @@
6340
6524
 
6341
6525
  </fo:block>
6342
6526
 
6343
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
6527
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
6344
6528
  <xsl:if test="$continued = 'true'">
6345
6529
 
6346
6530
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -7299,6 +7483,7 @@
7299
7483
  </xsl:apply-templates>
7300
7484
 
7301
7485
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
7486
+ <xsl:call-template name="refine_table-fn-body-style"/>
7302
7487
  <!-- <xsl:copy-of select="./node()"/> -->
7303
7488
  <xsl:apply-templates/>
7304
7489
  </fo:inline>
@@ -7317,6 +7502,7 @@
7317
7502
  <xsl:param name="process">false</xsl:param>
7318
7503
  <xsl:if test="$process = 'true'">
7319
7504
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
7505
+ <xsl:call-template name="refine_table-fn-number-style"/>
7320
7506
 
7321
7507
  <!-- tab is padding-right -->
7322
7508
  <xsl:apply-templates select=".//mn:tab">
@@ -8190,9 +8376,18 @@
8190
8376
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
8191
8377
  </xsl:attribute-set>
8192
8378
 
8379
+ <xsl:template name="refine_dl-block-style">
8380
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
8381
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
8382
+ </xsl:if>
8383
+ </xsl:template>
8384
+
8193
8385
  <xsl:attribute-set name="dt-row-style">
8194
8386
  </xsl:attribute-set>
8195
8387
 
8388
+ <xsl:template name="refine_dt-row-style">
8389
+ </xsl:template>
8390
+
8196
8391
  <xsl:attribute-set name="dt-cell-style">
8197
8392
  </xsl:attribute-set>
8198
8393
 
@@ -8211,6 +8406,14 @@
8211
8406
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
8212
8407
  </xsl:attribute-set> <!-- dl-name-style -->
8213
8408
 
8409
+ <xsl:template name="refine_dl-name-style">
8410
+ <xsl:if test="ancestor::mn:tfoot and ../@key = 'true'">
8411
+ <xsl:attribute name="margin-left">-<xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
8412
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
8413
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
8414
+ </xsl:if>
8415
+ </xsl:template>
8416
+
8214
8417
  <xsl:attribute-set name="dd-cell-style">
8215
8418
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
8216
8419
  </xsl:attribute-set>
@@ -8249,9 +8452,7 @@
8249
8452
  <!-- <dl><xsl:copy-of select="."/></dl> -->
8250
8453
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
8251
8454
 
8252
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
8253
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
8254
- </xsl:if>
8455
+ <xsl:call-template name="refine_dl-block-style"/>
8255
8456
 
8256
8457
  <xsl:call-template name="setBlockSpanAll"/>
8257
8458
  <xsl:if test="not(ancestor::mn:quote)">
@@ -8579,11 +8780,8 @@
8579
8780
  <xsl:param name="process">false</xsl:param>
8580
8781
  <xsl:if test="$process = 'true'">
8581
8782
  <fo:block xsl:use-attribute-sets="dl-name-style">
8582
- <xsl:if test="ancestor::mn:tfoot and ../@key = 'true'">
8583
- <xsl:attribute name="margin-left">-<xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
8584
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
8585
- <xsl:attribute name="font-weight">bold</xsl:attribute>
8586
- </xsl:if>
8783
+
8784
+ <xsl:call-template name="refine_dl-name-style"/>
8587
8785
 
8588
8786
  <xsl:apply-templates/>
8589
8787
  </fo:block>
@@ -8773,6 +8971,8 @@
8773
8971
  <xsl:param name="split_keep-within-line"/>
8774
8972
 
8775
8973
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
8974
+ <xsl:call-template name="refine_dt-row-style"/>
8975
+
8776
8976
  <xsl:call-template name="insert_dt_cell">
8777
8977
  <xsl:with-param name="key_iso" select="$key_iso"/>
8778
8978
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -8982,15 +9182,22 @@
8982
9182
  <xsl:attribute-set name="appendix-style">
8983
9183
  </xsl:attribute-set>
8984
9184
 
9185
+ <xsl:template name="refine_appendix-style">
9186
+ </xsl:template>
9187
+
8985
9188
  <xsl:attribute-set name="appendix-example-style">
8986
9189
  </xsl:attribute-set>
8987
9190
 
9191
+ <xsl:template name="refine_appendix-example-style">
9192
+ </xsl:template>
9193
+
8988
9194
  <!-- ======================== -->
8989
9195
  <!-- Appendix processing -->
8990
9196
  <!-- ======================== -->
8991
9197
  <xsl:template match="mn:appendix">
8992
9198
  <xsl:call-template name="setNamedDestination"/>
8993
9199
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
9200
+ <xsl:call-template name="refine_appendix-style"/>
8994
9201
  <xsl:apply-templates select="mn:fmt-title"/>
8995
9202
  </fo:block>
8996
9203
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -9009,13 +9216,23 @@
9009
9216
  <xsl:template match="mn:appendix//mn:example" priority="2">
9010
9217
  <xsl:call-template name="setNamedDestination"/>
9011
9218
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
9219
+ <xsl:call-template name="refine_appendix-example-style"/>
9012
9220
  <xsl:apply-templates select="mn:fmt-name"/>
9013
9221
  </fo:block>
9014
9222
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9015
9223
  </xsl:template>
9016
9224
 
9017
9225
  <xsl:attribute-set name="xref-style">
9018
- </xsl:attribute-set>
9226
+ </xsl:attribute-set> <!-- xref-style -->
9227
+
9228
+ <xsl:template name="refine_xref-style">
9229
+ <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])">
9230
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9231
+ </xsl:if>
9232
+ <xsl:if test="parent::mn:add">
9233
+ <xsl:call-template name="append_add-style"/>
9234
+ </xsl:if>
9235
+ </xsl:template> <!-- refine_xref-style -->
9019
9236
 
9020
9237
  <xsl:template match="mn:fmt-xref">
9021
9238
  <xsl:call-template name="insert_basic_link">
@@ -9024,12 +9241,8 @@
9024
9241
  <xsl:call-template name="getAltText"/>
9025
9242
  </xsl:variable>
9026
9243
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
9027
- <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])">
9028
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9029
- </xsl:if>
9030
- <xsl:if test="parent::mn:add">
9031
- <xsl:call-template name="append_add-style"/>
9032
- </xsl:if>
9244
+ <xsl:call-template name="refine_xref-style"/>
9245
+
9033
9246
  <xsl:apply-templates/>
9034
9247
  </fo:basic-link>
9035
9248
  </xsl:with-param>
@@ -9138,16 +9351,20 @@
9138
9351
  <xsl:attribute-set name="note-style">
9139
9352
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
9140
9353
  <xsl:attribute name="space-before">2pt</xsl:attribute>
9141
- </xsl:attribute-set>
9354
+ </xsl:attribute-set> <!-- note-style -->
9142
9355
 
9143
9356
  <xsl:template name="refine_note-style">
9144
- </xsl:template>
9357
+ <xsl:if test="not(ancestor::mn:table or ancestor::mn:figure or ancestor::mn:dl)">
9358
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
9359
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
9360
+ </xsl:if>
9361
+ </xsl:template> <!-- refine_note-style -->
9145
9362
 
9146
9363
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
9147
9364
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
9148
9365
 
9149
9366
  <xsl:attribute-set name="note-name-style">
9150
- </xsl:attribute-set>
9367
+ </xsl:attribute-set> <!-- note-name-style -->
9151
9368
 
9152
9369
  <xsl:template name="refine_note-name-style">
9153
9370
  <xsl:if test="ancestor::mn:figure">
@@ -9164,19 +9381,22 @@
9164
9381
  </xsl:template> <!-- refine_table-note-name-style -->
9165
9382
 
9166
9383
  <xsl:attribute-set name="note-p-style">
9167
- </xsl:attribute-set>
9384
+ </xsl:attribute-set> <!-- note-p-style -->
9385
+
9386
+ <xsl:template name="refine_note-p-style">
9387
+ </xsl:template>
9168
9388
 
9169
9389
  <xsl:attribute-set name="termnote-style">
9170
9390
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
9171
9391
  <xsl:attribute name="space-before">4pt</xsl:attribute>
9172
9392
  <xsl:attribute name="space-after">4pt</xsl:attribute>
9173
- </xsl:attribute-set>
9393
+ </xsl:attribute-set> <!-- termnote-style -->
9174
9394
 
9175
9395
  <xsl:template name="refine_termnote-style">
9176
9396
  </xsl:template> <!-- refine_termnote-style -->
9177
9397
 
9178
9398
  <xsl:attribute-set name="termnote-name-style">
9179
- </xsl:attribute-set>
9399
+ </xsl:attribute-set> <!-- termnote-name-style -->
9180
9400
 
9181
9401
  <xsl:template name="refine_termnote-name-style">
9182
9402
  </xsl:template>
@@ -9184,6 +9404,9 @@
9184
9404
  <xsl:attribute-set name="termnote-p-style">
9185
9405
  </xsl:attribute-set>
9186
9406
 
9407
+ <xsl:template name="refine_termnote-p-style">
9408
+ </xsl:template>
9409
+
9187
9410
  <!-- ====== -->
9188
9411
  <!-- note -->
9189
9412
  <!-- termnote -->
@@ -9247,11 +9470,13 @@
9247
9470
  <xsl:choose>
9248
9471
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
9249
9472
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
9473
+ <xsl:call-template name="refine_note-p-style"/>
9250
9474
  <xsl:apply-templates/>
9251
9475
  </fo:inline>
9252
9476
  </xsl:when>
9253
9477
  <xsl:otherwise>
9254
9478
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
9479
+ <xsl:call-template name="refine_note-p-style"/>
9255
9480
  <xsl:apply-templates/>
9256
9481
  </fo:block>
9257
9482
  </xsl:otherwise>
@@ -9343,11 +9568,13 @@
9343
9568
  <xsl:choose>
9344
9569
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
9345
9570
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
9571
+ <xsl:call-template name="refine_termnote-p-style"/>
9346
9572
  <xsl:apply-templates/>
9347
9573
  </fo:inline>
9348
9574
  </xsl:when>
9349
9575
  <xsl:otherwise>
9350
9576
  <fo:block xsl:use-attribute-sets="termnote-p-style">
9577
+ <xsl:call-template name="refine_termnote-p-style"/>
9351
9578
  <xsl:apply-templates/>
9352
9579
  </fo:block>
9353
9580
  </xsl:otherwise>
@@ -9362,7 +9589,7 @@
9362
9589
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
9363
9590
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
9364
9591
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
9365
- </xsl:attribute-set>
9592
+ </xsl:attribute-set> <!-- quote-style -->
9366
9593
 
9367
9594
  <xsl:template name="refine_quote-style">
9368
9595
  </xsl:template>
@@ -9371,6 +9598,9 @@
9371
9598
  <xsl:attribute name="text-align">right</xsl:attribute>
9372
9599
  </xsl:attribute-set>
9373
9600
 
9601
+ <xsl:template name="refine_quote-source-style">
9602
+ </xsl:template>
9603
+
9374
9604
  <!-- ====== -->
9375
9605
  <!-- quote -->
9376
9606
  <!-- source -->
@@ -9399,6 +9629,7 @@
9399
9629
  </fo:block-container>
9400
9630
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9401
9631
  <fo:block xsl:use-attribute-sets="quote-source-style">
9632
+ <xsl:call-template name="refine_quote-source-style"/>
9402
9633
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9403
9634
  <xsl:apply-templates select="mn:author"/>
9404
9635
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -9460,6 +9691,15 @@
9460
9691
  <xsl:attribute-set name="figure-style">
9461
9692
  </xsl:attribute-set>
9462
9693
 
9694
+ <xsl:template name="refine_figure-style">
9695
+ </xsl:template>
9696
+
9697
+ <xsl:attribute-set name="figure-number-style">
9698
+ </xsl:attribute-set>
9699
+
9700
+ <xsl:template name="refine_figure-number-style">
9701
+ </xsl:template>
9702
+
9463
9703
  <xsl:attribute-set name="figure-name-style">
9464
9704
  <xsl:attribute name="role">Caption</xsl:attribute>
9465
9705
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -9467,7 +9707,7 @@
9467
9707
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
9468
9708
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9469
9709
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
9470
- </xsl:attribute-set>
9710
+ </xsl:attribute-set> <!-- figure-name-style -->
9471
9711
 
9472
9712
  <xsl:template name="refine_figure-name-style">
9473
9713
  <xsl:if test="$doctype = 'technical-report'">
@@ -9478,7 +9718,7 @@
9478
9718
  <xsl:attribute-set name="image-style">
9479
9719
  <xsl:attribute name="role">SKIP</xsl:attribute>
9480
9720
  <xsl:attribute name="text-align">center</xsl:attribute>
9481
- </xsl:attribute-set>
9721
+ </xsl:attribute-set> <!-- image-style -->
9482
9722
 
9483
9723
  <xsl:template name="refine_image-style">
9484
9724
  </xsl:template>
@@ -9488,14 +9728,55 @@
9488
9728
  <xsl:attribute name="content-height">100%</xsl:attribute>
9489
9729
  <xsl:attribute name="scaling">uniform</xsl:attribute>
9490
9730
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
9491
- </xsl:attribute-set>
9731
+ </xsl:attribute-set> <!-- image-graphic-style -->
9732
+
9733
+ <xsl:template name="refine_image-graphic-style">
9734
+ </xsl:template>
9492
9735
 
9493
9736
  <xsl:attribute-set name="figure-source-style">
9494
9737
  </xsl:attribute-set>
9495
9738
 
9739
+ <xsl:template name="refine_figure-source-style">
9740
+ </xsl:template>
9741
+
9496
9742
  <xsl:attribute-set name="figure-pseudocode-p-style">
9497
9743
  </xsl:attribute-set>
9498
9744
 
9745
+ <xsl:template name="refine_figure-pseudocode-p-style">
9746
+ </xsl:template>
9747
+
9748
+ <xsl:attribute-set name="figure-fn-number-style">
9749
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
9750
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
9751
+
9752
+ <xsl:template name="refine_figure-fn-number-style">
9753
+ </xsl:template>
9754
+
9755
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
9756
+ <xsl:attribute name="font-size">80%</xsl:attribute>
9757
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
9758
+ <xsl:attribute name="font-size">60%</xsl:attribute>
9759
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
9760
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
9761
+
9762
+ <xsl:template name="refine_figure-fmt-fn-label-style">
9763
+ </xsl:template>
9764
+
9765
+ <xsl:attribute-set name="figure-fn-body-style">
9766
+ <xsl:attribute name="text-align">justify</xsl:attribute>
9767
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9768
+ </xsl:attribute-set>
9769
+
9770
+ <xsl:template name="refine_figure-fn-body-style">
9771
+ <xsl:variable name="key_iso">
9772
+ </xsl:variable>
9773
+ <xsl:if test="normalize-space($key_iso) = 'true'">
9774
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
9775
+ </xsl:if>
9776
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
9777
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
9778
+ </xsl:template>
9779
+
9499
9780
  <!-- ============================ -->
9500
9781
  <!-- figure's footnotes rendering -->
9501
9782
  <!-- ============================ -->
@@ -9611,11 +9892,8 @@
9611
9892
  </fo:table-cell>
9612
9893
  <fo:table-cell>
9613
9894
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
9614
- <xsl:if test="normalize-space($key_iso) = 'true'">
9615
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
9616
- </xsl:if>
9617
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
9618
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
9895
+ <xsl:call-template name="refine_figure-fn-body-style"/>
9896
+
9619
9897
  <!-- <xsl:copy-of select="./node()"/> -->
9620
9898
  <xsl:apply-templates/>
9621
9899
  </fo:block>
@@ -9633,6 +9911,7 @@
9633
9911
  <xsl:param name="process">false</xsl:param>
9634
9912
  <xsl:if test="$process = 'true'">
9635
9913
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
9914
+ <xsl:call-template name="refine_figure-fn-number-style"/>
9636
9915
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
9637
9916
 
9638
9917
  <!-- tab is padding-right -->
@@ -9670,6 +9949,7 @@
9670
9949
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9671
9950
  </xsl:if>
9672
9951
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
9952
+ <xsl:call-template name="refine_figure-fn-number-style"/>
9673
9953
  <!-- <xsl:value-of select="@reference"/> -->
9674
9954
  <xsl:apply-templates/>
9675
9955
  </fo:inline>
@@ -9715,6 +9995,8 @@
9715
9995
 
9716
9996
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9717
9997
 
9998
+ <xsl:call-template name="refine_figure-style"/>
9999
+
9718
10000
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9719
10001
  <xsl:call-template name="setIDforNamedDestination"/>
9720
10002
  </xsl:for-each>
@@ -9758,6 +10040,7 @@
9758
10040
 
9759
10041
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
9760
10042
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
10043
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
9761
10044
  <xsl:apply-templates/>
9762
10045
  </fo:block>
9763
10046
  </xsl:template>
@@ -9887,6 +10170,8 @@
9887
10170
  </xsl:variable>
9888
10171
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
9889
10172
 
10173
+ <xsl:call-template name="refine_image-graphic-style"/>
10174
+
9890
10175
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
9891
10176
  <xsl:variable name="scale">
9892
10177
  <xsl:call-template name="getImageScale">
@@ -10586,6 +10871,9 @@
10586
10871
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10587
10872
  </xsl:attribute-set> <!-- formula-style -->
10588
10873
 
10874
+ <xsl:template name="refine_formula-style">
10875
+ </xsl:template>
10876
+
10589
10877
  <xsl:attribute-set name="formula-stem-block-style">
10590
10878
  <xsl:attribute name="text-align">center</xsl:attribute>
10591
10879
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -10654,6 +10942,8 @@
10654
10942
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10655
10943
  <fo:block xsl:use-attribute-sets="formula-style">
10656
10944
 
10945
+ <xsl:call-template name="refine_formula-style"/>
10946
+
10657
10947
  <fo:table table-layout="fixed" width="100%">
10658
10948
  <fo:table-column column-width="95%"/>
10659
10949
  <fo:table-column column-width="5%"/>
@@ -11077,6 +11367,9 @@
11077
11367
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
11078
11368
  </xsl:attribute-set> <!-- list-name-style -->
11079
11369
 
11370
+ <xsl:template name="refine_list-name-style">
11371
+ </xsl:template>
11372
+
11080
11373
  <xsl:attribute-set name="list-item-style">
11081
11374
  </xsl:attribute-set>
11082
11375
 
@@ -11087,6 +11380,9 @@
11087
11380
  </xsl:attribute-set>
11088
11381
 
11089
11382
  <xsl:template name="refine_list-item-label-style">
11383
+ <xsl:if test="$doctype = 'technical-report'">
11384
+ <xsl:attribute name="line-height">1.8</xsl:attribute>
11385
+ </xsl:if>
11090
11386
  </xsl:template> <!-- refine_list-item-label-style -->
11091
11387
 
11092
11388
  <xsl:attribute-set name="list-item-body-style">
@@ -11382,6 +11678,7 @@
11382
11678
  <xsl:param name="process">false</xsl:param>
11383
11679
  <xsl:if test="$process = 'true'">
11384
11680
  <fo:block xsl:use-attribute-sets="list-name-style">
11681
+ <xsl:call-template name="refine_list-name-style"/>
11385
11682
  <xsl:apply-templates/>
11386
11683
  </fo:block>
11387
11684
  </xsl:if>
@@ -11442,33 +11739,54 @@
11442
11739
  <!-- END Lists processing -->
11443
11740
  <!-- ===================================== -->
11444
11741
 
11742
+ <xsl:attribute-set name="footnote-separator-leader-style">
11743
+ </xsl:attribute-set>
11744
+
11745
+ <xsl:template name="refine_footnote-separator-leader-style">
11746
+ </xsl:template>
11747
+
11748
+ <xsl:attribute-set name="fn-container-body-style">
11749
+ <xsl:attribute name="text-indent">0</xsl:attribute>
11750
+ <xsl:attribute name="start-indent">0</xsl:attribute>
11751
+ </xsl:attribute-set>
11752
+
11753
+ <xsl:template name="refine_fn-container-body-style">
11754
+ </xsl:template>
11755
+
11445
11756
  <xsl:attribute-set name="fn-reference-style">
11446
11757
  <xsl:attribute name="font-size">80%</xsl:attribute>
11447
11758
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11448
11759
  <xsl:attribute name="font-size">6pt</xsl:attribute>
11449
11760
  <xsl:attribute name="baseline-shift">25%</xsl:attribute>
11450
-
11451
- </xsl:attribute-set>
11761
+ </xsl:attribute-set> <!-- fn-reference-style -->
11452
11762
 
11453
11763
  <xsl:template name="refine_fn-reference-style">
11764
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11765
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11454
11766
  </xsl:template> <!-- refine_fn-reference-style -->
11455
11767
 
11456
11768
  <xsl:attribute-set name="fn-style">
11457
11769
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11458
11770
  </xsl:attribute-set>
11459
11771
 
11772
+ <xsl:template name="refine_fn-style">
11773
+ </xsl:template>
11774
+
11460
11775
  <xsl:attribute-set name="fn-num-style">
11461
11776
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11462
11777
  <xsl:attribute name="font-size">6pt</xsl:attribute>
11463
11778
  <xsl:attribute name="baseline-shift">25%</xsl:attribute>
11464
- </xsl:attribute-set>
11779
+ </xsl:attribute-set> <!-- fn-num-style -->
11780
+
11781
+ <xsl:template name="refine_fn-num-style">
11782
+ </xsl:template>
11465
11783
 
11466
11784
  <xsl:attribute-set name="fn-body-style">
11467
11785
  <xsl:attribute name="font-weight">normal</xsl:attribute>
11468
11786
  <xsl:attribute name="font-style">normal</xsl:attribute>
11469
11787
  <xsl:attribute name="text-indent">0</xsl:attribute>
11470
11788
  <xsl:attribute name="start-indent">0</xsl:attribute>
11471
- </xsl:attribute-set>
11789
+ </xsl:attribute-set> <!-- fn-body-style" -->
11472
11790
 
11473
11791
  <xsl:template name="refine_fn-body-style">
11474
11792
  </xsl:template> <!-- refine_fn-body-style -->
@@ -11533,10 +11851,12 @@
11533
11851
  <xsl:choose>
11534
11852
  <xsl:when test="ancestor::mn:bibitem">
11535
11853
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
11854
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
11536
11855
  </fn_styles>
11537
11856
  </xsl:when>
11538
11857
  <xsl:otherwise>
11539
11858
  <fn_styles xsl:use-attribute-sets="fn-num-style">
11859
+ <xsl:call-template name="refine_fn-num-style"/>
11540
11860
  </fn_styles>
11541
11861
  </xsl:otherwise>
11542
11862
  </xsl:choose>
@@ -11546,9 +11866,12 @@
11546
11866
  <xsl:copy-of select="."/>
11547
11867
  </xsl:for-each>
11548
11868
 
11549
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11869
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11870
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11550
11871
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11551
- </xsl:if>
11872
+ </xsl:if> -->
11873
+
11874
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11552
11875
 
11553
11876
  <xsl:call-template name="insert_basic_link">
11554
11877
  <xsl:with-param name="element">
@@ -11571,10 +11894,12 @@
11571
11894
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
11572
11895
 
11573
11896
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
11897
+ <xsl:call-template name="refine_fn-style"/>
11574
11898
  <xsl:copy-of select="$footnote_inline"/>
11575
11899
  <fo:footnote-body role="Note">
11576
11900
 
11577
11901
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
11902
+ <xsl:call-template name="refine_fn-container-body-style"/>
11578
11903
 
11579
11904
  <xsl:variable name="fn_block">
11580
11905
  <xsl:call-template name="refine_fn-body-style"/>
@@ -11671,17 +11996,30 @@
11671
11996
  <xsl:attribute-set name="admonition-style">
11672
11997
  </xsl:attribute-set> <!-- admonition-style -->
11673
11998
 
11999
+ <xsl:template name="refine_admonition-style">
12000
+ </xsl:template>
12001
+
11674
12002
  <xsl:attribute-set name="admonition-container-style">
11675
12003
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
11676
12004
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
11677
12005
  </xsl:attribute-set> <!-- admonition-container-style -->
11678
12006
 
12007
+ <xsl:template name="refine_admonition-container-style">
12008
+ </xsl:template>
12009
+
11679
12010
  <xsl:attribute-set name="admonition-name-style">
11680
12011
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
11681
12012
  </xsl:attribute-set> <!-- admonition-name-style -->
11682
12013
 
12014
+ <xsl:template name="refine_admonition-name-style">
12015
+ </xsl:template>
12016
+
11683
12017
  <xsl:attribute-set name="admonition-p-style">
11684
12018
  </xsl:attribute-set> <!-- admonition-p-style -->
12019
+
12020
+ <xsl:template name="refine_admonition-p-style">
12021
+ </xsl:template>
12022
+
11685
12023
  <!-- end admonition -->
11686
12024
 
11687
12025
  <!-- ================ -->
@@ -11691,8 +12029,12 @@
11691
12029
  <xsl:call-template name="setNamedDestination"/>
11692
12030
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
11693
12031
 
12032
+ <xsl:call-template name="refine_admonition-style"/>
12033
+
11694
12034
  <xsl:call-template name="setBlockSpanAll"/>
11695
12035
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12036
+
12037
+ <xsl:call-template name="refine_admonition-container-style"/>
11696
12038
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11697
12039
  <fo:block>
11698
12040
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -11748,6 +12090,7 @@
11748
12090
 
11749
12091
  <xsl:template match="mn:admonition/mn:p">
11750
12092
  <fo:block xsl:use-attribute-sets="admonition-p-style">
12093
+ <xsl:call-template name="refine_admonition-p-style"/>
11751
12094
 
11752
12095
  <xsl:apply-templates/>
11753
12096
  </fo:block>
@@ -11757,6 +12100,13 @@
11757
12100
  <!-- END Admonition -->
11758
12101
  <!-- ================ -->
11759
12102
 
12103
+ <xsl:attribute-set name="references-non-normative-title-style">
12104
+ </xsl:attribute-set>
12105
+
12106
+ <xsl:template name="refine_references-non-normative-title-style">
12107
+
12108
+ </xsl:template>
12109
+
11760
12110
  <!-- bibitem in Normative References (references/@normative="true") -->
11761
12111
  <xsl:attribute-set name="bibitem-normative-style">
11762
12112
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -11764,15 +12114,24 @@
11764
12114
  <xsl:attribute name="text-indent">-6mm</xsl:attribute>
11765
12115
  </xsl:attribute-set> <!-- bibitem-normative-style -->
11766
12116
 
12117
+ <xsl:template name="refine_bibitem-normative-style">
12118
+ </xsl:template>
12119
+
11767
12120
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
11768
12121
  <xsl:attribute-set name="bibitem-normative-list-style">
11769
12122
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
11770
12123
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11771
12124
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
11772
12125
 
12126
+ <xsl:template name="refine_bibitem-normative-list-style">
12127
+ </xsl:template>
12128
+
11773
12129
  <xsl:attribute-set name="bibitem-non-normative-style">
11774
12130
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
11775
12131
 
12132
+ <xsl:template name="refine_bibitem-non-normative-style">
12133
+ </xsl:template>
12134
+
11776
12135
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
11777
12136
  <xsl:attribute-set name="bibitem-non-normative-list-style">
11778
12137
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -11782,17 +12141,29 @@
11782
12141
  <xsl:attribute name="line-height">1.5</xsl:attribute>
11783
12142
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
11784
12143
 
12144
+ <xsl:template name="refine_bibitem-non-normative-list-style">
12145
+ </xsl:template>
12146
+
11785
12147
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
11786
12148
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11787
12149
  </xsl:attribute-set>
11788
12150
 
12151
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
12152
+ </xsl:template>
12153
+
11789
12154
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
11790
12155
  <xsl:attribute-set name="bibitem-normative-list-body-style">
11791
12156
  </xsl:attribute-set>
11792
12157
 
12158
+ <xsl:template name="refine_bibitem-normative-list-body-style">
12159
+ </xsl:template>
12160
+
11793
12161
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
11794
12162
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
11795
12163
 
12164
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
12165
+ </xsl:template>
12166
+
11796
12167
  <!-- footnote reference number for bibitem, in the text -->
11797
12168
  <xsl:attribute-set name="bibitem-note-fn-style">
11798
12169
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -11801,6 +12172,9 @@
11801
12172
  <xsl:attribute name="baseline-shift">25%</xsl:attribute>
11802
12173
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
11803
12174
 
12175
+ <xsl:template name="refine_bibitem-note-fn-style">
12176
+ </xsl:template>
12177
+
11804
12178
  <!-- footnote number on the page bottom -->
11805
12179
  <xsl:attribute-set name="bibitem-note-fn-number-style">
11806
12180
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -11816,6 +12190,9 @@
11816
12190
  <xsl:attribute-set name="references-non-normative-style">
11817
12191
  </xsl:attribute-set> <!-- references-non-normative-style -->
11818
12192
 
12193
+ <xsl:template name="refine_references-non-normative-style">
12194
+ </xsl:template>
12195
+
11819
12196
  <!-- ======================= -->
11820
12197
  <!-- Bibliography rendering -->
11821
12198
  <!-- ======================= -->
@@ -11857,6 +12234,7 @@
11857
12234
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11858
12235
 
11859
12236
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
12237
+ <xsl:call-template name="refine_references-non-normative-style"/>
11860
12238
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11861
12239
  </fo:block>
11862
12240
  </xsl:template> <!-- references -->
@@ -11870,21 +12248,25 @@
11870
12248
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11871
12249
  <xsl:call-template name="setNamedDestination"/>
11872
12250
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
12251
+ <xsl:call-template name="refine_bibitem-normative-style"/>
12252
+
11873
12253
  <xsl:call-template name="processBibitem"/>
11874
12254
  </fo:block>
11875
12255
 
11876
12256
  </xsl:template> <!-- bibitem -->
11877
12257
 
11878
12258
  <!-- Bibliography (non-normative references) -->
11879
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
12259
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
11880
12260
  <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
11881
12261
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11882
12262
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11883
12263
  <xsl:call-template name="setNamedDestination"/>
11884
12264
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12265
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
12266
+
11885
12267
  <fo:list-item>
11886
12268
  <fo:list-item-label end-indent="label-end()">
11887
- <fo:block role="SKIP">
12269
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
11888
12270
  <fo:inline role="SKIP">
11889
12271
  <xsl:apply-templates select="mn:biblio-tag">
11890
12272
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -11894,6 +12276,7 @@
11894
12276
  </fo:list-item-label>
11895
12277
  <fo:list-item-body start-indent="body-start()">
11896
12278
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12279
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
11897
12280
  <xsl:call-template name="processBibitem">
11898
12281
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11899
12282
  </xsl:call-template>
@@ -11904,12 +12287,17 @@
11904
12287
 
11905
12288
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11906
12289
 
12290
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
12291
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
12292
+
11907
12293
  <xsl:template name="insertListItem_Bibitem">
11908
12294
  <xsl:choose>
11909
12295
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11910
12296
  <xsl:otherwise>
11911
12297
  <xsl:call-template name="setNamedDestination"/>
11912
12298
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
12299
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
12300
+
11913
12301
  <fo:list-item-label end-indent="label-end()">
11914
12302
  <fo:block role="SKIP">
11915
12303
  <fo:inline role="SKIP">
@@ -11920,16 +12308,18 @@
11920
12308
  </fo:block>
11921
12309
  </fo:list-item-label>
11922
12310
  <fo:list-item-body start-indent="body-start()">
11923
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12311
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
12312
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
11924
12313
  <xsl:call-template name="processBibitem">
11925
12314
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11926
12315
  </xsl:call-template>
11927
12316
  </fo:block>
12317
+ <xsl:call-template name="processBibitemFollowingNotes"/>
11928
12318
  </fo:list-item-body>
11929
12319
  </fo:list-item>
11930
12320
  </xsl:otherwise>
11931
12321
  </xsl:choose>
11932
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
12322
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
11933
12323
  <xsl:with-param name="skip">false</xsl:with-param>
11934
12324
  </xsl:apply-templates>
11935
12325
  </xsl:template>
@@ -11945,25 +12335,16 @@
11945
12335
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11946
12336
  </xsl:apply-templates>
11947
12337
  <xsl:apply-templates select="mn:formattedref"/>
12338
+ <xsl:call-template name="processBibitemFollowingNotes"/>
11948
12339
  <!-- end bibitem processing -->
11949
-
11950
- <xsl:call-template name="processBibliographyNote"/>
11951
12340
  </xsl:template> <!-- processBibitem (bibitem) -->
11952
12341
 
11953
- <xsl:template name="processBibliographyNote">
11954
- <xsl:if test="self::mn:note">
11955
- <xsl:variable name="note_node">
11956
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
11957
- <xsl:copy> <!-- skip @id -->
11958
- <xsl:copy-of select="node()"/>
11959
- </xsl:copy>
11960
- </xsl:element>
11961
- </xsl:variable>
11962
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
11963
- <xsl:call-template name="note"/>
11964
- </xsl:for-each> -->
12342
+ <xsl:template name="processBibitemFollowingNotes">
12343
+ <!-- current context is bibitem element -->
12344
+ <xsl:variable name="bibitem_id" select="@id"/>
12345
+ <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]]">
11965
12346
  <xsl:call-template name="note"/>
11966
- </xsl:if>
12347
+ </xsl:for-each>
11967
12348
  </xsl:template>
11968
12349
 
11969
12350
  <xsl:template match="mn:title" mode="title">
@@ -12166,11 +12547,17 @@
12166
12547
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12167
12548
  <xsl:attribute name="span">all</xsl:attribute>
12168
12549
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12169
- </xsl:attribute-set>
12550
+ </xsl:attribute-set> <!-- indexsect-title-style -->
12551
+
12552
+ <xsl:template name="refine_indexsect-title-style">
12553
+ </xsl:template>
12170
12554
 
12171
12555
  <xsl:attribute-set name="indexsect-clause-title-style">
12172
12556
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
12173
- </xsl:attribute-set>
12557
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
12558
+
12559
+ <xsl:template name="refine_indexsect-clause-title-style">
12560
+ </xsl:template>
12174
12561
  <!-- End Index section styles -->
12175
12562
 
12176
12563
  <!-- =================== -->
@@ -12364,6 +12751,7 @@
12364
12751
 
12365
12752
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12366
12753
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12754
+ <xsl:call-template name="refine_indexsect-title-style"/>
12367
12755
  <!-- Index -->
12368
12756
  <xsl:apply-templates/>
12369
12757
  </fo:block>
@@ -12372,6 +12760,7 @@
12372
12760
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12373
12761
  <!-- Letter A, B, C, ... -->
12374
12762
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12763
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
12375
12764
  <xsl:apply-templates/>
12376
12765
  </fo:block>
12377
12766
  </xsl:template>
@@ -12574,9 +12963,15 @@
12574
12963
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
12575
12964
  </xsl:attribute-set> <!-- END: toc-leader-style -->
12576
12965
 
12966
+ <xsl:template name="refine_toc-leader-style">
12967
+ </xsl:template>
12968
+
12577
12969
  <xsl:attribute-set name="toc-pagenumber-style">
12578
12970
  </xsl:attribute-set>
12579
12971
 
12972
+ <xsl:template name="refine_toc-pagenumber-style">
12973
+ </xsl:template>
12974
+
12580
12975
  <!-- List of Figures, Tables -->
12581
12976
  <xsl:attribute-set name="toc-listof-title-style">
12582
12977
  </xsl:attribute-set>
@@ -12587,10 +12982,16 @@
12587
12982
  <xsl:attribute-set name="toc-listof-item-block-style">
12588
12983
  </xsl:attribute-set>
12589
12984
 
12985
+ <xsl:template name="refine_toc-listof-item-block-style">
12986
+ </xsl:template>
12987
+
12590
12988
  <xsl:attribute-set name="toc-listof-item-style">
12591
12989
  <xsl:attribute name="role">TOCI</xsl:attribute>
12592
12990
  </xsl:attribute-set>
12593
12991
 
12992
+ <xsl:template name="refine_toc-listof-item-style">
12993
+ </xsl:template>
12994
+
12594
12995
  <xsl:template name="processPrefaceSectionsDefault_Contents">
12595
12996
  <xsl:variable name="nodes_preface_">
12596
12997
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -13697,23 +14098,55 @@
13697
14098
  <!-- Ruby text (CJK languages) rendering -->
13698
14099
  <!-- ===================================== -->
13699
14100
  <!-- ===================================== -->
14101
+
14102
+ <xsl:attribute-set name="ruby-style">
14103
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
14104
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
14105
+ </xsl:attribute-set>
14106
+
14107
+ <xsl:template name="refine_ruby-style">
14108
+ <xsl:if test="not(ancestor::mn:ruby)">
14109
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
14110
+ </xsl:if>
14111
+ <xsl:variable name="rt_text" select="mn:rt"/>
14112
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
14113
+ <!-- Example: width="2em" -->
14114
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
14115
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
14116
+ <xsl:variable name="text_width">
14117
+ <xsl:choose>
14118
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
14119
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
14120
+ </xsl:choose>
14121
+ </xsl:variable>
14122
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
14123
+ </xsl:template> <!-- refine_ruby-style -->
14124
+
14125
+ <xsl:attribute-set name="rb-style">
14126
+ <xsl:attribute name="line-height">1em</xsl:attribute>
14127
+ <xsl:attribute name="text-align">center</xsl:attribute>
14128
+ </xsl:attribute-set>
14129
+
14130
+ <xsl:template name="refine_rb-style">
14131
+ </xsl:template>
14132
+
14133
+ <xsl:attribute-set name="rt-style">
14134
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
14135
+ <xsl:attribute name="text-align">center</xsl:attribute>
14136
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
14137
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
14138
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
14139
+ </xsl:attribute-set>
14140
+
14141
+ <xsl:template name="refine_rt-style">
14142
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
14143
+ <xsl:attribute name="space-before">0em</xsl:attribute>
14144
+ </xsl:if>
14145
+ </xsl:template>
14146
+
13700
14147
  <xsl:template match="mn:ruby">
13701
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
13702
- <xsl:if test="not(ancestor::mn:ruby)">
13703
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
13704
- </xsl:if>
13705
- <xsl:variable name="rt_text" select="mn:rt"/>
13706
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
13707
- <!-- Example: width="2em" -->
13708
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
13709
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
13710
- <xsl:variable name="text_width">
13711
- <xsl:choose>
13712
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
13713
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
13714
- </xsl:choose>
13715
- </xsl:variable>
13716
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
14148
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
14149
+ <xsl:call-template name="refine_ruby-style"/>
13717
14150
 
13718
14151
  <xsl:choose>
13719
14152
  <xsl:when test="ancestor::mn:ruby">
@@ -13731,17 +14164,14 @@
13731
14164
  </xsl:template>
13732
14165
 
13733
14166
  <xsl:template match="mn:rb">
13734
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
14167
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
13735
14168
  </xsl:template>
13736
14169
 
13737
14170
  <xsl:template match="mn:rt">
13738
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
13739
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
13740
- <xsl:attribute name="space-before">0em</xsl:attribute>
13741
- </xsl:if>
14171
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
14172
+ <xsl:call-template name="refine_rt-style"/>
13742
14173
  <xsl:apply-templates/>
13743
14174
  </fo:block>
13744
-
13745
14175
  </xsl:template>
13746
14176
 
13747
14177
  <!-- ===================================== -->
@@ -13750,6 +14180,18 @@
13750
14180
  <!-- ===================================== -->
13751
14181
  <!-- ===================================== -->
13752
14182
 
14183
+ <xsl:attribute-set name="annex-title-style">
14184
+ </xsl:attribute-set>
14185
+
14186
+ <xsl:template name="refine_annex-title-style">
14187
+ </xsl:template>
14188
+
14189
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
14190
+ </xsl:attribute-set>
14191
+
14192
+ <xsl:template name="refine_p-zzSTDTitle1-style">
14193
+ </xsl:template>
14194
+
13753
14195
  <xsl:template name="processPrefaceSectionsDefault">
13754
14196
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
13755
14197
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -14088,10 +14530,17 @@
14088
14530
  </xsl:choose>
14089
14531
  </xsl:template>
14090
14532
 
14533
+ <xsl:attribute-set name="clause-style">
14534
+
14535
+ </xsl:attribute-set>
14536
+
14537
+ <xsl:template name="refine_clause-style">
14538
+ </xsl:template>
14539
+
14091
14540
  <!-- main sections -->
14092
14541
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
14093
14542
  <xsl:call-template name="setNamedDestination"/>
14094
- <fo:block>
14543
+ <fo:block role="Sect">
14095
14544
  <xsl:call-template name="setId"/>
14096
14545
 
14097
14546
  <xsl:call-template name="sections_element_style"/>
@@ -14215,6 +14664,10 @@
14215
14664
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
14216
14665
  </xsl:template>
14217
14666
 
14667
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
14668
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
14669
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
14670
+
14218
14671
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
14219
14672
  <xsl:template name="insert_basic_link">
14220
14673
  <xsl:param name="element"/>