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.
@@ -3067,7 +3067,7 @@
3067
3067
 
3068
3068
  <xsl:template match="mn:fmt-preferred" priority="2">
3069
3069
  <fo:block font-weight="bold" keep-with-next="always" space-before="8pt" margin-bottom="6pt">
3070
- <xsl:call-template name="setStyle_preferred"/>
3070
+ <xsl:call-template name="refine_preferred-term-style"/>
3071
3071
  <xsl:if test="ancestor::mn:term[1]/mn:fmt-name">
3072
3072
  <xsl:variable name="level">
3073
3073
  <xsl:call-template name="getLevelTermName"/>
@@ -4290,6 +4290,7 @@
4290
4290
  <xsl:variable name="en_dash">–</xsl:variable>
4291
4291
  <xsl:variable name="em_dash">—</xsl:variable>
4292
4292
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
4293
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
4293
4294
  <xsl:variable name="cr">&#13;</xsl:variable>
4294
4295
  <xsl:variable name="lf">
4295
4296
  </xsl:variable>
@@ -4832,6 +4833,7 @@
4832
4833
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
4833
4834
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
4834
4835
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
4836
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
4835
4837
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
4836
4838
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
4837
4839
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -4846,10 +4848,10 @@
4846
4848
 
4847
4849
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
4848
4850
 
4849
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
4851
+ <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">
4850
4852
  <xsl:copy>
4851
4853
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
4852
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
4854
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
4853
4855
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
4854
4856
  </xsl:copy>
4855
4857
  </xsl:template>
@@ -5641,12 +5643,18 @@
5641
5643
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
5642
5644
  </xsl:attribute-set> <!-- license-statement-style -->
5643
5645
 
5646
+ <xsl:template name="refine_license-statement-style">
5647
+ </xsl:template>
5648
+
5644
5649
  <xsl:attribute-set name="license-statement-title-style">
5645
5650
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5646
5651
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
5647
5652
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5648
5653
  </xsl:attribute-set> <!-- license-statement-title-style -->
5649
5654
 
5655
+ <xsl:template name="refine_license-statement-title-style">
5656
+ </xsl:template>
5657
+
5650
5658
  <xsl:attribute-set name="license-statement-p-style">
5651
5659
  <xsl:attribute name="text-align">justify</xsl:attribute>
5652
5660
  <xsl:attribute name="line-height">135%</xsl:attribute>
@@ -5659,25 +5667,49 @@
5659
5667
  <xsl:attribute-set name="legal-statement-style">
5660
5668
  </xsl:attribute-set> <!-- legal-statement-style -->
5661
5669
 
5670
+ <xsl:template name="refine_legal-statement-style">
5671
+ </xsl:template>
5672
+
5662
5673
  <xsl:attribute-set name="legal-statement-title-style">
5663
5674
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5664
5675
  </xsl:attribute-set> <!-- legal-statement-title-style -->
5665
5676
 
5677
+ <xsl:template name="refine_legal-statement-title-style">
5678
+ </xsl:template>
5679
+
5666
5680
  <xsl:attribute-set name="legal-statement-p-style">
5667
5681
  </xsl:attribute-set> <!-- legal-statement-p-style -->
5668
5682
 
5683
+ <xsl:template name="refine_legal-statement-p-style">
5684
+ <xsl:if test="@align">
5685
+ <xsl:attribute name="text-align">
5686
+ <xsl:value-of select="@align"/>
5687
+ </xsl:attribute>
5688
+ </xsl:if>
5689
+ </xsl:template>
5690
+
5669
5691
  <xsl:attribute-set name="feedback-statement-style">
5670
5692
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5671
5693
  <xsl:attribute name="line-height">125%</xsl:attribute>
5672
5694
  </xsl:attribute-set> <!-- feedback-statement-style -->
5673
5695
 
5696
+ <xsl:template name="refine_feedback-statement-style">
5697
+ </xsl:template>
5698
+
5674
5699
  <xsl:attribute-set name="feedback-statement-title-style">
5675
5700
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5676
5701
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
5677
5702
 
5703
+ <xsl:template name="refine_feedback-statement-title-style">
5704
+
5705
+ </xsl:template>
5706
+
5678
5707
  <xsl:attribute-set name="feedback-statement-p-style">
5679
5708
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
5680
5709
 
5710
+ <xsl:template name="refine_feedback-statement-p-style">
5711
+ </xsl:template>
5712
+
5681
5713
  <!-- End boilerplate sections styles -->
5682
5714
 
5683
5715
  <!-- ================================= -->
@@ -5703,6 +5735,7 @@
5703
5735
 
5704
5736
  <xsl:template match="mn:license-statement">
5705
5737
  <fo:block xsl:use-attribute-sets="license-statement-style">
5738
+ <xsl:call-template name="refine_license-statement-style"/>
5706
5739
  <xsl:apply-templates/>
5707
5740
  </fo:block>
5708
5741
  </xsl:template> <!-- license-statement -->
@@ -5712,6 +5745,7 @@
5712
5745
  <xsl:call-template name="getLevel"/>
5713
5746
  </xsl:variable>
5714
5747
  <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
5748
+ <xsl:call-template name="refine_license-statement-title-style"/>
5715
5749
  <xsl:apply-templates/>
5716
5750
  </fo:block>
5717
5751
 
@@ -5728,6 +5762,7 @@
5728
5762
  <xsl:template match="mn:legal-statement">
5729
5763
  <xsl:param name="isLegacy">false</xsl:param>
5730
5764
  <fo:block xsl:use-attribute-sets="legal-statement-style">
5765
+ <xsl:call-template name="refine_legal-statement-style"/>
5731
5766
  <xsl:apply-templates/>
5732
5767
  </fo:block>
5733
5768
  </xsl:template> <!-- legal-statement -->
@@ -5897,6 +5932,27 @@
5897
5932
  <xsl:attribute-set name="sourcecode-container-style">
5898
5933
  </xsl:attribute-set>
5899
5934
 
5935
+ <xsl:template name="refine_sourcecode-container-style">
5936
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
5937
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5938
+ </xsl:if>
5939
+
5940
+ <xsl:if test="ancestor::mn:example">
5941
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5942
+ </xsl:if>
5943
+
5944
+ <xsl:copy-of select="@id"/>
5945
+
5946
+ <xsl:if test="parent::mn:note">
5947
+ <xsl:attribute name="margin-left">
5948
+ <xsl:choose>
5949
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
5950
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
5951
+ </xsl:choose>
5952
+ </xsl:attribute>
5953
+ </xsl:if>
5954
+ </xsl:template>
5955
+
5900
5956
  <xsl:attribute-set name="sourcecode-style">
5901
5957
  <xsl:attribute name="white-space">pre</xsl:attribute>
5902
5958
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -5906,6 +5962,12 @@
5906
5962
  <xsl:template name="refine_sourcecode-style">
5907
5963
  </xsl:template> <!-- refine_sourcecode-style -->
5908
5964
 
5965
+ <xsl:attribute-set name="sourcecode-number-style">
5966
+ </xsl:attribute-set>
5967
+
5968
+ <xsl:template name="refine_sourcecode-number-style">
5969
+ </xsl:template>
5970
+
5909
5971
  <xsl:attribute-set name="sourcecode-name-style">
5910
5972
  <xsl:attribute name="font-size">11pt</xsl:attribute>
5911
5973
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -5914,6 +5976,9 @@
5914
5976
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5915
5977
  </xsl:attribute-set> <!-- sourcecode-name-style -->
5916
5978
 
5979
+ <xsl:template name="refine_sourcecode-name-style">
5980
+ </xsl:template>
5981
+
5917
5982
  <xsl:template name="add-zero-spaces-equal">
5918
5983
  <xsl:param name="text" select="."/>
5919
5984
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -6001,24 +6066,8 @@
6001
6066
  <xsl:otherwise>
6002
6067
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
6003
6068
 
6004
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
6005
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6006
- </xsl:if>
6007
-
6008
- <xsl:if test="ancestor::mn:example">
6009
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
6010
- </xsl:if>
6069
+ <xsl:call-template name="refine_sourcecode-container-style"/>
6011
6070
 
6012
- <xsl:copy-of select="@id"/>
6013
-
6014
- <xsl:if test="parent::mn:note">
6015
- <xsl:attribute name="margin-left">
6016
- <xsl:choose>
6017
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
6018
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6019
- </xsl:choose>
6020
- </xsl:attribute>
6021
- </xsl:if>
6022
6071
  <fo:block-container margin-left="0mm" role="SKIP">
6023
6072
 
6024
6073
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -6345,6 +6394,7 @@
6345
6394
  <xsl:template match="mn:sourcecode/mn:fmt-name">
6346
6395
  <xsl:if test="normalize-space() != ''">
6347
6396
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
6397
+ <xsl:call-template name="refine_sourcecode-name-style"/>
6348
6398
  <xsl:apply-templates/>
6349
6399
  </fo:block>
6350
6400
  </xsl:if>
@@ -6391,11 +6441,30 @@
6391
6441
  <xsl:attribute-set name="pre-style">
6392
6442
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
6393
6443
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6394
- </xsl:attribute-set>
6444
+ </xsl:attribute-set> <!-- pre-style -->
6445
+
6446
+ <xsl:template name="refine_pre-style">
6447
+ </xsl:template>
6395
6448
 
6396
6449
  <xsl:attribute-set name="tt-style">
6397
6450
  </xsl:attribute-set>
6398
6451
 
6452
+ <xsl:template name="refine_tt-style">
6453
+ <xsl:variable name="_font-size"> <!-- inherit -->
6454
+ </xsl:variable>
6455
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6456
+ <xsl:if test="$font-size != ''">
6457
+ <xsl:attribute name="font-size">
6458
+ <xsl:choose>
6459
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
6460
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
6461
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
6462
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
6463
+ </xsl:choose>
6464
+ </xsl:attribute>
6465
+ </xsl:if>
6466
+ </xsl:template>
6467
+
6399
6468
  <xsl:variable name="color-added-text">
6400
6469
  <xsl:text>rgb(0, 255, 0)</xsl:text>
6401
6470
  </xsl:variable>
@@ -6408,9 +6477,14 @@
6408
6477
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
6409
6478
  </xsl:attribute-set>
6410
6479
 
6480
+ <xsl:template name="refine_add-style">
6481
+ </xsl:template>
6482
+
6411
6483
  <xsl:variable name="add-style">
6412
- <add-style xsl:use-attribute-sets="add-style"/>
6413
- </xsl:variable>
6484
+ <add-style xsl:use-attribute-sets="add-style">
6485
+ <xsl:call-template name="refine_add-style"/>
6486
+ </add-style>
6487
+ </xsl:variable>
6414
6488
  <xsl:template name="append_add-style">
6415
6489
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
6416
6490
  </xsl:template>
@@ -6423,24 +6497,77 @@
6423
6497
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6424
6498
  </xsl:attribute-set>
6425
6499
 
6500
+ <xsl:template name="refine_del-style">
6501
+ </xsl:template>
6502
+
6503
+ <xsl:attribute-set name="strong-style">
6504
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6505
+ </xsl:attribute-set>
6506
+
6507
+ <xsl:template name="refine_strong_style">
6508
+ <xsl:if test="ancestor::*['preferred']">
6509
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6510
+ </xsl:if>
6511
+ </xsl:template> <!-- refine_strong_style -->
6512
+
6513
+ <xsl:attribute-set name="em-style">
6514
+ <xsl:attribute name="font-style">italic</xsl:attribute>
6515
+ </xsl:attribute-set>
6516
+
6517
+ <xsl:template name="refine_em_style">
6518
+ </xsl:template> <!-- refine_em_style -->
6519
+
6520
+ <xsl:attribute-set name="sup-style">
6521
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6522
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6523
+ </xsl:attribute-set>
6524
+
6525
+ <xsl:template name="refine_sup-style">
6526
+ </xsl:template>
6527
+
6528
+ <xsl:attribute-set name="sub-style">
6529
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6530
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
6531
+ </xsl:attribute-set>
6532
+
6533
+ <xsl:template name="refine_sub-style">
6534
+ </xsl:template>
6535
+
6536
+ <xsl:attribute-set name="underline-style">
6537
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6538
+ </xsl:attribute-set>
6539
+
6540
+ <xsl:template name="refine_underline-style">
6541
+ </xsl:template>
6542
+
6543
+ <xsl:attribute-set name="hi-style">
6544
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
6545
+ </xsl:attribute-set>
6546
+
6547
+ <xsl:template name="refine_hi-style">
6548
+ </xsl:template>
6549
+
6550
+ <xsl:attribute-set name="strike-style">
6551
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6552
+ </xsl:attribute-set>
6553
+
6554
+ <xsl:template name="refine_strike-style">
6555
+ </xsl:template>
6556
+
6426
6557
  <xsl:template match="mn:br">
6427
6558
  <xsl:value-of select="$linebreak"/>
6428
6559
  </xsl:template>
6429
6560
 
6430
- <xsl:template match="mn:em">
6431
- <fo:inline font-style="italic">
6432
- <xsl:call-template name="refine_italic_style"/>
6561
+ <xsl:template match="mn:em">
6562
+ <fo:inline xsl:use-attribute-sets="em-style">
6563
+ <xsl:call-template name="refine_em_style"/>
6433
6564
  <xsl:apply-templates/>
6434
6565
  </fo:inline>
6435
6566
  </xsl:template>
6436
6567
 
6437
- <xsl:template name="refine_italic_style">
6438
- </xsl:template>
6439
-
6440
6568
  <xsl:template match="mn:strong | *[local-name()='b']">
6441
6569
  <xsl:param name="split_keep-within-line"/>
6442
- <fo:inline font-weight="bold">
6443
-
6570
+ <fo:inline xsl:use-attribute-sets="strong-style">
6444
6571
  <xsl:call-template name="refine_strong_style"/>
6445
6572
 
6446
6573
  <xsl:apply-templates>
@@ -6449,44 +6576,27 @@
6449
6576
  </fo:inline>
6450
6577
  </xsl:template>
6451
6578
 
6452
- <xsl:template name="refine_strong_style">
6453
- <xsl:if test="ancestor::*['preferred']">
6454
- <xsl:attribute name="role">SKIP</xsl:attribute>
6455
- </xsl:if>
6456
- </xsl:template>
6457
-
6458
6579
  <xsl:template match="*[local-name()='padding']">
6459
6580
  <fo:inline padding-right="{@value}"> </fo:inline>
6460
6581
  </xsl:template>
6461
6582
 
6462
6583
  <xsl:template match="mn:sup">
6463
- <fo:inline font-size="80%" vertical-align="super">
6584
+ <fo:inline xsl:use-attribute-sets="sup-style">
6585
+ <xsl:call-template name="refine_sup-style"/>
6464
6586
  <xsl:apply-templates/>
6465
6587
  </fo:inline>
6466
6588
  </xsl:template>
6467
6589
 
6468
6590
  <xsl:template match="mn:sub">
6469
- <fo:inline font-size="80%" vertical-align="sub">
6591
+ <fo:inline xsl:use-attribute-sets="sub-style">
6592
+ <xsl:call-template name="refine_sub-style"/>
6470
6593
  <xsl:apply-templates/>
6471
6594
  </fo:inline>
6472
6595
  </xsl:template>
6473
6596
 
6474
6597
  <xsl:template match="mn:tt">
6475
6598
  <fo:inline xsl:use-attribute-sets="tt-style">
6476
-
6477
- <xsl:variable name="_font-size"> <!-- inherit -->
6478
- </xsl:variable>
6479
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6480
- <xsl:if test="$font-size != ''">
6481
- <xsl:attribute name="font-size">
6482
- <xsl:choose>
6483
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
6484
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
6485
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
6486
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
6487
- </xsl:choose>
6488
- </xsl:attribute>
6489
- </xsl:if>
6599
+ <xsl:call-template name="refine_tt-style"/>
6490
6600
  <xsl:apply-templates/>
6491
6601
  </fo:inline>
6492
6602
  </xsl:template> <!-- tt -->
@@ -6505,7 +6615,8 @@
6505
6615
  </xsl:template>
6506
6616
 
6507
6617
  <xsl:template match="mn:underline">
6508
- <fo:inline text-decoration="underline">
6618
+ <fo:inline xsl:use-attribute-sets="underline-style">
6619
+ <xsl:call-template name="refine_underline-style"/>
6509
6620
  <xsl:apply-templates/>
6510
6621
  </fo:inline>
6511
6622
  </xsl:template>
@@ -6663,6 +6774,7 @@
6663
6774
 
6664
6775
  <xsl:template match="mn:del">
6665
6776
  <fo:inline xsl:use-attribute-sets="del-style">
6777
+ <xsl:call-template name="refine_del-style"/>
6666
6778
  <xsl:apply-templates/>
6667
6779
  </fo:inline>
6668
6780
  </xsl:template>
@@ -6672,7 +6784,8 @@
6672
6784
 
6673
6785
  <!-- highlight text -->
6674
6786
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
6675
- <fo:inline background-color="yellow">
6787
+ <fo:inline xsl:use-attribute-sets="hi-style">
6788
+ <xsl:call-template name="refine_hi-style"/>
6676
6789
  <xsl:apply-templates/>
6677
6790
  </fo:inline>
6678
6791
  </xsl:template>
@@ -6758,7 +6871,8 @@
6758
6871
  </xsl:template>
6759
6872
 
6760
6873
  <xsl:template match="mn:strike">
6761
- <fo:inline text-decoration="line-through">
6874
+ <fo:inline xsl:use-attribute-sets="strike-style">
6875
+ <xsl:call-template name="refine_strike-style"/>
6762
6876
  <xsl:apply-templates/>
6763
6877
  </fo:inline>
6764
6878
  </xsl:template>
@@ -6838,6 +6952,7 @@
6838
6952
 
6839
6953
  <xsl:template match="mn:pre" name="pre">
6840
6954
  <fo:block xsl:use-attribute-sets="pre-style">
6955
+ <xsl:call-template name="refine_pre-style"/>
6841
6956
  <xsl:copy-of select="@id"/>
6842
6957
  <xsl:choose>
6843
6958
 
@@ -6868,22 +6983,40 @@
6868
6983
  <xsl:attribute-set name="permission-style">
6869
6984
  </xsl:attribute-set>
6870
6985
 
6986
+ <xsl:template name="refine_permission-style">
6987
+ </xsl:template>
6988
+
6871
6989
  <xsl:attribute-set name="permission-name-style">
6872
6990
  </xsl:attribute-set>
6873
6991
 
6992
+ <xsl:template name="refine_permission-name-style">
6993
+ </xsl:template>
6994
+
6874
6995
  <xsl:attribute-set name="permission-label-style">
6875
6996
  </xsl:attribute-set>
6876
6997
 
6998
+ <xsl:template name="refine_permission-label-style">
6999
+ </xsl:template>
7000
+
6877
7001
  <xsl:attribute-set name="requirement-style">
6878
7002
  </xsl:attribute-set>
6879
7003
 
7004
+ <xsl:template name="refine_requirement-style">
7005
+ </xsl:template>
7006
+
6880
7007
  <xsl:attribute-set name="requirement-name-style">
6881
7008
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6882
7009
  </xsl:attribute-set>
6883
7010
 
7011
+ <xsl:template name="refine_requirement-name-style">
7012
+ </xsl:template>
7013
+
6884
7014
  <xsl:attribute-set name="requirement-label-style">
6885
7015
  </xsl:attribute-set>
6886
7016
 
7017
+ <xsl:template name="refine_requirement-label-style">
7018
+ </xsl:template>
7019
+
6887
7020
  <xsl:attribute-set name="subject-style">
6888
7021
  </xsl:attribute-set>
6889
7022
 
@@ -6911,18 +7044,28 @@
6911
7044
  <xsl:attribute-set name="recommendation-style">
6912
7045
  </xsl:attribute-set>
6913
7046
 
7047
+ <xsl:template name="refine_recommendation-style">
7048
+ </xsl:template>
7049
+
6914
7050
  <xsl:attribute-set name="recommendation-name-style">
6915
7051
  </xsl:attribute-set>
6916
7052
 
7053
+ <xsl:template name="refine_recommendation-name-style">
7054
+ </xsl:template>
7055
+
6917
7056
  <xsl:attribute-set name="recommendation-label-style">
6918
7057
  </xsl:attribute-set>
6919
7058
 
7059
+ <xsl:template name="refine_recommendation-label-style">
7060
+ </xsl:template>
7061
+
6920
7062
  <!-- ========== -->
6921
7063
  <!-- permission -->
6922
7064
  <!-- ========== -->
6923
7065
  <xsl:template match="mn:permission">
6924
7066
  <xsl:call-template name="setNamedDestination"/>
6925
7067
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
7068
+ <xsl:call-template name="refine_permission-style"/>
6926
7069
  <xsl:apply-templates select="mn:fmt-name"/>
6927
7070
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6928
7071
  </fo:block>
@@ -6931,6 +7074,7 @@
6931
7074
  <xsl:template match="mn:permission/mn:fmt-name">
6932
7075
  <xsl:if test="normalize-space() != ''">
6933
7076
  <fo:block xsl:use-attribute-sets="permission-name-style">
7077
+ <xsl:call-template name="refine_permission-name-style"/>
6934
7078
  <xsl:apply-templates/>
6935
7079
  </fo:block>
6936
7080
  </xsl:if>
@@ -6938,6 +7082,7 @@
6938
7082
 
6939
7083
  <xsl:template match="mn:permission/mn:label">
6940
7084
  <fo:block xsl:use-attribute-sets="permission-label-style">
7085
+ <xsl:call-template name="refine_permission-label-style"/>
6941
7086
  <xsl:apply-templates/>
6942
7087
  </fo:block>
6943
7088
  </xsl:template>
@@ -6950,6 +7095,7 @@
6950
7095
  <xsl:template match="mn:requirement">
6951
7096
  <xsl:call-template name="setNamedDestination"/>
6952
7097
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
7098
+ <xsl:call-template name="refine_requirement-style"/>
6953
7099
  <xsl:apply-templates select="mn:fmt-name"/>
6954
7100
  <xsl:apply-templates select="mn:label"/>
6955
7101
  <xsl:apply-templates select="@obligation"/>
@@ -6962,6 +7108,7 @@
6962
7108
  <xsl:if test="normalize-space() != ''">
6963
7109
 
6964
7110
  <fo:block xsl:use-attribute-sets="requirement-name-style">
7111
+ <xsl:call-template name="refine_requirement-name-style"/>
6965
7112
  <xsl:apply-templates/>
6966
7113
  </fo:block>
6967
7114
  </xsl:if>
@@ -6969,6 +7116,7 @@
6969
7116
 
6970
7117
  <xsl:template match="mn:requirement/mn:label">
6971
7118
  <fo:block xsl:use-attribute-sets="requirement-label-style">
7119
+ <xsl:call-template name="refine_requirement-label-style"/>
6972
7120
  <xsl:apply-templates/>
6973
7121
  </fo:block>
6974
7122
  </xsl:template>
@@ -6994,6 +7142,7 @@
6994
7142
  <xsl:template match="mn:recommendation">
6995
7143
  <xsl:call-template name="setNamedDestination"/>
6996
7144
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
7145
+ <xsl:call-template name="refine_recommendation-style"/>
6997
7146
  <xsl:apply-templates select="mn:fmt-name"/>
6998
7147
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6999
7148
  </fo:block>
@@ -7003,6 +7152,7 @@
7003
7152
  <xsl:if test="normalize-space() != ''">
7004
7153
 
7005
7154
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
7155
+ <xsl:call-template name="refine_recommendation-name-style"/>
7006
7156
  <xsl:apply-templates/>
7007
7157
  </fo:block>
7008
7158
  </xsl:if>
@@ -7010,6 +7160,7 @@
7010
7160
 
7011
7161
  <xsl:template match="mn:recommendation/mn:label">
7012
7162
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
7163
+ <xsl:call-template name="refine_recommendation-label-style"/>
7013
7164
  <xsl:apply-templates/>
7014
7165
  </fo:block>
7015
7166
  </xsl:template>
@@ -7190,34 +7341,70 @@
7190
7341
  <xsl:attribute-set name="term-style">
7191
7342
  </xsl:attribute-set> <!-- term-style -->
7192
7343
 
7344
+ <xsl:template name="refine_term-style">
7345
+ </xsl:template>
7346
+
7193
7347
  <xsl:attribute-set name="term-name-style">
7194
7348
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7195
7349
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7196
7350
  </xsl:attribute-set> <!-- term-name-style -->
7197
7351
 
7198
- <xsl:attribute-set name="preferred-block-style">
7352
+ <xsl:template name="refine_term-name-style">
7353
+ </xsl:template>
7354
+
7355
+ <xsl:attribute-set name="preferred-style">
7356
+ </xsl:attribute-set> <!-- preferred-style -->
7357
+
7358
+ <xsl:template name="refine_preferred-style">
7359
+ </xsl:template>
7360
+
7361
+ <xsl:attribute-set name="preferred-block-style">
7199
7362
  </xsl:attribute-set> <!-- preferred-block-style -->
7200
7363
 
7364
+ <xsl:template name="refine_preferred-block-style">
7365
+ </xsl:template>
7366
+
7201
7367
  <xsl:attribute-set name="preferred-term-style">
7202
7368
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7203
7369
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7204
7370
  </xsl:attribute-set> <!-- preferred-term-style -->
7205
7371
 
7372
+ <xsl:template name="refine_preferred-term-style">
7373
+ <xsl:if test="mn:strong">
7374
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
7375
+ </xsl:if>
7376
+ </xsl:template>
7377
+
7206
7378
  <xsl:attribute-set name="domain-style">
7207
7379
  </xsl:attribute-set> <!-- domain-style -->
7208
7380
 
7381
+ <xsl:template name="refine_domain-style">
7382
+ </xsl:template>
7383
+
7209
7384
  <xsl:attribute-set name="admitted-style">
7210
7385
  </xsl:attribute-set> <!-- admitted-style -->
7211
7386
 
7387
+ <xsl:template name="refine_admitted-style">
7388
+ </xsl:template>
7389
+
7212
7390
  <xsl:attribute-set name="deprecates-style">
7213
7391
  </xsl:attribute-set> <!-- deprecates-style -->
7214
7392
 
7393
+ <xsl:template name="refine_deprecates-style">
7394
+ </xsl:template>
7395
+
7215
7396
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
7216
7397
  </xsl:attribute-set>
7217
7398
 
7399
+ <xsl:template name="refine_related-block-style">
7400
+ </xsl:template>
7401
+
7218
7402
  <xsl:attribute-set name="definition-style">
7219
7403
  </xsl:attribute-set> <!-- definition-style -->
7220
7404
 
7405
+ <xsl:template name="refine_definition-style">
7406
+ </xsl:template>
7407
+
7221
7408
  <xsl:attribute-set name="termsource-style">
7222
7409
  </xsl:attribute-set> <!-- termsource-style -->
7223
7410
 
@@ -7227,9 +7414,15 @@
7227
7414
  <xsl:attribute-set name="termsource-text-style">
7228
7415
  </xsl:attribute-set> <!-- termsource-text-style -->
7229
7416
 
7417
+ <xsl:template name="refine_termsource-text-style">
7418
+ </xsl:template>
7419
+
7230
7420
  <xsl:attribute-set name="origin-style">
7231
7421
  </xsl:attribute-set> <!-- origin-style -->
7232
7422
 
7423
+ <xsl:template name="refine_origin-style">
7424
+ </xsl:template>
7425
+
7233
7426
  <!-- ====== -->
7234
7427
  <!-- term -->
7235
7428
  <!-- ====== -->
@@ -7245,9 +7438,8 @@
7245
7438
  <xsl:template match="mn:term">
7246
7439
  <xsl:call-template name="setNamedDestination"/>
7247
7440
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7441
+ <xsl:call-template name="refine_term-style"/>
7248
7442
 
7249
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
7250
- </xsl:if>
7251
7443
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7252
7444
  </fo:block>
7253
7445
  </xsl:template>
@@ -7323,6 +7515,7 @@
7323
7515
  <!-- text SOURCE: -->
7324
7516
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
7325
7517
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
7518
+ <xsl:call-template name="refine_termsource-text-style"/>
7326
7519
  <xsl:value-of select="."/>
7327
7520
  </fo:inline>
7328
7521
  </xsl:template>
@@ -7335,6 +7528,7 @@
7335
7528
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
7336
7529
  </xsl:if>
7337
7530
  <fo:inline xsl:use-attribute-sets="origin-style">
7531
+ <xsl:call-template name="refine_origin-style"/>
7338
7532
  <xsl:apply-templates/>
7339
7533
  </fo:inline>
7340
7534
  </fo:basic-link>
@@ -7384,9 +7578,12 @@
7384
7578
  </xsl:variable>
7385
7579
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
7386
7580
 
7581
+ <xsl:call-template name="refine_preferred-block-style"/>
7582
+
7387
7583
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
7388
7584
 
7389
7585
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
7586
+ <xsl:call-template name="refine_term-name-style"/>
7390
7587
 
7391
7588
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
7392
7589
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -7397,7 +7594,7 @@
7397
7594
  </xsl:if>
7398
7595
 
7399
7596
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
7400
- <xsl:call-template name="setStyle_preferred"/>
7597
+ <xsl:call-template name="refine_preferred-term-style"/>
7401
7598
 
7402
7599
  <xsl:apply-templates/>
7403
7600
  </fo:block>
@@ -7418,22 +7615,18 @@
7418
7615
 
7419
7616
  <xsl:template match="mn:fmt-admitted">
7420
7617
  <fo:block xsl:use-attribute-sets="admitted-style">
7618
+ <xsl:call-template name="refine_admitted-style"/>
7421
7619
  <xsl:apply-templates/>
7422
7620
  </fo:block>
7423
7621
  </xsl:template>
7424
7622
 
7425
7623
  <xsl:template match="mn:fmt-deprecates">
7426
7624
  <fo:block xsl:use-attribute-sets="deprecates-style">
7625
+ <xsl:call-template name="refine_deprecates-style"/>
7427
7626
  <xsl:apply-templates/>
7428
7627
  </fo:block>
7429
7628
  </xsl:template>
7430
7629
 
7431
- <xsl:template name="setStyle_preferred">
7432
- <xsl:if test="mn:strong">
7433
- <xsl:attribute name="font-weight">normal</xsl:attribute>
7434
- </xsl:if>
7435
- </xsl:template>
7436
-
7437
7630
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
7438
7631
  <!-- in metanorma xml preferred terms delimited by semicolons -->
7439
7632
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -7443,6 +7636,7 @@
7443
7636
 
7444
7637
  <xsl:template match="mn:fmt-related">
7445
7638
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
7639
+ <xsl:call-template name="refine_related-block-style"/>
7446
7640
  <xsl:apply-templates/>
7447
7641
  </fo:block>
7448
7642
  </xsl:template>
@@ -7457,6 +7651,7 @@
7457
7651
  <!-- ========== -->
7458
7652
  <xsl:template match="mn:fmt-definition">
7459
7653
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
7654
+ <xsl:call-template name="refine_definition-style"/>
7460
7655
  <xsl:apply-templates/>
7461
7656
  </fo:block>
7462
7657
  </xsl:template>
@@ -7503,6 +7698,9 @@
7503
7698
  <xsl:attribute-set name="example-body-style">
7504
7699
  </xsl:attribute-set> <!-- example-body-style -->
7505
7700
 
7701
+ <xsl:template name="refine_example-body-style">
7702
+ </xsl:template>
7703
+
7506
7704
  <xsl:attribute-set name="example-name-style">
7507
7705
  <xsl:attribute name="font-style">italic</xsl:attribute>
7508
7706
  </xsl:attribute-set> <!-- example-name-style -->
@@ -7548,6 +7746,8 @@
7548
7746
  <xsl:when test="contains($element, 'block')">
7549
7747
  <fo:block xsl:use-attribute-sets="example-p-style">
7550
7748
 
7749
+ <xsl:call-template name="refine_example-p-style"/>
7750
+
7551
7751
  <xsl:apply-templates/>
7552
7752
  </fo:block>
7553
7753
  </xsl:when>
@@ -7599,6 +7799,7 @@
7599
7799
  </fo:block>
7600
7800
 
7601
7801
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
7802
+ <xsl:call-template name="refine_example-body-style"/>
7602
7803
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7603
7804
  <xsl:variable name="example_body">
7604
7805
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -7661,6 +7862,7 @@
7661
7862
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
7662
7863
  <!-- display further elements in blocks -->
7663
7864
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
7865
+ <xsl:call-template name="refine_example-body-style"/>
7664
7866
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7665
7867
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
7666
7868
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -7790,6 +7992,12 @@
7790
7992
  <xsl:call-template name="setBordersTableArray"/>
7791
7993
  </xsl:template> <!-- refine_table-style -->
7792
7994
 
7995
+ <xsl:attribute-set name="table-number-style">
7996
+ </xsl:attribute-set>
7997
+
7998
+ <xsl:template name="refine_table-number-style">
7999
+ </xsl:template>
8000
+
7793
8001
  <xsl:attribute-set name="table-name-style">
7794
8002
  <xsl:attribute name="role">Caption</xsl:attribute>
7795
8003
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -7941,6 +8149,9 @@
7941
8149
  <!-- <xsl:attribute name="padding-right">2.5mm</xsl:attribute> -->
7942
8150
  </xsl:attribute-set> <!-- table-fn-number-style -->
7943
8151
 
8152
+ <xsl:template name="refine_table-fn-number-style">
8153
+ </xsl:template>
8154
+
7944
8155
  <xsl:attribute-set name="table-fmt-fn-label-style">
7945
8156
  <xsl:attribute name="font-size">80%</xsl:attribute>
7946
8157
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
@@ -7948,30 +8159,12 @@
7948
8159
  <xsl:template name="refine_table-fmt-fn-label-style">
7949
8160
  </xsl:template>
7950
8161
 
7951
- <xsl:attribute-set name="fn-container-body-style">
7952
- <xsl:attribute name="text-indent">0</xsl:attribute>
7953
- <xsl:attribute name="start-indent">0</xsl:attribute>
7954
- </xsl:attribute-set>
7955
-
7956
8162
  <xsl:attribute-set name="table-fn-body-style">
7957
8163
  </xsl:attribute-set>
7958
8164
 
7959
- <xsl:attribute-set name="figure-fn-number-style">
7960
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
7961
- </xsl:attribute-set> <!-- figure-fn-number-style -->
7962
-
7963
- <xsl:attribute-set name="figure-fmt-fn-label-style">
7964
- <xsl:attribute name="font-size">80%</xsl:attribute>
7965
- <xsl:attribute name="vertical-align">super</xsl:attribute>
7966
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
7967
-
7968
- <xsl:template name="refine_figure-fmt-fn-label-style">
8165
+ <xsl:template name="refine_table-fn-body-style">
7969
8166
  </xsl:template>
7970
8167
 
7971
- <xsl:attribute-set name="figure-fn-body-style">
7972
- <xsl:attribute name="text-align">justify</xsl:attribute>
7973
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7974
- </xsl:attribute-set>
7975
8168
  <!-- ========================== -->
7976
8169
  <!-- END Table styles -->
7977
8170
  <!-- ========================== -->
@@ -9265,6 +9458,7 @@
9265
9458
  </xsl:apply-templates>
9266
9459
 
9267
9460
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
9461
+ <xsl:call-template name="refine_table-fn-body-style"/>
9268
9462
  <!-- <xsl:copy-of select="./node()"/> -->
9269
9463
  <xsl:apply-templates/>
9270
9464
  </fo:inline>
@@ -9283,6 +9477,7 @@
9283
9477
  <xsl:param name="process">false</xsl:param>
9284
9478
  <xsl:if test="$process = 'true'">
9285
9479
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
9480
+ <xsl:call-template name="refine_table-fn-number-style"/>
9286
9481
 
9287
9482
  <!-- tab is padding-right -->
9288
9483
  <xsl:apply-templates select=".//mn:tab">
@@ -10158,9 +10353,18 @@
10158
10353
  <xsl:attribute-set name="dl-block-style">
10159
10354
  </xsl:attribute-set>
10160
10355
 
10356
+ <xsl:template name="refine_dl-block-style">
10357
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
10358
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10359
+ </xsl:if>
10360
+ </xsl:template>
10361
+
10161
10362
  <xsl:attribute-set name="dt-row-style">
10162
10363
  </xsl:attribute-set>
10163
10364
 
10365
+ <xsl:template name="refine_dt-row-style">
10366
+ </xsl:template>
10367
+
10164
10368
  <xsl:attribute-set name="dt-cell-style">
10165
10369
  </xsl:attribute-set>
10166
10370
 
@@ -10181,6 +10385,9 @@
10181
10385
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10182
10386
  </xsl:attribute-set> <!-- dl-name-style -->
10183
10387
 
10388
+ <xsl:template name="refine_dl-name-style">
10389
+ </xsl:template>
10390
+
10184
10391
  <xsl:attribute-set name="dd-cell-style">
10185
10392
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
10186
10393
  </xsl:attribute-set>
@@ -10219,9 +10426,7 @@
10219
10426
  <!-- <dl><xsl:copy-of select="."/></dl> -->
10220
10427
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
10221
10428
 
10222
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
10223
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10224
- </xsl:if>
10429
+ <xsl:call-template name="refine_dl-block-style"/>
10225
10430
 
10226
10431
  <xsl:call-template name="setBlockSpanAll"/>
10227
10432
  <xsl:if test="not(ancestor::mn:li)">
@@ -10519,6 +10724,8 @@
10519
10724
  <xsl:if test="$process = 'true'">
10520
10725
  <fo:block xsl:use-attribute-sets="dl-name-style">
10521
10726
 
10727
+ <xsl:call-template name="refine_dl-name-style"/>
10728
+
10522
10729
  <xsl:apply-templates/>
10523
10730
  </fo:block>
10524
10731
  </xsl:if>
@@ -10707,6 +10914,8 @@
10707
10914
  <xsl:param name="split_keep-within-line"/>
10708
10915
 
10709
10916
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
10917
+ <xsl:call-template name="refine_dt-row-style"/>
10918
+
10710
10919
  <xsl:call-template name="insert_dt_cell">
10711
10920
  <xsl:with-param name="key_iso" select="$key_iso"/>
10712
10921
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -10916,15 +11125,22 @@
10916
11125
  <xsl:attribute-set name="appendix-style">
10917
11126
  </xsl:attribute-set>
10918
11127
 
11128
+ <xsl:template name="refine_appendix-style">
11129
+ </xsl:template>
11130
+
10919
11131
  <xsl:attribute-set name="appendix-example-style">
10920
11132
  </xsl:attribute-set>
10921
11133
 
11134
+ <xsl:template name="refine_appendix-example-style">
11135
+ </xsl:template>
11136
+
10922
11137
  <!-- ======================== -->
10923
11138
  <!-- Appendix processing -->
10924
11139
  <!-- ======================== -->
10925
11140
  <xsl:template match="mn:appendix">
10926
11141
  <xsl:call-template name="setNamedDestination"/>
10927
11142
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
11143
+ <xsl:call-template name="refine_appendix-style"/>
10928
11144
  <xsl:apply-templates select="mn:fmt-title"/>
10929
11145
  </fo:block>
10930
11146
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -10943,13 +11159,23 @@
10943
11159
  <xsl:template match="mn:appendix//mn:example" priority="2">
10944
11160
  <xsl:call-template name="setNamedDestination"/>
10945
11161
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
11162
+ <xsl:call-template name="refine_appendix-example-style"/>
10946
11163
  <xsl:apply-templates select="mn:fmt-name"/>
10947
11164
  </fo:block>
10948
11165
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10949
11166
  </xsl:template>
10950
11167
 
10951
11168
  <xsl:attribute-set name="xref-style">
10952
- </xsl:attribute-set>
11169
+ </xsl:attribute-set> <!-- xref-style -->
11170
+
11171
+ <xsl:template name="refine_xref-style">
11172
+ <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])">
11173
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
11174
+ </xsl:if>
11175
+ <xsl:if test="parent::mn:add">
11176
+ <xsl:call-template name="append_add-style"/>
11177
+ </xsl:if>
11178
+ </xsl:template> <!-- refine_xref-style -->
10953
11179
 
10954
11180
  <xsl:template match="mn:fmt-xref">
10955
11181
  <xsl:call-template name="insert_basic_link">
@@ -10958,12 +11184,8 @@
10958
11184
  <xsl:call-template name="getAltText"/>
10959
11185
  </xsl:variable>
10960
11186
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
10961
- <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])">
10962
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
10963
- </xsl:if>
10964
- <xsl:if test="parent::mn:add">
10965
- <xsl:call-template name="append_add-style"/>
10966
- </xsl:if>
11187
+ <xsl:call-template name="refine_xref-style"/>
11188
+
10967
11189
  <xsl:apply-templates/>
10968
11190
  </fo:basic-link>
10969
11191
  </xsl:with-param>
@@ -11080,20 +11302,20 @@
11080
11302
  <xsl:attribute-set name="note-style">
11081
11303
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11082
11304
  <xsl:attribute name="text-align">justify</xsl:attribute>
11083
- </xsl:attribute-set>
11305
+ </xsl:attribute-set> <!-- note-style -->
11084
11306
 
11085
11307
  <xsl:template name="refine_note-style">
11086
11308
  <xsl:if test="parent::mn:li">
11087
11309
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
11088
11310
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
11089
11311
  </xsl:if>
11090
- </xsl:template>
11312
+ </xsl:template> <!-- refine_note-style -->
11091
11313
 
11092
11314
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
11093
11315
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
11094
11316
 
11095
11317
  <xsl:attribute-set name="note-name-style">
11096
- </xsl:attribute-set>
11318
+ </xsl:attribute-set> <!-- note-name-style -->
11097
11319
 
11098
11320
  <xsl:template name="refine_note-name-style">
11099
11321
  </xsl:template> <!-- refine_note-name-style -->
@@ -11111,19 +11333,22 @@
11111
11333
 
11112
11334
  <xsl:attribute-set name="note-p-style">
11113
11335
  <xsl:attribute name="text-align">justify</xsl:attribute>
11114
- </xsl:attribute-set>
11336
+ </xsl:attribute-set> <!-- note-p-style -->
11337
+
11338
+ <xsl:template name="refine_note-p-style">
11339
+ </xsl:template>
11115
11340
 
11116
11341
  <xsl:attribute-set name="termnote-style">
11117
11342
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11118
11343
  <xsl:attribute name="text-align">justify</xsl:attribute>
11119
- </xsl:attribute-set>
11344
+ </xsl:attribute-set> <!-- termnote-style -->
11120
11345
 
11121
11346
  <xsl:template name="refine_termnote-style">
11122
11347
  </xsl:template> <!-- refine_termnote-style -->
11123
11348
 
11124
11349
  <xsl:attribute-set name="termnote-name-style">
11125
11350
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
11126
- </xsl:attribute-set>
11351
+ </xsl:attribute-set> <!-- termnote-name-style -->
11127
11352
 
11128
11353
  <xsl:template name="refine_termnote-name-style">
11129
11354
  </xsl:template>
@@ -11132,6 +11357,9 @@
11132
11357
  <xsl:attribute name="text-align">justify</xsl:attribute>
11133
11358
  </xsl:attribute-set>
11134
11359
 
11360
+ <xsl:template name="refine_termnote-p-style">
11361
+ </xsl:template>
11362
+
11135
11363
  <!-- ====== -->
11136
11364
  <!-- note -->
11137
11365
  <!-- termnote -->
@@ -11198,11 +11426,13 @@
11198
11426
  <xsl:choose>
11199
11427
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
11200
11428
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
11429
+ <xsl:call-template name="refine_note-p-style"/>
11201
11430
  <xsl:apply-templates/>
11202
11431
  </fo:inline>
11203
11432
  </xsl:when>
11204
11433
  <xsl:otherwise>
11205
11434
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
11435
+ <xsl:call-template name="refine_note-p-style"/>
11206
11436
  <xsl:apply-templates/>
11207
11437
  </fo:block>
11208
11438
  </xsl:otherwise>
@@ -11306,11 +11536,13 @@
11306
11536
  <xsl:choose>
11307
11537
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
11308
11538
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
11539
+ <xsl:call-template name="refine_termnote-p-style"/>
11309
11540
  <xsl:apply-templates/>
11310
11541
  </fo:inline>
11311
11542
  </xsl:when>
11312
11543
  <xsl:otherwise>
11313
11544
  <fo:block xsl:use-attribute-sets="termnote-p-style">
11545
+ <xsl:call-template name="refine_termnote-p-style"/>
11314
11546
  <xsl:apply-templates/>
11315
11547
  </fo:block>
11316
11548
  </xsl:otherwise>
@@ -11323,7 +11555,7 @@
11323
11555
  <xsl:attribute-set name="quote-style">
11324
11556
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
11325
11557
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
11326
- </xsl:attribute-set>
11558
+ </xsl:attribute-set> <!-- quote-style -->
11327
11559
 
11328
11560
  <xsl:template name="refine_quote-style">
11329
11561
  </xsl:template>
@@ -11332,6 +11564,9 @@
11332
11564
  <xsl:attribute name="text-align">right</xsl:attribute>
11333
11565
  </xsl:attribute-set>
11334
11566
 
11567
+ <xsl:template name="refine_quote-source-style">
11568
+ </xsl:template>
11569
+
11335
11570
  <!-- ====== -->
11336
11571
  <!-- quote -->
11337
11572
  <!-- source -->
@@ -11360,6 +11595,7 @@
11360
11595
  </fo:block-container>
11361
11596
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
11362
11597
  <fo:block xsl:use-attribute-sets="quote-source-style">
11598
+ <xsl:call-template name="refine_quote-source-style"/>
11363
11599
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
11364
11600
  <xsl:apply-templates select="mn:author"/>
11365
11601
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -11424,6 +11660,15 @@
11424
11660
  <xsl:attribute-set name="figure-style">
11425
11661
  </xsl:attribute-set>
11426
11662
 
11663
+ <xsl:template name="refine_figure-style">
11664
+ </xsl:template>
11665
+
11666
+ <xsl:attribute-set name="figure-number-style">
11667
+ </xsl:attribute-set>
11668
+
11669
+ <xsl:template name="refine_figure-number-style">
11670
+ </xsl:template>
11671
+
11427
11672
  <xsl:attribute-set name="figure-name-style">
11428
11673
  <xsl:attribute name="role">Caption</xsl:attribute>
11429
11674
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
@@ -11431,7 +11676,7 @@
11431
11676
  <xsl:attribute name="text-align">left</xsl:attribute>
11432
11677
  <xsl:attribute name="margin-left">19mm</xsl:attribute>
11433
11678
  <xsl:attribute name="text-indent">-19mm</xsl:attribute>
11434
- </xsl:attribute-set>
11679
+ </xsl:attribute-set> <!-- figure-name-style -->
11435
11680
 
11436
11681
  <xsl:template name="refine_figure-name-style">
11437
11682
  </xsl:template> <!-- refine_figure-name-style -->
@@ -11439,7 +11684,7 @@
11439
11684
  <xsl:attribute-set name="image-style">
11440
11685
  <xsl:attribute name="role">SKIP</xsl:attribute>
11441
11686
  <xsl:attribute name="text-align">center</xsl:attribute>
11442
- </xsl:attribute-set>
11687
+ </xsl:attribute-set> <!-- image-style -->
11443
11688
 
11444
11689
  <xsl:template name="refine_image-style">
11445
11690
  </xsl:template>
@@ -11449,14 +11694,51 @@
11449
11694
  <xsl:attribute name="content-height">100%</xsl:attribute>
11450
11695
  <xsl:attribute name="scaling">uniform</xsl:attribute>
11451
11696
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
11452
- </xsl:attribute-set>
11697
+ </xsl:attribute-set> <!-- image-graphic-style -->
11698
+
11699
+ <xsl:template name="refine_image-graphic-style">
11700
+ </xsl:template>
11453
11701
 
11454
11702
  <xsl:attribute-set name="figure-source-style">
11455
11703
  </xsl:attribute-set>
11456
11704
 
11705
+ <xsl:template name="refine_figure-source-style">
11706
+ </xsl:template>
11707
+
11457
11708
  <xsl:attribute-set name="figure-pseudocode-p-style">
11458
11709
  </xsl:attribute-set>
11459
11710
 
11711
+ <xsl:template name="refine_figure-pseudocode-p-style">
11712
+ </xsl:template>
11713
+
11714
+ <xsl:attribute-set name="figure-fn-number-style">
11715
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
11716
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
11717
+
11718
+ <xsl:template name="refine_figure-fn-number-style">
11719
+ </xsl:template>
11720
+
11721
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
11722
+ <xsl:attribute name="font-size">80%</xsl:attribute>
11723
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
11724
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
11725
+
11726
+ <xsl:template name="refine_figure-fmt-fn-label-style">
11727
+ </xsl:template>
11728
+
11729
+ <xsl:attribute-set name="figure-fn-body-style">
11730
+ <xsl:attribute name="text-align">justify</xsl:attribute>
11731
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11732
+ </xsl:attribute-set>
11733
+
11734
+ <xsl:template name="refine_figure-fn-body-style">
11735
+ <xsl:variable name="key_iso">
11736
+ </xsl:variable>
11737
+ <xsl:if test="normalize-space($key_iso) = 'true'">
11738
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
11739
+ </xsl:if>
11740
+ </xsl:template>
11741
+
11460
11742
  <!-- ============================ -->
11461
11743
  <!-- figure's footnotes rendering -->
11462
11744
  <!-- ============================ -->
@@ -11569,9 +11851,8 @@
11569
11851
  </fo:table-cell>
11570
11852
  <fo:table-cell>
11571
11853
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
11572
- <xsl:if test="normalize-space($key_iso) = 'true'">
11573
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
11574
- </xsl:if>
11854
+ <xsl:call-template name="refine_figure-fn-body-style"/>
11855
+
11575
11856
  <!-- <xsl:copy-of select="./node()"/> -->
11576
11857
  <xsl:apply-templates/>
11577
11858
  </fo:block>
@@ -11589,6 +11870,7 @@
11589
11870
  <xsl:param name="process">false</xsl:param>
11590
11871
  <xsl:if test="$process = 'true'">
11591
11872
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
11873
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11592
11874
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
11593
11875
 
11594
11876
  <!-- tab is padding-right -->
@@ -11626,6 +11908,7 @@
11626
11908
  <xsl:attribute name="font-size">10pt</xsl:attribute>
11627
11909
  </xsl:if>
11628
11910
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
11911
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11629
11912
  <!-- <xsl:value-of select="@reference"/> -->
11630
11913
  <xsl:apply-templates/>
11631
11914
  </fo:inline>
@@ -11671,6 +11954,8 @@
11671
11954
 
11672
11955
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
11673
11956
 
11957
+ <xsl:call-template name="refine_figure-style"/>
11958
+
11674
11959
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
11675
11960
  <xsl:call-template name="setIDforNamedDestination"/>
11676
11961
  </xsl:for-each>
@@ -11714,6 +11999,7 @@
11714
11999
 
11715
12000
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
11716
12001
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
12002
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
11717
12003
  <xsl:apply-templates/>
11718
12004
  </fo:block>
11719
12005
  </xsl:template>
@@ -11843,6 +12129,8 @@
11843
12129
  </xsl:variable>
11844
12130
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
11845
12131
 
12132
+ <xsl:call-template name="refine_image-graphic-style"/>
12133
+
11846
12134
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
11847
12135
  <xsl:variable name="scale">
11848
12136
  <xsl:call-template name="getImageScale">
@@ -12543,6 +12831,9 @@
12543
12831
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
12544
12832
  </xsl:attribute-set> <!-- formula-style -->
12545
12833
 
12834
+ <xsl:template name="refine_formula-style">
12835
+ </xsl:template>
12836
+
12546
12837
  <xsl:attribute-set name="formula-stem-block-style">
12547
12838
  <xsl:attribute name="text-align">center</xsl:attribute>
12548
12839
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -12614,6 +12905,8 @@
12614
12905
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
12615
12906
  <fo:block xsl:use-attribute-sets="formula-style">
12616
12907
 
12908
+ <xsl:call-template name="refine_formula-style"/>
12909
+
12617
12910
  <fo:table table-layout="fixed" width="100%">
12618
12911
  <fo:table-column column-width="95%"/>
12619
12912
  <fo:table-column column-width="5%"/>
@@ -13063,6 +13356,9 @@
13063
13356
  <xsl:attribute name="font-weight">bold</xsl:attribute>
13064
13357
  </xsl:attribute-set> <!-- list-name-style -->
13065
13358
 
13359
+ <xsl:template name="refine_list-name-style">
13360
+ </xsl:template>
13361
+
13066
13362
  <xsl:attribute-set name="list-item-style">
13067
13363
  </xsl:attribute-set>
13068
13364
 
@@ -13362,6 +13658,7 @@
13362
13658
  <xsl:param name="process">false</xsl:param>
13363
13659
  <xsl:if test="$process = 'true'">
13364
13660
  <fo:block xsl:use-attribute-sets="list-name-style">
13661
+ <xsl:call-template name="refine_list-name-style"/>
13365
13662
  <xsl:apply-templates/>
13366
13663
  </fo:block>
13367
13664
  </xsl:if>
@@ -13422,27 +13719,48 @@
13422
13719
  <!-- END Lists processing -->
13423
13720
  <!-- ===================================== -->
13424
13721
 
13722
+ <xsl:attribute-set name="footnote-separator-leader-style">
13723
+ </xsl:attribute-set>
13724
+
13725
+ <xsl:template name="refine_footnote-separator-leader-style">
13726
+ </xsl:template>
13727
+
13728
+ <xsl:attribute-set name="fn-container-body-style">
13729
+ <xsl:attribute name="text-indent">0</xsl:attribute>
13730
+ <xsl:attribute name="start-indent">0</xsl:attribute>
13731
+ </xsl:attribute-set>
13732
+
13733
+ <xsl:template name="refine_fn-container-body-style">
13734
+ </xsl:template>
13735
+
13425
13736
  <xsl:attribute-set name="fn-reference-style">
13426
13737
  <xsl:attribute name="font-size">80%</xsl:attribute>
13427
13738
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13428
13739
  <xsl:attribute name="font-size">70%</xsl:attribute>
13429
13740
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13430
13741
  <xsl:attribute name="font-style">italic</xsl:attribute>
13431
-
13432
- </xsl:attribute-set>
13742
+ </xsl:attribute-set> <!-- fn-reference-style -->
13433
13743
 
13434
13744
  <xsl:template name="refine_fn-reference-style">
13745
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13746
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13435
13747
  </xsl:template> <!-- refine_fn-reference-style -->
13436
13748
 
13437
13749
  <xsl:attribute-set name="fn-style">
13438
13750
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13439
13751
  </xsl:attribute-set>
13440
13752
 
13753
+ <xsl:template name="refine_fn-style">
13754
+ </xsl:template>
13755
+
13441
13756
  <xsl:attribute-set name="fn-num-style">
13442
13757
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13443
13758
  <xsl:attribute name="font-size">65%</xsl:attribute>
13444
13759
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13445
- </xsl:attribute-set>
13760
+ </xsl:attribute-set> <!-- fn-num-style -->
13761
+
13762
+ <xsl:template name="refine_fn-num-style">
13763
+ </xsl:template>
13446
13764
 
13447
13765
  <xsl:attribute-set name="fn-body-style">
13448
13766
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -13453,7 +13771,7 @@
13453
13771
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13454
13772
  <xsl:attribute name="line-height">124%</xsl:attribute>
13455
13773
  <xsl:attribute name="text-align">justify</xsl:attribute>
13456
- </xsl:attribute-set>
13774
+ </xsl:attribute-set> <!-- fn-body-style" -->
13457
13775
 
13458
13776
  <xsl:template name="refine_fn-body-style">
13459
13777
  </xsl:template> <!-- refine_fn-body-style -->
@@ -13518,10 +13836,12 @@
13518
13836
  <xsl:choose>
13519
13837
  <xsl:when test="ancestor::mn:bibitem">
13520
13838
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
13839
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
13521
13840
  </fn_styles>
13522
13841
  </xsl:when>
13523
13842
  <xsl:otherwise>
13524
13843
  <fn_styles xsl:use-attribute-sets="fn-num-style">
13844
+ <xsl:call-template name="refine_fn-num-style"/>
13525
13845
  </fn_styles>
13526
13846
  </xsl:otherwise>
13527
13847
  </xsl:choose>
@@ -13531,9 +13851,12 @@
13531
13851
  <xsl:copy-of select="."/>
13532
13852
  </xsl:for-each>
13533
13853
 
13534
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13854
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13855
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13535
13856
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
13536
- </xsl:if>
13857
+ </xsl:if> -->
13858
+
13859
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13537
13860
 
13538
13861
  <xsl:call-template name="insert_basic_link">
13539
13862
  <xsl:with-param name="element">
@@ -13556,10 +13879,12 @@
13556
13879
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
13557
13880
 
13558
13881
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
13882
+ <xsl:call-template name="refine_fn-style"/>
13559
13883
  <xsl:copy-of select="$footnote_inline"/>
13560
13884
  <fo:footnote-body role="Note">
13561
13885
 
13562
13886
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
13887
+ <xsl:call-template name="refine_fn-container-body-style"/>
13563
13888
 
13564
13889
  <xsl:variable name="fn_block">
13565
13890
  <xsl:call-template name="refine_fn-body-style"/>
@@ -13660,6 +13985,9 @@
13660
13985
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13661
13986
  </xsl:attribute-set> <!-- admonition-style -->
13662
13987
 
13988
+ <xsl:template name="refine_admonition-style">
13989
+ </xsl:template>
13990
+
13663
13991
  <xsl:attribute-set name="admonition-container-style">
13664
13992
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
13665
13993
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -13667,6 +13995,9 @@
13667
13995
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
13668
13996
  </xsl:attribute-set> <!-- admonition-container-style -->
13669
13997
 
13998
+ <xsl:template name="refine_admonition-container-style">
13999
+ </xsl:template>
14000
+
13670
14001
  <xsl:attribute-set name="admonition-name-style">
13671
14002
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
13672
14003
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -13676,9 +14007,16 @@
13676
14007
  <xsl:attribute name="text-align">center</xsl:attribute>
13677
14008
  </xsl:attribute-set> <!-- admonition-name-style -->
13678
14009
 
14010
+ <xsl:template name="refine_admonition-name-style">
14011
+ </xsl:template>
14012
+
13679
14013
  <xsl:attribute-set name="admonition-p-style">
13680
14014
  <xsl:attribute name="font-style">italic</xsl:attribute>
13681
14015
  </xsl:attribute-set> <!-- admonition-p-style -->
14016
+
14017
+ <xsl:template name="refine_admonition-p-style">
14018
+ </xsl:template>
14019
+
13682
14020
  <!-- end admonition -->
13683
14021
 
13684
14022
  <!-- ================ -->
@@ -13688,12 +14026,18 @@
13688
14026
  <xsl:call-template name="setNamedDestination"/>
13689
14027
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
13690
14028
 
14029
+ <xsl:call-template name="refine_admonition-style"/>
14030
+
13691
14031
  <xsl:call-template name="setBlockSpanAll"/>
13692
14032
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14033
+
14034
+ <xsl:call-template name="refine_admonition-container-style"/>
13693
14035
  <fo:block xsl:use-attribute-sets="admonition-name-style">
14036
+ <xsl:call-template name="refine_admonition-name-style"/>
13694
14037
  <xsl:call-template name="displayAdmonitionName"/>
13695
14038
  </fo:block>
13696
14039
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14040
+ <xsl:call-template name="refine_admonition-p-style"/>
13697
14041
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
13698
14042
  </fo:block>
13699
14043
 
@@ -13747,6 +14091,7 @@
13747
14091
 
13748
14092
  <xsl:template match="mn:admonition/mn:p">
13749
14093
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14094
+ <xsl:call-template name="refine_admonition-p-style"/>
13750
14095
 
13751
14096
  <xsl:apply-templates/>
13752
14097
  </fo:block>
@@ -13756,6 +14101,13 @@
13756
14101
  <!-- END Admonition -->
13757
14102
  <!-- ================ -->
13758
14103
 
14104
+ <xsl:attribute-set name="references-non-normative-title-style">
14105
+ </xsl:attribute-set>
14106
+
14107
+ <xsl:template name="refine_references-non-normative-title-style">
14108
+
14109
+ </xsl:template>
14110
+
13759
14111
  <!-- bibitem in Normative References (references/@normative="true") -->
13760
14112
  <xsl:attribute-set name="bibitem-normative-style">
13761
14113
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -13764,6 +14116,9 @@
13764
14116
  <xsl:attribute name="line-height">115%</xsl:attribute>
13765
14117
  </xsl:attribute-set> <!-- bibitem-normative-style -->
13766
14118
 
14119
+ <xsl:template name="refine_bibitem-normative-style">
14120
+ </xsl:template>
14121
+
13767
14122
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
13768
14123
  <xsl:attribute-set name="bibitem-normative-list-style">
13769
14124
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -13771,9 +14126,15 @@
13771
14126
  <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
13772
14127
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
13773
14128
 
14129
+ <xsl:template name="refine_bibitem-normative-list-style">
14130
+ </xsl:template>
14131
+
13774
14132
  <xsl:attribute-set name="bibitem-non-normative-style">
13775
14133
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
13776
14134
 
14135
+ <xsl:template name="refine_bibitem-non-normative-style">
14136
+ </xsl:template>
14137
+
13777
14138
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
13778
14139
  <xsl:attribute-set name="bibitem-non-normative-list-style">
13779
14140
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -13781,17 +14142,29 @@
13781
14142
  <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
13782
14143
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
13783
14144
 
14145
+ <xsl:template name="refine_bibitem-non-normative-list-style">
14146
+ </xsl:template>
14147
+
13784
14148
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
13785
14149
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13786
14150
  </xsl:attribute-set>
13787
14151
 
14152
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
14153
+ </xsl:template>
14154
+
13788
14155
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
13789
14156
  <xsl:attribute-set name="bibitem-normative-list-body-style">
13790
14157
  </xsl:attribute-set>
13791
14158
 
14159
+ <xsl:template name="refine_bibitem-normative-list-body-style">
14160
+ </xsl:template>
14161
+
13792
14162
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
13793
14163
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
13794
14164
 
14165
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
14166
+ </xsl:template>
14167
+
13795
14168
  <!-- footnote reference number for bibitem, in the text -->
13796
14169
  <xsl:attribute-set name="bibitem-note-fn-style">
13797
14170
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -13799,6 +14172,9 @@
13799
14172
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13800
14173
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
13801
14174
 
14175
+ <xsl:template name="refine_bibitem-note-fn-style">
14176
+ </xsl:template>
14177
+
13802
14178
  <!-- footnote number on the page bottom -->
13803
14179
  <xsl:attribute-set name="bibitem-note-fn-number-style">
13804
14180
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -13817,6 +14193,9 @@
13817
14193
  <xsl:attribute name="line-height">120%</xsl:attribute>
13818
14194
  </xsl:attribute-set> <!-- references-non-normative-style -->
13819
14195
 
14196
+ <xsl:template name="refine_references-non-normative-style">
14197
+ </xsl:template>
14198
+
13820
14199
  <!-- ======================= -->
13821
14200
  <!-- Bibliography rendering -->
13822
14201
  <!-- ======================= -->
@@ -13858,6 +14237,7 @@
13858
14237
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13859
14238
 
13860
14239
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
14240
+ <xsl:call-template name="refine_references-non-normative-style"/>
13861
14241
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13862
14242
  </fo:block>
13863
14243
  </xsl:template> <!-- references -->
@@ -13871,17 +14251,20 @@
13871
14251
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13872
14252
  <xsl:call-template name="setNamedDestination"/>
13873
14253
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14254
+ <xsl:call-template name="refine_bibitem-normative-style"/>
14255
+
13874
14256
  <xsl:call-template name="processBibitem"/>
13875
14257
  </fo:block>
13876
14258
 
13877
14259
  </xsl:template> <!-- bibitem -->
13878
14260
 
13879
14261
  <!-- Bibliography (non-normative references) -->
13880
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
14262
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
13881
14263
  <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 -->
13882
14264
  <!-- start BIPM bibitem processing -->
13883
14265
  <xsl:call-template name="setNamedDestination"/>
13884
14266
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
14267
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
13885
14268
  <fo:list-item>
13886
14269
  <fo:list-item-label end-indent="label-end()">
13887
14270
  <fo:block>
@@ -13905,12 +14288,17 @@
13905
14288
 
13906
14289
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13907
14290
 
14291
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
14292
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
14293
+
13908
14294
  <xsl:template name="insertListItem_Bibitem">
13909
14295
  <xsl:choose>
13910
14296
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
13911
14297
  <xsl:otherwise>
13912
14298
  <xsl:call-template name="setNamedDestination"/>
13913
14299
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
14300
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
14301
+
13914
14302
  <fo:list-item-label end-indent="label-end()">
13915
14303
  <fo:block role="SKIP">
13916
14304
  <fo:inline role="SKIP">
@@ -13921,16 +14309,18 @@
13921
14309
  </fo:block>
13922
14310
  </fo:list-item-label>
13923
14311
  <fo:list-item-body start-indent="body-start()">
13924
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
14312
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
14313
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
13925
14314
  <xsl:call-template name="processBibitem">
13926
14315
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13927
14316
  </xsl:call-template>
13928
14317
  </fo:block>
14318
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13929
14319
  </fo:list-item-body>
13930
14320
  </fo:list-item>
13931
14321
  </xsl:otherwise>
13932
14322
  </xsl:choose>
13933
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
14323
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
13934
14324
  <xsl:with-param name="skip">false</xsl:with-param>
13935
14325
  </xsl:apply-templates>
13936
14326
  </xsl:template>
@@ -13946,25 +14336,16 @@
13946
14336
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
13947
14337
  </xsl:apply-templates>
13948
14338
  <xsl:apply-templates select="mn:formattedref"/>
14339
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13949
14340
  <!-- end bibitem processing -->
13950
-
13951
- <xsl:call-template name="processBibliographyNote"/>
13952
14341
  </xsl:template> <!-- processBibitem (bibitem) -->
13953
14342
 
13954
- <xsl:template name="processBibliographyNote">
13955
- <xsl:if test="self::mn:note">
13956
- <xsl:variable name="note_node">
13957
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
13958
- <xsl:copy> <!-- skip @id -->
13959
- <xsl:copy-of select="node()"/>
13960
- </xsl:copy>
13961
- </xsl:element>
13962
- </xsl:variable>
13963
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
13964
- <xsl:call-template name="note"/>
13965
- </xsl:for-each> -->
14343
+ <xsl:template name="processBibitemFollowingNotes">
14344
+ <!-- current context is bibitem element -->
14345
+ <xsl:variable name="bibitem_id" select="@id"/>
14346
+ <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]]">
13966
14347
  <xsl:call-template name="note"/>
13967
- </xsl:if>
14348
+ </xsl:for-each>
13968
14349
  </xsl:template>
13969
14350
 
13970
14351
  <xsl:template match="mn:title" mode="title">
@@ -14168,14 +14549,20 @@
14168
14549
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14169
14550
  <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
14170
14551
  <xsl:attribute name="margin-left">-18mm</xsl:attribute>
14171
- </xsl:attribute-set>
14552
+ </xsl:attribute-set> <!-- indexsect-title-style -->
14553
+
14554
+ <xsl:template name="refine_indexsect-title-style">
14555
+ </xsl:template>
14172
14556
 
14173
14557
  <xsl:attribute-set name="indexsect-clause-title-style">
14174
14558
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
14175
14559
  <xsl:attribute name="font-size">10pt</xsl:attribute>
14176
14560
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14177
14561
  <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
14178
- </xsl:attribute-set>
14562
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
14563
+
14564
+ <xsl:template name="refine_indexsect-clause-title-style">
14565
+ </xsl:template>
14179
14566
  <!-- End Index section styles -->
14180
14567
 
14181
14568
  <!-- =================== -->
@@ -14369,6 +14756,7 @@
14369
14756
 
14370
14757
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
14371
14758
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
14759
+ <xsl:call-template name="refine_indexsect-title-style"/>
14372
14760
  <!-- Index -->
14373
14761
  <xsl:apply-templates/>
14374
14762
  </fo:block>
@@ -14377,6 +14765,7 @@
14377
14765
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
14378
14766
  <!-- Letter A, B, C, ... -->
14379
14767
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
14768
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
14380
14769
  <xsl:apply-templates/>
14381
14770
  </fo:block>
14382
14771
  </xsl:template>
@@ -14609,12 +14998,18 @@
14609
14998
  <xsl:attribute-set name="toc-leader-style">
14610
14999
  </xsl:attribute-set> <!-- END: toc-leader-style -->
14611
15000
 
15001
+ <xsl:template name="refine_toc-leader-style">
15002
+ </xsl:template>
15003
+
14612
15004
  <xsl:attribute-set name="toc-pagenumber-style">
14613
15005
  <xsl:attribute name="font-family">Arial</xsl:attribute>
14614
15006
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14615
15007
  <xsl:attribute name="font-size">10pt</xsl:attribute>
14616
15008
  </xsl:attribute-set>
14617
15009
 
15010
+ <xsl:template name="refine_toc-pagenumber-style">
15011
+ </xsl:template>
15012
+
14618
15013
  <!-- List of Figures, Tables -->
14619
15014
  <xsl:attribute-set name="toc-listof-title-style">
14620
15015
  <xsl:attribute name="font-family">Arial</xsl:attribute>
@@ -14630,12 +15025,18 @@
14630
15025
  <xsl:attribute-set name="toc-listof-item-block-style">
14631
15026
  </xsl:attribute-set>
14632
15027
 
15028
+ <xsl:template name="refine_toc-listof-item-block-style">
15029
+ </xsl:template>
15030
+
14633
15031
  <xsl:attribute-set name="toc-listof-item-style">
14634
15032
  <xsl:attribute name="role">TOCI</xsl:attribute>
14635
15033
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
14636
15034
  <xsl:attribute name="margin-left">8mm</xsl:attribute>
14637
15035
  </xsl:attribute-set>
14638
15036
 
15037
+ <xsl:template name="refine_toc-listof-item-style">
15038
+ </xsl:template>
15039
+
14639
15040
  <xsl:template name="processPrefaceSectionsDefault_Contents">
14640
15041
  <xsl:variable name="nodes_preface_">
14641
15042
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -15758,23 +16159,55 @@
15758
16159
  <!-- Ruby text (CJK languages) rendering -->
15759
16160
  <!-- ===================================== -->
15760
16161
  <!-- ===================================== -->
16162
+
16163
+ <xsl:attribute-set name="ruby-style">
16164
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
16165
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
16166
+ </xsl:attribute-set>
16167
+
16168
+ <xsl:template name="refine_ruby-style">
16169
+ <xsl:if test="not(ancestor::mn:ruby)">
16170
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
16171
+ </xsl:if>
16172
+ <xsl:variable name="rt_text" select="mn:rt"/>
16173
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
16174
+ <!-- Example: width="2em" -->
16175
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
16176
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
16177
+ <xsl:variable name="text_width">
16178
+ <xsl:choose>
16179
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
16180
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
16181
+ </xsl:choose>
16182
+ </xsl:variable>
16183
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
16184
+ </xsl:template> <!-- refine_ruby-style -->
16185
+
16186
+ <xsl:attribute-set name="rb-style">
16187
+ <xsl:attribute name="line-height">1em</xsl:attribute>
16188
+ <xsl:attribute name="text-align">center</xsl:attribute>
16189
+ </xsl:attribute-set>
16190
+
16191
+ <xsl:template name="refine_rb-style">
16192
+ </xsl:template>
16193
+
16194
+ <xsl:attribute-set name="rt-style">
16195
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
16196
+ <xsl:attribute name="text-align">center</xsl:attribute>
16197
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
16198
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
16199
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
16200
+ </xsl:attribute-set>
16201
+
16202
+ <xsl:template name="refine_rt-style">
16203
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
16204
+ <xsl:attribute name="space-before">0em</xsl:attribute>
16205
+ </xsl:if>
16206
+ </xsl:template>
16207
+
15761
16208
  <xsl:template match="mn:ruby">
15762
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
15763
- <xsl:if test="not(ancestor::mn:ruby)">
15764
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
15765
- </xsl:if>
15766
- <xsl:variable name="rt_text" select="mn:rt"/>
15767
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
15768
- <!-- Example: width="2em" -->
15769
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
15770
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
15771
- <xsl:variable name="text_width">
15772
- <xsl:choose>
15773
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
15774
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
15775
- </xsl:choose>
15776
- </xsl:variable>
15777
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
16209
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
16210
+ <xsl:call-template name="refine_ruby-style"/>
15778
16211
 
15779
16212
  <xsl:choose>
15780
16213
  <xsl:when test="ancestor::mn:ruby">
@@ -15792,17 +16225,14 @@
15792
16225
  </xsl:template>
15793
16226
 
15794
16227
  <xsl:template match="mn:rb">
15795
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
16228
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
15796
16229
  </xsl:template>
15797
16230
 
15798
16231
  <xsl:template match="mn:rt">
15799
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
15800
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
15801
- <xsl:attribute name="space-before">0em</xsl:attribute>
15802
- </xsl:if>
16232
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
16233
+ <xsl:call-template name="refine_rt-style"/>
15803
16234
  <xsl:apply-templates/>
15804
16235
  </fo:block>
15805
-
15806
16236
  </xsl:template>
15807
16237
 
15808
16238
  <!-- ===================================== -->
@@ -15811,6 +16241,18 @@
15811
16241
  <!-- ===================================== -->
15812
16242
  <!-- ===================================== -->
15813
16243
 
16244
+ <xsl:attribute-set name="annex-title-style">
16245
+ </xsl:attribute-set>
16246
+
16247
+ <xsl:template name="refine_annex-title-style">
16248
+ </xsl:template>
16249
+
16250
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
16251
+ </xsl:attribute-set>
16252
+
16253
+ <xsl:template name="refine_p-zzSTDTitle1-style">
16254
+ </xsl:template>
16255
+
15814
16256
  <xsl:template name="processPrefaceSectionsDefault">
15815
16257
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
15816
16258
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -16149,10 +16591,17 @@
16149
16591
  </xsl:choose>
16150
16592
  </xsl:template>
16151
16593
 
16594
+ <xsl:attribute-set name="clause-style">
16595
+
16596
+ </xsl:attribute-set>
16597
+
16598
+ <xsl:template name="refine_clause-style">
16599
+ </xsl:template>
16600
+
16152
16601
  <!-- main sections -->
16153
16602
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
16154
16603
  <xsl:call-template name="setNamedDestination"/>
16155
- <fo:block>
16604
+ <fo:block role="Sect">
16156
16605
  <xsl:call-template name="setId"/>
16157
16606
 
16158
16607
  <xsl:call-template name="sections_element_style"/>
@@ -16277,6 +16726,10 @@
16277
16726
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
16278
16727
  </xsl:template>
16279
16728
 
16729
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
16730
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
16731
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
16732
+
16280
16733
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
16281
16734
  <xsl:template name="insert_basic_link">
16282
16735
  <xsl:param name="element"/>