metanorma-bipm 2.7.3 → 2.7.4

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"/>
@@ -5641,12 +5641,18 @@
5641
5641
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
5642
5642
  </xsl:attribute-set> <!-- license-statement-style -->
5643
5643
 
5644
+ <xsl:template name="refine_license-statement-style">
5645
+ </xsl:template>
5646
+
5644
5647
  <xsl:attribute-set name="license-statement-title-style">
5645
5648
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5646
5649
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
5647
5650
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5648
5651
  </xsl:attribute-set> <!-- license-statement-title-style -->
5649
5652
 
5653
+ <xsl:template name="refine_license-statement-title-style">
5654
+ </xsl:template>
5655
+
5650
5656
  <xsl:attribute-set name="license-statement-p-style">
5651
5657
  <xsl:attribute name="text-align">justify</xsl:attribute>
5652
5658
  <xsl:attribute name="line-height">135%</xsl:attribute>
@@ -5659,25 +5665,49 @@
5659
5665
  <xsl:attribute-set name="legal-statement-style">
5660
5666
  </xsl:attribute-set> <!-- legal-statement-style -->
5661
5667
 
5668
+ <xsl:template name="refine_legal-statement-style">
5669
+ </xsl:template>
5670
+
5662
5671
  <xsl:attribute-set name="legal-statement-title-style">
5663
5672
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5664
5673
  </xsl:attribute-set> <!-- legal-statement-title-style -->
5665
5674
 
5675
+ <xsl:template name="refine_legal-statement-title-style">
5676
+ </xsl:template>
5677
+
5666
5678
  <xsl:attribute-set name="legal-statement-p-style">
5667
5679
  </xsl:attribute-set> <!-- legal-statement-p-style -->
5668
5680
 
5681
+ <xsl:template name="refine_legal-statement-p-style">
5682
+ <xsl:if test="@align">
5683
+ <xsl:attribute name="text-align">
5684
+ <xsl:value-of select="@align"/>
5685
+ </xsl:attribute>
5686
+ </xsl:if>
5687
+ </xsl:template>
5688
+
5669
5689
  <xsl:attribute-set name="feedback-statement-style">
5670
5690
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5671
5691
  <xsl:attribute name="line-height">125%</xsl:attribute>
5672
5692
  </xsl:attribute-set> <!-- feedback-statement-style -->
5673
5693
 
5694
+ <xsl:template name="refine_feedback-statement-style">
5695
+ </xsl:template>
5696
+
5674
5697
  <xsl:attribute-set name="feedback-statement-title-style">
5675
5698
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5676
5699
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
5677
5700
 
5701
+ <xsl:template name="refine_feedback-statement-title-style">
5702
+
5703
+ </xsl:template>
5704
+
5678
5705
  <xsl:attribute-set name="feedback-statement-p-style">
5679
5706
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
5680
5707
 
5708
+ <xsl:template name="refine_feedback-statement-p-style">
5709
+ </xsl:template>
5710
+
5681
5711
  <!-- End boilerplate sections styles -->
5682
5712
 
5683
5713
  <!-- ================================= -->
@@ -5703,6 +5733,7 @@
5703
5733
 
5704
5734
  <xsl:template match="mn:license-statement">
5705
5735
  <fo:block xsl:use-attribute-sets="license-statement-style">
5736
+ <xsl:call-template name="refine_license-statement-style"/>
5706
5737
  <xsl:apply-templates/>
5707
5738
  </fo:block>
5708
5739
  </xsl:template> <!-- license-statement -->
@@ -5712,6 +5743,7 @@
5712
5743
  <xsl:call-template name="getLevel"/>
5713
5744
  </xsl:variable>
5714
5745
  <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
5746
+ <xsl:call-template name="refine_license-statement-title-style"/>
5715
5747
  <xsl:apply-templates/>
5716
5748
  </fo:block>
5717
5749
 
@@ -5728,6 +5760,7 @@
5728
5760
  <xsl:template match="mn:legal-statement">
5729
5761
  <xsl:param name="isLegacy">false</xsl:param>
5730
5762
  <fo:block xsl:use-attribute-sets="legal-statement-style">
5763
+ <xsl:call-template name="refine_legal-statement-style"/>
5731
5764
  <xsl:apply-templates/>
5732
5765
  </fo:block>
5733
5766
  </xsl:template> <!-- legal-statement -->
@@ -5897,6 +5930,27 @@
5897
5930
  <xsl:attribute-set name="sourcecode-container-style">
5898
5931
  </xsl:attribute-set>
5899
5932
 
5933
+ <xsl:template name="refine_sourcecode-container-style">
5934
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
5935
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5936
+ </xsl:if>
5937
+
5938
+ <xsl:if test="ancestor::mn:example">
5939
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5940
+ </xsl:if>
5941
+
5942
+ <xsl:copy-of select="@id"/>
5943
+
5944
+ <xsl:if test="parent::mn:note">
5945
+ <xsl:attribute name="margin-left">
5946
+ <xsl:choose>
5947
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
5948
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
5949
+ </xsl:choose>
5950
+ </xsl:attribute>
5951
+ </xsl:if>
5952
+ </xsl:template>
5953
+
5900
5954
  <xsl:attribute-set name="sourcecode-style">
5901
5955
  <xsl:attribute name="white-space">pre</xsl:attribute>
5902
5956
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -5914,6 +5968,9 @@
5914
5968
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5915
5969
  </xsl:attribute-set> <!-- sourcecode-name-style -->
5916
5970
 
5971
+ <xsl:template name="refine_sourcecode-name-style">
5972
+ </xsl:template>
5973
+
5917
5974
  <xsl:template name="add-zero-spaces-equal">
5918
5975
  <xsl:param name="text" select="."/>
5919
5976
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -6001,24 +6058,8 @@
6001
6058
  <xsl:otherwise>
6002
6059
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
6003
6060
 
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>
6011
-
6012
- <xsl:copy-of select="@id"/>
6061
+ <xsl:call-template name="refine_sourcecode-container-style"/>
6013
6062
 
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
6063
  <fo:block-container margin-left="0mm" role="SKIP">
6023
6064
 
6024
6065
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -6345,6 +6386,7 @@
6345
6386
  <xsl:template match="mn:sourcecode/mn:fmt-name">
6346
6387
  <xsl:if test="normalize-space() != ''">
6347
6388
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
6389
+ <xsl:call-template name="refine_sourcecode-name-style"/>
6348
6390
  <xsl:apply-templates/>
6349
6391
  </fo:block>
6350
6392
  </xsl:if>
@@ -6391,11 +6433,30 @@
6391
6433
  <xsl:attribute-set name="pre-style">
6392
6434
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
6393
6435
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6394
- </xsl:attribute-set>
6436
+ </xsl:attribute-set> <!-- pre-style -->
6437
+
6438
+ <xsl:template name="refine_pre-style">
6439
+ </xsl:template>
6395
6440
 
6396
6441
  <xsl:attribute-set name="tt-style">
6397
6442
  </xsl:attribute-set>
6398
6443
 
6444
+ <xsl:template name="refine_tt-style">
6445
+ <xsl:variable name="_font-size"> <!-- inherit -->
6446
+ </xsl:variable>
6447
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6448
+ <xsl:if test="$font-size != ''">
6449
+ <xsl:attribute name="font-size">
6450
+ <xsl:choose>
6451
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
6452
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
6453
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
6454
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
6455
+ </xsl:choose>
6456
+ </xsl:attribute>
6457
+ </xsl:if>
6458
+ </xsl:template>
6459
+
6399
6460
  <xsl:variable name="color-added-text">
6400
6461
  <xsl:text>rgb(0, 255, 0)</xsl:text>
6401
6462
  </xsl:variable>
@@ -6408,9 +6469,14 @@
6408
6469
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
6409
6470
  </xsl:attribute-set>
6410
6471
 
6472
+ <xsl:template name="refine_add-style">
6473
+ </xsl:template>
6474
+
6411
6475
  <xsl:variable name="add-style">
6412
- <add-style xsl:use-attribute-sets="add-style"/>
6413
- </xsl:variable>
6476
+ <add-style xsl:use-attribute-sets="add-style">
6477
+ <xsl:call-template name="refine_add-style"/>
6478
+ </add-style>
6479
+ </xsl:variable>
6414
6480
  <xsl:template name="append_add-style">
6415
6481
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
6416
6482
  </xsl:template>
@@ -6423,24 +6489,77 @@
6423
6489
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6424
6490
  </xsl:attribute-set>
6425
6491
 
6492
+ <xsl:template name="refine_del-style">
6493
+ </xsl:template>
6494
+
6495
+ <xsl:attribute-set name="strong-style">
6496
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6497
+ </xsl:attribute-set>
6498
+
6499
+ <xsl:template name="refine_strong_style">
6500
+ <xsl:if test="ancestor::*['preferred']">
6501
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6502
+ </xsl:if>
6503
+ </xsl:template> <!-- refine_strong_style -->
6504
+
6505
+ <xsl:attribute-set name="em-style">
6506
+ <xsl:attribute name="font-style">italic</xsl:attribute>
6507
+ </xsl:attribute-set>
6508
+
6509
+ <xsl:template name="refine_em_style">
6510
+ </xsl:template> <!-- refine_em_style -->
6511
+
6512
+ <xsl:attribute-set name="sup-style">
6513
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6514
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6515
+ </xsl:attribute-set>
6516
+
6517
+ <xsl:template name="refine_sup-style">
6518
+ </xsl:template>
6519
+
6520
+ <xsl:attribute-set name="sub-style">
6521
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6522
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
6523
+ </xsl:attribute-set>
6524
+
6525
+ <xsl:template name="refine_sub-style">
6526
+ </xsl:template>
6527
+
6528
+ <xsl:attribute-set name="underline-style">
6529
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6530
+ </xsl:attribute-set>
6531
+
6532
+ <xsl:template name="refine_underline-style">
6533
+ </xsl:template>
6534
+
6535
+ <xsl:attribute-set name="hi-style">
6536
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
6537
+ </xsl:attribute-set>
6538
+
6539
+ <xsl:template name="refine_hi-style">
6540
+ </xsl:template>
6541
+
6542
+ <xsl:attribute-set name="strike-style">
6543
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6544
+ </xsl:attribute-set>
6545
+
6546
+ <xsl:template name="refine_strike-style">
6547
+ </xsl:template>
6548
+
6426
6549
  <xsl:template match="mn:br">
6427
6550
  <xsl:value-of select="$linebreak"/>
6428
6551
  </xsl:template>
6429
6552
 
6430
- <xsl:template match="mn:em">
6431
- <fo:inline font-style="italic">
6432
- <xsl:call-template name="refine_italic_style"/>
6553
+ <xsl:template match="mn:em">
6554
+ <fo:inline xsl:use-attribute-sets="em-style">
6555
+ <xsl:call-template name="refine_em_style"/>
6433
6556
  <xsl:apply-templates/>
6434
6557
  </fo:inline>
6435
6558
  </xsl:template>
6436
6559
 
6437
- <xsl:template name="refine_italic_style">
6438
- </xsl:template>
6439
-
6440
6560
  <xsl:template match="mn:strong | *[local-name()='b']">
6441
6561
  <xsl:param name="split_keep-within-line"/>
6442
- <fo:inline font-weight="bold">
6443
-
6562
+ <fo:inline xsl:use-attribute-sets="strong-style">
6444
6563
  <xsl:call-template name="refine_strong_style"/>
6445
6564
 
6446
6565
  <xsl:apply-templates>
@@ -6449,44 +6568,27 @@
6449
6568
  </fo:inline>
6450
6569
  </xsl:template>
6451
6570
 
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
6571
  <xsl:template match="*[local-name()='padding']">
6459
6572
  <fo:inline padding-right="{@value}"> </fo:inline>
6460
6573
  </xsl:template>
6461
6574
 
6462
6575
  <xsl:template match="mn:sup">
6463
- <fo:inline font-size="80%" vertical-align="super">
6576
+ <fo:inline xsl:use-attribute-sets="sup-style">
6577
+ <xsl:call-template name="refine_sup-style"/>
6464
6578
  <xsl:apply-templates/>
6465
6579
  </fo:inline>
6466
6580
  </xsl:template>
6467
6581
 
6468
6582
  <xsl:template match="mn:sub">
6469
- <fo:inline font-size="80%" vertical-align="sub">
6583
+ <fo:inline xsl:use-attribute-sets="sub-style">
6584
+ <xsl:call-template name="refine_sub-style"/>
6470
6585
  <xsl:apply-templates/>
6471
6586
  </fo:inline>
6472
6587
  </xsl:template>
6473
6588
 
6474
6589
  <xsl:template match="mn:tt">
6475
6590
  <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>
6591
+ <xsl:call-template name="refine_tt-style"/>
6490
6592
  <xsl:apply-templates/>
6491
6593
  </fo:inline>
6492
6594
  </xsl:template> <!-- tt -->
@@ -6505,7 +6607,8 @@
6505
6607
  </xsl:template>
6506
6608
 
6507
6609
  <xsl:template match="mn:underline">
6508
- <fo:inline text-decoration="underline">
6610
+ <fo:inline xsl:use-attribute-sets="underline-style">
6611
+ <xsl:call-template name="refine_underline-style"/>
6509
6612
  <xsl:apply-templates/>
6510
6613
  </fo:inline>
6511
6614
  </xsl:template>
@@ -6663,6 +6766,7 @@
6663
6766
 
6664
6767
  <xsl:template match="mn:del">
6665
6768
  <fo:inline xsl:use-attribute-sets="del-style">
6769
+ <xsl:call-template name="refine_del-style"/>
6666
6770
  <xsl:apply-templates/>
6667
6771
  </fo:inline>
6668
6772
  </xsl:template>
@@ -6672,7 +6776,8 @@
6672
6776
 
6673
6777
  <!-- highlight text -->
6674
6778
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
6675
- <fo:inline background-color="yellow">
6779
+ <fo:inline xsl:use-attribute-sets="hi-style">
6780
+ <xsl:call-template name="refine_hi-style"/>
6676
6781
  <xsl:apply-templates/>
6677
6782
  </fo:inline>
6678
6783
  </xsl:template>
@@ -6758,7 +6863,8 @@
6758
6863
  </xsl:template>
6759
6864
 
6760
6865
  <xsl:template match="mn:strike">
6761
- <fo:inline text-decoration="line-through">
6866
+ <fo:inline xsl:use-attribute-sets="strike-style">
6867
+ <xsl:call-template name="refine_strike-style"/>
6762
6868
  <xsl:apply-templates/>
6763
6869
  </fo:inline>
6764
6870
  </xsl:template>
@@ -6838,6 +6944,7 @@
6838
6944
 
6839
6945
  <xsl:template match="mn:pre" name="pre">
6840
6946
  <fo:block xsl:use-attribute-sets="pre-style">
6947
+ <xsl:call-template name="refine_pre-style"/>
6841
6948
  <xsl:copy-of select="@id"/>
6842
6949
  <xsl:choose>
6843
6950
 
@@ -6868,22 +6975,40 @@
6868
6975
  <xsl:attribute-set name="permission-style">
6869
6976
  </xsl:attribute-set>
6870
6977
 
6978
+ <xsl:template name="refine_permission-style">
6979
+ </xsl:template>
6980
+
6871
6981
  <xsl:attribute-set name="permission-name-style">
6872
6982
  </xsl:attribute-set>
6873
6983
 
6984
+ <xsl:template name="refine_permission-name-style">
6985
+ </xsl:template>
6986
+
6874
6987
  <xsl:attribute-set name="permission-label-style">
6875
6988
  </xsl:attribute-set>
6876
6989
 
6990
+ <xsl:template name="refine_permission-label-style">
6991
+ </xsl:template>
6992
+
6877
6993
  <xsl:attribute-set name="requirement-style">
6878
6994
  </xsl:attribute-set>
6879
6995
 
6996
+ <xsl:template name="refine_requirement-style">
6997
+ </xsl:template>
6998
+
6880
6999
  <xsl:attribute-set name="requirement-name-style">
6881
7000
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6882
7001
  </xsl:attribute-set>
6883
7002
 
7003
+ <xsl:template name="refine_requirement-name-style">
7004
+ </xsl:template>
7005
+
6884
7006
  <xsl:attribute-set name="requirement-label-style">
6885
7007
  </xsl:attribute-set>
6886
7008
 
7009
+ <xsl:template name="refine_requirement-label-style">
7010
+ </xsl:template>
7011
+
6887
7012
  <xsl:attribute-set name="subject-style">
6888
7013
  </xsl:attribute-set>
6889
7014
 
@@ -6911,18 +7036,28 @@
6911
7036
  <xsl:attribute-set name="recommendation-style">
6912
7037
  </xsl:attribute-set>
6913
7038
 
7039
+ <xsl:template name="refine_recommendation-style">
7040
+ </xsl:template>
7041
+
6914
7042
  <xsl:attribute-set name="recommendation-name-style">
6915
7043
  </xsl:attribute-set>
6916
7044
 
7045
+ <xsl:template name="refine_recommendation-name-style">
7046
+ </xsl:template>
7047
+
6917
7048
  <xsl:attribute-set name="recommendation-label-style">
6918
7049
  </xsl:attribute-set>
6919
7050
 
7051
+ <xsl:template name="refine_recommendation-label-style">
7052
+ </xsl:template>
7053
+
6920
7054
  <!-- ========== -->
6921
7055
  <!-- permission -->
6922
7056
  <!-- ========== -->
6923
7057
  <xsl:template match="mn:permission">
6924
7058
  <xsl:call-template name="setNamedDestination"/>
6925
7059
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
7060
+ <xsl:call-template name="refine_permission-style"/>
6926
7061
  <xsl:apply-templates select="mn:fmt-name"/>
6927
7062
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6928
7063
  </fo:block>
@@ -6931,6 +7066,7 @@
6931
7066
  <xsl:template match="mn:permission/mn:fmt-name">
6932
7067
  <xsl:if test="normalize-space() != ''">
6933
7068
  <fo:block xsl:use-attribute-sets="permission-name-style">
7069
+ <xsl:call-template name="refine_permission-name-style"/>
6934
7070
  <xsl:apply-templates/>
6935
7071
  </fo:block>
6936
7072
  </xsl:if>
@@ -6938,6 +7074,7 @@
6938
7074
 
6939
7075
  <xsl:template match="mn:permission/mn:label">
6940
7076
  <fo:block xsl:use-attribute-sets="permission-label-style">
7077
+ <xsl:call-template name="refine_permission-label-style"/>
6941
7078
  <xsl:apply-templates/>
6942
7079
  </fo:block>
6943
7080
  </xsl:template>
@@ -6950,6 +7087,7 @@
6950
7087
  <xsl:template match="mn:requirement">
6951
7088
  <xsl:call-template name="setNamedDestination"/>
6952
7089
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
7090
+ <xsl:call-template name="refine_requirement-style"/>
6953
7091
  <xsl:apply-templates select="mn:fmt-name"/>
6954
7092
  <xsl:apply-templates select="mn:label"/>
6955
7093
  <xsl:apply-templates select="@obligation"/>
@@ -6962,6 +7100,7 @@
6962
7100
  <xsl:if test="normalize-space() != ''">
6963
7101
 
6964
7102
  <fo:block xsl:use-attribute-sets="requirement-name-style">
7103
+ <xsl:call-template name="refine_requirement-name-style"/>
6965
7104
  <xsl:apply-templates/>
6966
7105
  </fo:block>
6967
7106
  </xsl:if>
@@ -6969,6 +7108,7 @@
6969
7108
 
6970
7109
  <xsl:template match="mn:requirement/mn:label">
6971
7110
  <fo:block xsl:use-attribute-sets="requirement-label-style">
7111
+ <xsl:call-template name="refine_requirement-label-style"/>
6972
7112
  <xsl:apply-templates/>
6973
7113
  </fo:block>
6974
7114
  </xsl:template>
@@ -6994,6 +7134,7 @@
6994
7134
  <xsl:template match="mn:recommendation">
6995
7135
  <xsl:call-template name="setNamedDestination"/>
6996
7136
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
7137
+ <xsl:call-template name="refine_recommendation-style"/>
6997
7138
  <xsl:apply-templates select="mn:fmt-name"/>
6998
7139
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6999
7140
  </fo:block>
@@ -7003,6 +7144,7 @@
7003
7144
  <xsl:if test="normalize-space() != ''">
7004
7145
 
7005
7146
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
7147
+ <xsl:call-template name="refine_recommendation-name-style"/>
7006
7148
  <xsl:apply-templates/>
7007
7149
  </fo:block>
7008
7150
  </xsl:if>
@@ -7010,6 +7152,7 @@
7010
7152
 
7011
7153
  <xsl:template match="mn:recommendation/mn:label">
7012
7154
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
7155
+ <xsl:call-template name="refine_recommendation-label-style"/>
7013
7156
  <xsl:apply-templates/>
7014
7157
  </fo:block>
7015
7158
  </xsl:template>
@@ -7190,34 +7333,64 @@
7190
7333
  <xsl:attribute-set name="term-style">
7191
7334
  </xsl:attribute-set> <!-- term-style -->
7192
7335
 
7336
+ <xsl:template name="refine_term-style">
7337
+ </xsl:template>
7338
+
7193
7339
  <xsl:attribute-set name="term-name-style">
7194
7340
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7195
7341
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7196
7342
  </xsl:attribute-set> <!-- term-name-style -->
7197
7343
 
7198
- <xsl:attribute-set name="preferred-block-style">
7344
+ <xsl:template name="refine_term-name-style">
7345
+ </xsl:template>
7346
+
7347
+ <xsl:attribute-set name="preferred-block-style">
7199
7348
  </xsl:attribute-set> <!-- preferred-block-style -->
7200
7349
 
7350
+ <xsl:template name="refine_preferred-block-style">
7351
+ </xsl:template>
7352
+
7201
7353
  <xsl:attribute-set name="preferred-term-style">
7202
7354
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7203
7355
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7204
7356
  </xsl:attribute-set> <!-- preferred-term-style -->
7205
7357
 
7358
+ <xsl:template name="refine_preferred-term-style">
7359
+ <xsl:if test="mn:strong">
7360
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
7361
+ </xsl:if>
7362
+ </xsl:template>
7363
+
7206
7364
  <xsl:attribute-set name="domain-style">
7207
7365
  </xsl:attribute-set> <!-- domain-style -->
7208
7366
 
7367
+ <xsl:template name="refine_domain-style">
7368
+ </xsl:template>
7369
+
7209
7370
  <xsl:attribute-set name="admitted-style">
7210
7371
  </xsl:attribute-set> <!-- admitted-style -->
7211
7372
 
7373
+ <xsl:template name="refine_admitted-style">
7374
+ </xsl:template>
7375
+
7212
7376
  <xsl:attribute-set name="deprecates-style">
7213
7377
  </xsl:attribute-set> <!-- deprecates-style -->
7214
7378
 
7379
+ <xsl:template name="refine_deprecates-style">
7380
+ </xsl:template>
7381
+
7215
7382
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
7216
7383
  </xsl:attribute-set>
7217
7384
 
7385
+ <xsl:template name="refine_related-block-style">
7386
+ </xsl:template>
7387
+
7218
7388
  <xsl:attribute-set name="definition-style">
7219
7389
  </xsl:attribute-set> <!-- definition-style -->
7220
7390
 
7391
+ <xsl:template name="refine_definition-style">
7392
+ </xsl:template>
7393
+
7221
7394
  <xsl:attribute-set name="termsource-style">
7222
7395
  </xsl:attribute-set> <!-- termsource-style -->
7223
7396
 
@@ -7227,9 +7400,15 @@
7227
7400
  <xsl:attribute-set name="termsource-text-style">
7228
7401
  </xsl:attribute-set> <!-- termsource-text-style -->
7229
7402
 
7403
+ <xsl:template name="refine_termsource-text-style">
7404
+ </xsl:template>
7405
+
7230
7406
  <xsl:attribute-set name="origin-style">
7231
7407
  </xsl:attribute-set> <!-- origin-style -->
7232
7408
 
7409
+ <xsl:template name="refine_origin-style">
7410
+ </xsl:template>
7411
+
7233
7412
  <!-- ====== -->
7234
7413
  <!-- term -->
7235
7414
  <!-- ====== -->
@@ -7245,9 +7424,8 @@
7245
7424
  <xsl:template match="mn:term">
7246
7425
  <xsl:call-template name="setNamedDestination"/>
7247
7426
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7427
+ <xsl:call-template name="refine_term-style"/>
7248
7428
 
7249
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
7250
- </xsl:if>
7251
7429
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7252
7430
  </fo:block>
7253
7431
  </xsl:template>
@@ -7323,6 +7501,7 @@
7323
7501
  <!-- text SOURCE: -->
7324
7502
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
7325
7503
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
7504
+ <xsl:call-template name="refine_termsource-text-style"/>
7326
7505
  <xsl:value-of select="."/>
7327
7506
  </fo:inline>
7328
7507
  </xsl:template>
@@ -7335,6 +7514,7 @@
7335
7514
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
7336
7515
  </xsl:if>
7337
7516
  <fo:inline xsl:use-attribute-sets="origin-style">
7517
+ <xsl:call-template name="refine_origin-style"/>
7338
7518
  <xsl:apply-templates/>
7339
7519
  </fo:inline>
7340
7520
  </fo:basic-link>
@@ -7384,9 +7564,12 @@
7384
7564
  </xsl:variable>
7385
7565
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
7386
7566
 
7567
+ <xsl:call-template name="refine_preferred-block-style"/>
7568
+
7387
7569
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
7388
7570
 
7389
7571
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
7572
+ <xsl:call-template name="refine_term-name-style"/>
7390
7573
 
7391
7574
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
7392
7575
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -7397,7 +7580,7 @@
7397
7580
  </xsl:if>
7398
7581
 
7399
7582
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
7400
- <xsl:call-template name="setStyle_preferred"/>
7583
+ <xsl:call-template name="refine_preferred-term-style"/>
7401
7584
 
7402
7585
  <xsl:apply-templates/>
7403
7586
  </fo:block>
@@ -7418,22 +7601,18 @@
7418
7601
 
7419
7602
  <xsl:template match="mn:fmt-admitted">
7420
7603
  <fo:block xsl:use-attribute-sets="admitted-style">
7604
+ <xsl:call-template name="refine_admitted-style"/>
7421
7605
  <xsl:apply-templates/>
7422
7606
  </fo:block>
7423
7607
  </xsl:template>
7424
7608
 
7425
7609
  <xsl:template match="mn:fmt-deprecates">
7426
7610
  <fo:block xsl:use-attribute-sets="deprecates-style">
7611
+ <xsl:call-template name="refine_deprecates-style"/>
7427
7612
  <xsl:apply-templates/>
7428
7613
  </fo:block>
7429
7614
  </xsl:template>
7430
7615
 
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
7616
  <!-- 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
7617
  <!-- in metanorma xml preferred terms delimited by semicolons -->
7439
7618
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -7443,6 +7622,7 @@
7443
7622
 
7444
7623
  <xsl:template match="mn:fmt-related">
7445
7624
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
7625
+ <xsl:call-template name="refine_related-block-style"/>
7446
7626
  <xsl:apply-templates/>
7447
7627
  </fo:block>
7448
7628
  </xsl:template>
@@ -7457,6 +7637,7 @@
7457
7637
  <!-- ========== -->
7458
7638
  <xsl:template match="mn:fmt-definition">
7459
7639
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
7640
+ <xsl:call-template name="refine_definition-style"/>
7460
7641
  <xsl:apply-templates/>
7461
7642
  </fo:block>
7462
7643
  </xsl:template>
@@ -7503,6 +7684,9 @@
7503
7684
  <xsl:attribute-set name="example-body-style">
7504
7685
  </xsl:attribute-set> <!-- example-body-style -->
7505
7686
 
7687
+ <xsl:template name="refine_example-body-style">
7688
+ </xsl:template>
7689
+
7506
7690
  <xsl:attribute-set name="example-name-style">
7507
7691
  <xsl:attribute name="font-style">italic</xsl:attribute>
7508
7692
  </xsl:attribute-set> <!-- example-name-style -->
@@ -7548,6 +7732,8 @@
7548
7732
  <xsl:when test="contains($element, 'block')">
7549
7733
  <fo:block xsl:use-attribute-sets="example-p-style">
7550
7734
 
7735
+ <xsl:call-template name="refine_example-p-style"/>
7736
+
7551
7737
  <xsl:apply-templates/>
7552
7738
  </fo:block>
7553
7739
  </xsl:when>
@@ -7599,6 +7785,7 @@
7599
7785
  </fo:block>
7600
7786
 
7601
7787
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
7788
+ <xsl:call-template name="refine_example-body-style"/>
7602
7789
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7603
7790
  <xsl:variable name="example_body">
7604
7791
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -7661,6 +7848,7 @@
7661
7848
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
7662
7849
  <!-- display further elements in blocks -->
7663
7850
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
7851
+ <xsl:call-template name="refine_example-body-style"/>
7664
7852
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7665
7853
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
7666
7854
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -7941,6 +8129,9 @@
7941
8129
  <!-- <xsl:attribute name="padding-right">2.5mm</xsl:attribute> -->
7942
8130
  </xsl:attribute-set> <!-- table-fn-number-style -->
7943
8131
 
8132
+ <xsl:template name="refine_table-fn-number-style">
8133
+ </xsl:template>
8134
+
7944
8135
  <xsl:attribute-set name="table-fmt-fn-label-style">
7945
8136
  <xsl:attribute name="font-size">80%</xsl:attribute>
7946
8137
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
@@ -7948,30 +8139,12 @@
7948
8139
  <xsl:template name="refine_table-fmt-fn-label-style">
7949
8140
  </xsl:template>
7950
8141
 
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
8142
  <xsl:attribute-set name="table-fn-body-style">
7957
8143
  </xsl:attribute-set>
7958
8144
 
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">
8145
+ <xsl:template name="refine_table-fn-body-style">
7969
8146
  </xsl:template>
7970
8147
 
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
8148
  <!-- ========================== -->
7976
8149
  <!-- END Table styles -->
7977
8150
  <!-- ========================== -->
@@ -9265,6 +9438,7 @@
9265
9438
  </xsl:apply-templates>
9266
9439
 
9267
9440
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
9441
+ <xsl:call-template name="refine_table-fn-body-style"/>
9268
9442
  <!-- <xsl:copy-of select="./node()"/> -->
9269
9443
  <xsl:apply-templates/>
9270
9444
  </fo:inline>
@@ -9283,6 +9457,7 @@
9283
9457
  <xsl:param name="process">false</xsl:param>
9284
9458
  <xsl:if test="$process = 'true'">
9285
9459
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
9460
+ <xsl:call-template name="refine_table-fn-number-style"/>
9286
9461
 
9287
9462
  <!-- tab is padding-right -->
9288
9463
  <xsl:apply-templates select=".//mn:tab">
@@ -10158,9 +10333,18 @@
10158
10333
  <xsl:attribute-set name="dl-block-style">
10159
10334
  </xsl:attribute-set>
10160
10335
 
10336
+ <xsl:template name="refine_dl-block-style">
10337
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
10338
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10339
+ </xsl:if>
10340
+ </xsl:template>
10341
+
10161
10342
  <xsl:attribute-set name="dt-row-style">
10162
10343
  </xsl:attribute-set>
10163
10344
 
10345
+ <xsl:template name="refine_dt-row-style">
10346
+ </xsl:template>
10347
+
10164
10348
  <xsl:attribute-set name="dt-cell-style">
10165
10349
  </xsl:attribute-set>
10166
10350
 
@@ -10181,6 +10365,9 @@
10181
10365
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10182
10366
  </xsl:attribute-set> <!-- dl-name-style -->
10183
10367
 
10368
+ <xsl:template name="refine_dl-name-style">
10369
+ </xsl:template>
10370
+
10184
10371
  <xsl:attribute-set name="dd-cell-style">
10185
10372
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
10186
10373
  </xsl:attribute-set>
@@ -10219,9 +10406,7 @@
10219
10406
  <!-- <dl><xsl:copy-of select="."/></dl> -->
10220
10407
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
10221
10408
 
10222
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
10223
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10224
- </xsl:if>
10409
+ <xsl:call-template name="refine_dl-block-style"/>
10225
10410
 
10226
10411
  <xsl:call-template name="setBlockSpanAll"/>
10227
10412
  <xsl:if test="not(ancestor::mn:li)">
@@ -10519,6 +10704,8 @@
10519
10704
  <xsl:if test="$process = 'true'">
10520
10705
  <fo:block xsl:use-attribute-sets="dl-name-style">
10521
10706
 
10707
+ <xsl:call-template name="refine_dl-name-style"/>
10708
+
10522
10709
  <xsl:apply-templates/>
10523
10710
  </fo:block>
10524
10711
  </xsl:if>
@@ -10707,6 +10894,8 @@
10707
10894
  <xsl:param name="split_keep-within-line"/>
10708
10895
 
10709
10896
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
10897
+ <xsl:call-template name="refine_dt-row-style"/>
10898
+
10710
10899
  <xsl:call-template name="insert_dt_cell">
10711
10900
  <xsl:with-param name="key_iso" select="$key_iso"/>
10712
10901
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -10916,15 +11105,22 @@
10916
11105
  <xsl:attribute-set name="appendix-style">
10917
11106
  </xsl:attribute-set>
10918
11107
 
11108
+ <xsl:template name="refine_appendix-style">
11109
+ </xsl:template>
11110
+
10919
11111
  <xsl:attribute-set name="appendix-example-style">
10920
11112
  </xsl:attribute-set>
10921
11113
 
11114
+ <xsl:template name="refine_appendix-example-style">
11115
+ </xsl:template>
11116
+
10922
11117
  <!-- ======================== -->
10923
11118
  <!-- Appendix processing -->
10924
11119
  <!-- ======================== -->
10925
11120
  <xsl:template match="mn:appendix">
10926
11121
  <xsl:call-template name="setNamedDestination"/>
10927
11122
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
11123
+ <xsl:call-template name="refine_appendix-style"/>
10928
11124
  <xsl:apply-templates select="mn:fmt-title"/>
10929
11125
  </fo:block>
10930
11126
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -10943,13 +11139,23 @@
10943
11139
  <xsl:template match="mn:appendix//mn:example" priority="2">
10944
11140
  <xsl:call-template name="setNamedDestination"/>
10945
11141
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
11142
+ <xsl:call-template name="refine_appendix-example-style"/>
10946
11143
  <xsl:apply-templates select="mn:fmt-name"/>
10947
11144
  </fo:block>
10948
11145
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10949
11146
  </xsl:template>
10950
11147
 
10951
11148
  <xsl:attribute-set name="xref-style">
10952
- </xsl:attribute-set>
11149
+ </xsl:attribute-set> <!-- xref-style -->
11150
+
11151
+ <xsl:template name="refine_xref-style">
11152
+ <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])">
11153
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
11154
+ </xsl:if>
11155
+ <xsl:if test="parent::mn:add">
11156
+ <xsl:call-template name="append_add-style"/>
11157
+ </xsl:if>
11158
+ </xsl:template> <!-- refine_xref-style -->
10953
11159
 
10954
11160
  <xsl:template match="mn:fmt-xref">
10955
11161
  <xsl:call-template name="insert_basic_link">
@@ -10958,12 +11164,8 @@
10958
11164
  <xsl:call-template name="getAltText"/>
10959
11165
  </xsl:variable>
10960
11166
  <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>
11167
+ <xsl:call-template name="refine_xref-style"/>
11168
+
10967
11169
  <xsl:apply-templates/>
10968
11170
  </fo:basic-link>
10969
11171
  </xsl:with-param>
@@ -11080,20 +11282,20 @@
11080
11282
  <xsl:attribute-set name="note-style">
11081
11283
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11082
11284
  <xsl:attribute name="text-align">justify</xsl:attribute>
11083
- </xsl:attribute-set>
11285
+ </xsl:attribute-set> <!-- note-style -->
11084
11286
 
11085
11287
  <xsl:template name="refine_note-style">
11086
11288
  <xsl:if test="parent::mn:li">
11087
11289
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
11088
11290
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
11089
11291
  </xsl:if>
11090
- </xsl:template>
11292
+ </xsl:template> <!-- refine_note-style -->
11091
11293
 
11092
11294
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
11093
11295
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
11094
11296
 
11095
11297
  <xsl:attribute-set name="note-name-style">
11096
- </xsl:attribute-set>
11298
+ </xsl:attribute-set> <!-- note-name-style -->
11097
11299
 
11098
11300
  <xsl:template name="refine_note-name-style">
11099
11301
  </xsl:template> <!-- refine_note-name-style -->
@@ -11111,19 +11313,22 @@
11111
11313
 
11112
11314
  <xsl:attribute-set name="note-p-style">
11113
11315
  <xsl:attribute name="text-align">justify</xsl:attribute>
11114
- </xsl:attribute-set>
11316
+ </xsl:attribute-set> <!-- note-p-style -->
11317
+
11318
+ <xsl:template name="refine_note-p-style">
11319
+ </xsl:template>
11115
11320
 
11116
11321
  <xsl:attribute-set name="termnote-style">
11117
11322
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11118
11323
  <xsl:attribute name="text-align">justify</xsl:attribute>
11119
- </xsl:attribute-set>
11324
+ </xsl:attribute-set> <!-- termnote-style -->
11120
11325
 
11121
11326
  <xsl:template name="refine_termnote-style">
11122
11327
  </xsl:template> <!-- refine_termnote-style -->
11123
11328
 
11124
11329
  <xsl:attribute-set name="termnote-name-style">
11125
11330
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
11126
- </xsl:attribute-set>
11331
+ </xsl:attribute-set> <!-- termnote-name-style -->
11127
11332
 
11128
11333
  <xsl:template name="refine_termnote-name-style">
11129
11334
  </xsl:template>
@@ -11132,6 +11337,9 @@
11132
11337
  <xsl:attribute name="text-align">justify</xsl:attribute>
11133
11338
  </xsl:attribute-set>
11134
11339
 
11340
+ <xsl:template name="refine_termnote-p-style">
11341
+ </xsl:template>
11342
+
11135
11343
  <!-- ====== -->
11136
11344
  <!-- note -->
11137
11345
  <!-- termnote -->
@@ -11198,11 +11406,13 @@
11198
11406
  <xsl:choose>
11199
11407
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
11200
11408
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
11409
+ <xsl:call-template name="refine_note-p-style"/>
11201
11410
  <xsl:apply-templates/>
11202
11411
  </fo:inline>
11203
11412
  </xsl:when>
11204
11413
  <xsl:otherwise>
11205
11414
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
11415
+ <xsl:call-template name="refine_note-p-style"/>
11206
11416
  <xsl:apply-templates/>
11207
11417
  </fo:block>
11208
11418
  </xsl:otherwise>
@@ -11306,11 +11516,13 @@
11306
11516
  <xsl:choose>
11307
11517
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
11308
11518
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
11519
+ <xsl:call-template name="refine_termnote-p-style"/>
11309
11520
  <xsl:apply-templates/>
11310
11521
  </fo:inline>
11311
11522
  </xsl:when>
11312
11523
  <xsl:otherwise>
11313
11524
  <fo:block xsl:use-attribute-sets="termnote-p-style">
11525
+ <xsl:call-template name="refine_termnote-p-style"/>
11314
11526
  <xsl:apply-templates/>
11315
11527
  </fo:block>
11316
11528
  </xsl:otherwise>
@@ -11323,7 +11535,7 @@
11323
11535
  <xsl:attribute-set name="quote-style">
11324
11536
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
11325
11537
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
11326
- </xsl:attribute-set>
11538
+ </xsl:attribute-set> <!-- quote-style -->
11327
11539
 
11328
11540
  <xsl:template name="refine_quote-style">
11329
11541
  </xsl:template>
@@ -11332,6 +11544,9 @@
11332
11544
  <xsl:attribute name="text-align">right</xsl:attribute>
11333
11545
  </xsl:attribute-set>
11334
11546
 
11547
+ <xsl:template name="refine_quote-source-style">
11548
+ </xsl:template>
11549
+
11335
11550
  <!-- ====== -->
11336
11551
  <!-- quote -->
11337
11552
  <!-- source -->
@@ -11360,6 +11575,7 @@
11360
11575
  </fo:block-container>
11361
11576
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
11362
11577
  <fo:block xsl:use-attribute-sets="quote-source-style">
11578
+ <xsl:call-template name="refine_quote-source-style"/>
11363
11579
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
11364
11580
  <xsl:apply-templates select="mn:author"/>
11365
11581
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -11424,6 +11640,9 @@
11424
11640
  <xsl:attribute-set name="figure-style">
11425
11641
  </xsl:attribute-set>
11426
11642
 
11643
+ <xsl:template name="refine_figure-style">
11644
+ </xsl:template>
11645
+
11427
11646
  <xsl:attribute-set name="figure-name-style">
11428
11647
  <xsl:attribute name="role">Caption</xsl:attribute>
11429
11648
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
@@ -11431,7 +11650,7 @@
11431
11650
  <xsl:attribute name="text-align">left</xsl:attribute>
11432
11651
  <xsl:attribute name="margin-left">19mm</xsl:attribute>
11433
11652
  <xsl:attribute name="text-indent">-19mm</xsl:attribute>
11434
- </xsl:attribute-set>
11653
+ </xsl:attribute-set> <!-- figure-name-style -->
11435
11654
 
11436
11655
  <xsl:template name="refine_figure-name-style">
11437
11656
  </xsl:template> <!-- refine_figure-name-style -->
@@ -11439,7 +11658,7 @@
11439
11658
  <xsl:attribute-set name="image-style">
11440
11659
  <xsl:attribute name="role">SKIP</xsl:attribute>
11441
11660
  <xsl:attribute name="text-align">center</xsl:attribute>
11442
- </xsl:attribute-set>
11661
+ </xsl:attribute-set> <!-- image-style -->
11443
11662
 
11444
11663
  <xsl:template name="refine_image-style">
11445
11664
  </xsl:template>
@@ -11449,14 +11668,51 @@
11449
11668
  <xsl:attribute name="content-height">100%</xsl:attribute>
11450
11669
  <xsl:attribute name="scaling">uniform</xsl:attribute>
11451
11670
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
11452
- </xsl:attribute-set>
11671
+ </xsl:attribute-set> <!-- image-graphic-style -->
11672
+
11673
+ <xsl:template name="refine_image-graphic-style">
11674
+ </xsl:template>
11453
11675
 
11454
11676
  <xsl:attribute-set name="figure-source-style">
11455
11677
  </xsl:attribute-set>
11456
11678
 
11679
+ <xsl:template name="refine_figure-source-style">
11680
+ </xsl:template>
11681
+
11457
11682
  <xsl:attribute-set name="figure-pseudocode-p-style">
11458
11683
  </xsl:attribute-set>
11459
11684
 
11685
+ <xsl:template name="refine_figure-pseudocode-p-style">
11686
+ </xsl:template>
11687
+
11688
+ <xsl:attribute-set name="figure-fn-number-style">
11689
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
11690
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
11691
+
11692
+ <xsl:template name="refine_figure-fn-number-style">
11693
+ </xsl:template>
11694
+
11695
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
11696
+ <xsl:attribute name="font-size">80%</xsl:attribute>
11697
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
11698
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
11699
+
11700
+ <xsl:template name="refine_figure-fmt-fn-label-style">
11701
+ </xsl:template>
11702
+
11703
+ <xsl:attribute-set name="figure-fn-body-style">
11704
+ <xsl:attribute name="text-align">justify</xsl:attribute>
11705
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11706
+ </xsl:attribute-set>
11707
+
11708
+ <xsl:template name="refine_figure-fn-body-style">
11709
+ <xsl:variable name="key_iso">
11710
+ </xsl:variable>
11711
+ <xsl:if test="normalize-space($key_iso) = 'true'">
11712
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
11713
+ </xsl:if>
11714
+ </xsl:template>
11715
+
11460
11716
  <!-- ============================ -->
11461
11717
  <!-- figure's footnotes rendering -->
11462
11718
  <!-- ============================ -->
@@ -11569,9 +11825,8 @@
11569
11825
  </fo:table-cell>
11570
11826
  <fo:table-cell>
11571
11827
  <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>
11828
+ <xsl:call-template name="refine_figure-fn-body-style"/>
11829
+
11575
11830
  <!-- <xsl:copy-of select="./node()"/> -->
11576
11831
  <xsl:apply-templates/>
11577
11832
  </fo:block>
@@ -11589,6 +11844,7 @@
11589
11844
  <xsl:param name="process">false</xsl:param>
11590
11845
  <xsl:if test="$process = 'true'">
11591
11846
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
11847
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11592
11848
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
11593
11849
 
11594
11850
  <!-- tab is padding-right -->
@@ -11626,6 +11882,7 @@
11626
11882
  <xsl:attribute name="font-size">10pt</xsl:attribute>
11627
11883
  </xsl:if>
11628
11884
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
11885
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11629
11886
  <!-- <xsl:value-of select="@reference"/> -->
11630
11887
  <xsl:apply-templates/>
11631
11888
  </fo:inline>
@@ -11671,6 +11928,8 @@
11671
11928
 
11672
11929
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
11673
11930
 
11931
+ <xsl:call-template name="refine_figure-style"/>
11932
+
11674
11933
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
11675
11934
  <xsl:call-template name="setIDforNamedDestination"/>
11676
11935
  </xsl:for-each>
@@ -11714,6 +11973,7 @@
11714
11973
 
11715
11974
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
11716
11975
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
11976
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
11717
11977
  <xsl:apply-templates/>
11718
11978
  </fo:block>
11719
11979
  </xsl:template>
@@ -11843,6 +12103,8 @@
11843
12103
  </xsl:variable>
11844
12104
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
11845
12105
 
12106
+ <xsl:call-template name="refine_image-graphic-style"/>
12107
+
11846
12108
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
11847
12109
  <xsl:variable name="scale">
11848
12110
  <xsl:call-template name="getImageScale">
@@ -12543,6 +12805,9 @@
12543
12805
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
12544
12806
  </xsl:attribute-set> <!-- formula-style -->
12545
12807
 
12808
+ <xsl:template name="refine_formula-style">
12809
+ </xsl:template>
12810
+
12546
12811
  <xsl:attribute-set name="formula-stem-block-style">
12547
12812
  <xsl:attribute name="text-align">center</xsl:attribute>
12548
12813
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -12614,6 +12879,8 @@
12614
12879
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
12615
12880
  <fo:block xsl:use-attribute-sets="formula-style">
12616
12881
 
12882
+ <xsl:call-template name="refine_formula-style"/>
12883
+
12617
12884
  <fo:table table-layout="fixed" width="100%">
12618
12885
  <fo:table-column column-width="95%"/>
12619
12886
  <fo:table-column column-width="5%"/>
@@ -13063,6 +13330,9 @@
13063
13330
  <xsl:attribute name="font-weight">bold</xsl:attribute>
13064
13331
  </xsl:attribute-set> <!-- list-name-style -->
13065
13332
 
13333
+ <xsl:template name="refine_list-name-style">
13334
+ </xsl:template>
13335
+
13066
13336
  <xsl:attribute-set name="list-item-style">
13067
13337
  </xsl:attribute-set>
13068
13338
 
@@ -13362,6 +13632,7 @@
13362
13632
  <xsl:param name="process">false</xsl:param>
13363
13633
  <xsl:if test="$process = 'true'">
13364
13634
  <fo:block xsl:use-attribute-sets="list-name-style">
13635
+ <xsl:call-template name="refine_list-name-style"/>
13365
13636
  <xsl:apply-templates/>
13366
13637
  </fo:block>
13367
13638
  </xsl:if>
@@ -13422,27 +13693,48 @@
13422
13693
  <!-- END Lists processing -->
13423
13694
  <!-- ===================================== -->
13424
13695
 
13696
+ <xsl:attribute-set name="footnote-separator-leader-style">
13697
+ </xsl:attribute-set>
13698
+
13699
+ <xsl:template name="refine_footnote-separator-leader-style">
13700
+ </xsl:template>
13701
+
13702
+ <xsl:attribute-set name="fn-container-body-style">
13703
+ <xsl:attribute name="text-indent">0</xsl:attribute>
13704
+ <xsl:attribute name="start-indent">0</xsl:attribute>
13705
+ </xsl:attribute-set>
13706
+
13707
+ <xsl:template name="refine_fn-container-body-style">
13708
+ </xsl:template>
13709
+
13425
13710
  <xsl:attribute-set name="fn-reference-style">
13426
13711
  <xsl:attribute name="font-size">80%</xsl:attribute>
13427
13712
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13428
13713
  <xsl:attribute name="font-size">70%</xsl:attribute>
13429
13714
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13430
13715
  <xsl:attribute name="font-style">italic</xsl:attribute>
13431
-
13432
- </xsl:attribute-set>
13716
+ </xsl:attribute-set> <!-- fn-reference-style -->
13433
13717
 
13434
13718
  <xsl:template name="refine_fn-reference-style">
13719
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13720
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13435
13721
  </xsl:template> <!-- refine_fn-reference-style -->
13436
13722
 
13437
13723
  <xsl:attribute-set name="fn-style">
13438
13724
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13439
13725
  </xsl:attribute-set>
13440
13726
 
13727
+ <xsl:template name="refine_fn-style">
13728
+ </xsl:template>
13729
+
13441
13730
  <xsl:attribute-set name="fn-num-style">
13442
13731
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13443
13732
  <xsl:attribute name="font-size">65%</xsl:attribute>
13444
13733
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13445
- </xsl:attribute-set>
13734
+ </xsl:attribute-set> <!-- fn-num-style -->
13735
+
13736
+ <xsl:template name="refine_fn-num-style">
13737
+ </xsl:template>
13446
13738
 
13447
13739
  <xsl:attribute-set name="fn-body-style">
13448
13740
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -13453,7 +13745,7 @@
13453
13745
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13454
13746
  <xsl:attribute name="line-height">124%</xsl:attribute>
13455
13747
  <xsl:attribute name="text-align">justify</xsl:attribute>
13456
- </xsl:attribute-set>
13748
+ </xsl:attribute-set> <!-- fn-body-style" -->
13457
13749
 
13458
13750
  <xsl:template name="refine_fn-body-style">
13459
13751
  </xsl:template> <!-- refine_fn-body-style -->
@@ -13518,10 +13810,12 @@
13518
13810
  <xsl:choose>
13519
13811
  <xsl:when test="ancestor::mn:bibitem">
13520
13812
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
13813
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
13521
13814
  </fn_styles>
13522
13815
  </xsl:when>
13523
13816
  <xsl:otherwise>
13524
13817
  <fn_styles xsl:use-attribute-sets="fn-num-style">
13818
+ <xsl:call-template name="refine_fn-num-style"/>
13525
13819
  </fn_styles>
13526
13820
  </xsl:otherwise>
13527
13821
  </xsl:choose>
@@ -13531,9 +13825,12 @@
13531
13825
  <xsl:copy-of select="."/>
13532
13826
  </xsl:for-each>
13533
13827
 
13534
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13828
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13829
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13535
13830
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
13536
- </xsl:if>
13831
+ </xsl:if> -->
13832
+
13833
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13537
13834
 
13538
13835
  <xsl:call-template name="insert_basic_link">
13539
13836
  <xsl:with-param name="element">
@@ -13556,10 +13853,12 @@
13556
13853
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
13557
13854
 
13558
13855
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
13856
+ <xsl:call-template name="refine_fn-style"/>
13559
13857
  <xsl:copy-of select="$footnote_inline"/>
13560
13858
  <fo:footnote-body role="Note">
13561
13859
 
13562
13860
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
13861
+ <xsl:call-template name="refine_fn-container-body-style"/>
13563
13862
 
13564
13863
  <xsl:variable name="fn_block">
13565
13864
  <xsl:call-template name="refine_fn-body-style"/>
@@ -13660,6 +13959,9 @@
13660
13959
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13661
13960
  </xsl:attribute-set> <!-- admonition-style -->
13662
13961
 
13962
+ <xsl:template name="refine_admonition-style">
13963
+ </xsl:template>
13964
+
13663
13965
  <xsl:attribute-set name="admonition-container-style">
13664
13966
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
13665
13967
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -13667,6 +13969,9 @@
13667
13969
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
13668
13970
  </xsl:attribute-set> <!-- admonition-container-style -->
13669
13971
 
13972
+ <xsl:template name="refine_admonition-container-style">
13973
+ </xsl:template>
13974
+
13670
13975
  <xsl:attribute-set name="admonition-name-style">
13671
13976
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
13672
13977
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -13676,9 +13981,16 @@
13676
13981
  <xsl:attribute name="text-align">center</xsl:attribute>
13677
13982
  </xsl:attribute-set> <!-- admonition-name-style -->
13678
13983
 
13984
+ <xsl:template name="refine_admonition-name-style">
13985
+ </xsl:template>
13986
+
13679
13987
  <xsl:attribute-set name="admonition-p-style">
13680
13988
  <xsl:attribute name="font-style">italic</xsl:attribute>
13681
13989
  </xsl:attribute-set> <!-- admonition-p-style -->
13990
+
13991
+ <xsl:template name="refine_admonition-p-style">
13992
+ </xsl:template>
13993
+
13682
13994
  <!-- end admonition -->
13683
13995
 
13684
13996
  <!-- ================ -->
@@ -13688,12 +14000,18 @@
13688
14000
  <xsl:call-template name="setNamedDestination"/>
13689
14001
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
13690
14002
 
14003
+ <xsl:call-template name="refine_admonition-style"/>
14004
+
13691
14005
  <xsl:call-template name="setBlockSpanAll"/>
13692
14006
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14007
+
14008
+ <xsl:call-template name="refine_admonition-container-style"/>
13693
14009
  <fo:block xsl:use-attribute-sets="admonition-name-style">
14010
+ <xsl:call-template name="refine_admonition-name-style"/>
13694
14011
  <xsl:call-template name="displayAdmonitionName"/>
13695
14012
  </fo:block>
13696
14013
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14014
+ <xsl:call-template name="refine_admonition-p-style"/>
13697
14015
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
13698
14016
  </fo:block>
13699
14017
 
@@ -13747,6 +14065,7 @@
13747
14065
 
13748
14066
  <xsl:template match="mn:admonition/mn:p">
13749
14067
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14068
+ <xsl:call-template name="refine_admonition-p-style"/>
13750
14069
 
13751
14070
  <xsl:apply-templates/>
13752
14071
  </fo:block>
@@ -13756,6 +14075,13 @@
13756
14075
  <!-- END Admonition -->
13757
14076
  <!-- ================ -->
13758
14077
 
14078
+ <xsl:attribute-set name="references-non-normative-title-style">
14079
+ </xsl:attribute-set>
14080
+
14081
+ <xsl:template name="refine_references-non-normative-title-style">
14082
+
14083
+ </xsl:template>
14084
+
13759
14085
  <!-- bibitem in Normative References (references/@normative="true") -->
13760
14086
  <xsl:attribute-set name="bibitem-normative-style">
13761
14087
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -13764,6 +14090,9 @@
13764
14090
  <xsl:attribute name="line-height">115%</xsl:attribute>
13765
14091
  </xsl:attribute-set> <!-- bibitem-normative-style -->
13766
14092
 
14093
+ <xsl:template name="refine_bibitem-normative-style">
14094
+ </xsl:template>
14095
+
13767
14096
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
13768
14097
  <xsl:attribute-set name="bibitem-normative-list-style">
13769
14098
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -13771,9 +14100,15 @@
13771
14100
  <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
13772
14101
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
13773
14102
 
14103
+ <xsl:template name="refine_bibitem-normative-list-style">
14104
+ </xsl:template>
14105
+
13774
14106
  <xsl:attribute-set name="bibitem-non-normative-style">
13775
14107
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
13776
14108
 
14109
+ <xsl:template name="refine_bibitem-non-normative-style">
14110
+ </xsl:template>
14111
+
13777
14112
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
13778
14113
  <xsl:attribute-set name="bibitem-non-normative-list-style">
13779
14114
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -13781,17 +14116,29 @@
13781
14116
  <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
13782
14117
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
13783
14118
 
14119
+ <xsl:template name="refine_bibitem-non-normative-list-style">
14120
+ </xsl:template>
14121
+
13784
14122
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
13785
14123
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13786
14124
  </xsl:attribute-set>
13787
14125
 
14126
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
14127
+ </xsl:template>
14128
+
13788
14129
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
13789
14130
  <xsl:attribute-set name="bibitem-normative-list-body-style">
13790
14131
  </xsl:attribute-set>
13791
14132
 
14133
+ <xsl:template name="refine_bibitem-normative-list-body-style">
14134
+ </xsl:template>
14135
+
13792
14136
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
13793
14137
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
13794
14138
 
14139
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
14140
+ </xsl:template>
14141
+
13795
14142
  <!-- footnote reference number for bibitem, in the text -->
13796
14143
  <xsl:attribute-set name="bibitem-note-fn-style">
13797
14144
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -13799,6 +14146,9 @@
13799
14146
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13800
14147
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
13801
14148
 
14149
+ <xsl:template name="refine_bibitem-note-fn-style">
14150
+ </xsl:template>
14151
+
13802
14152
  <!-- footnote number on the page bottom -->
13803
14153
  <xsl:attribute-set name="bibitem-note-fn-number-style">
13804
14154
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -13817,6 +14167,9 @@
13817
14167
  <xsl:attribute name="line-height">120%</xsl:attribute>
13818
14168
  </xsl:attribute-set> <!-- references-non-normative-style -->
13819
14169
 
14170
+ <xsl:template name="refine_references-non-normative-style">
14171
+ </xsl:template>
14172
+
13820
14173
  <!-- ======================= -->
13821
14174
  <!-- Bibliography rendering -->
13822
14175
  <!-- ======================= -->
@@ -13858,6 +14211,7 @@
13858
14211
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13859
14212
 
13860
14213
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
14214
+ <xsl:call-template name="refine_references-non-normative-style"/>
13861
14215
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13862
14216
  </fo:block>
13863
14217
  </xsl:template> <!-- references -->
@@ -13871,17 +14225,20 @@
13871
14225
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13872
14226
  <xsl:call-template name="setNamedDestination"/>
13873
14227
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14228
+ <xsl:call-template name="refine_bibitem-normative-style"/>
14229
+
13874
14230
  <xsl:call-template name="processBibitem"/>
13875
14231
  </fo:block>
13876
14232
 
13877
14233
  </xsl:template> <!-- bibitem -->
13878
14234
 
13879
14235
  <!-- 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">
14236
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
13881
14237
  <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
14238
  <!-- start BIPM bibitem processing -->
13883
14239
  <xsl:call-template name="setNamedDestination"/>
13884
14240
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
14241
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
13885
14242
  <fo:list-item>
13886
14243
  <fo:list-item-label end-indent="label-end()">
13887
14244
  <fo:block>
@@ -13905,12 +14262,17 @@
13905
14262
 
13906
14263
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13907
14264
 
14265
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
14266
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
14267
+
13908
14268
  <xsl:template name="insertListItem_Bibitem">
13909
14269
  <xsl:choose>
13910
14270
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
13911
14271
  <xsl:otherwise>
13912
14272
  <xsl:call-template name="setNamedDestination"/>
13913
14273
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
14274
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
14275
+
13914
14276
  <fo:list-item-label end-indent="label-end()">
13915
14277
  <fo:block role="SKIP">
13916
14278
  <fo:inline role="SKIP">
@@ -13921,16 +14283,18 @@
13921
14283
  </fo:block>
13922
14284
  </fo:list-item-label>
13923
14285
  <fo:list-item-body start-indent="body-start()">
13924
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
14286
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
14287
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
13925
14288
  <xsl:call-template name="processBibitem">
13926
14289
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13927
14290
  </xsl:call-template>
13928
14291
  </fo:block>
14292
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13929
14293
  </fo:list-item-body>
13930
14294
  </fo:list-item>
13931
14295
  </xsl:otherwise>
13932
14296
  </xsl:choose>
13933
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
14297
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
13934
14298
  <xsl:with-param name="skip">false</xsl:with-param>
13935
14299
  </xsl:apply-templates>
13936
14300
  </xsl:template>
@@ -13946,25 +14310,16 @@
13946
14310
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
13947
14311
  </xsl:apply-templates>
13948
14312
  <xsl:apply-templates select="mn:formattedref"/>
14313
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13949
14314
  <!-- end bibitem processing -->
13950
-
13951
- <xsl:call-template name="processBibliographyNote"/>
13952
14315
  </xsl:template> <!-- processBibitem (bibitem) -->
13953
14316
 
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> -->
14317
+ <xsl:template name="processBibitemFollowingNotes">
14318
+ <!-- current context is bibitem element -->
14319
+ <xsl:variable name="bibitem_id" select="@id"/>
14320
+ <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
14321
  <xsl:call-template name="note"/>
13967
- </xsl:if>
14322
+ </xsl:for-each>
13968
14323
  </xsl:template>
13969
14324
 
13970
14325
  <xsl:template match="mn:title" mode="title">
@@ -14168,14 +14523,20 @@
14168
14523
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14169
14524
  <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
14170
14525
  <xsl:attribute name="margin-left">-18mm</xsl:attribute>
14171
- </xsl:attribute-set>
14526
+ </xsl:attribute-set> <!-- indexsect-title-style -->
14527
+
14528
+ <xsl:template name="refine_indexsect-title-style">
14529
+ </xsl:template>
14172
14530
 
14173
14531
  <xsl:attribute-set name="indexsect-clause-title-style">
14174
14532
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
14175
14533
  <xsl:attribute name="font-size">10pt</xsl:attribute>
14176
14534
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14177
14535
  <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
14178
- </xsl:attribute-set>
14536
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
14537
+
14538
+ <xsl:template name="refine_indexsect-clause-title-style">
14539
+ </xsl:template>
14179
14540
  <!-- End Index section styles -->
14180
14541
 
14181
14542
  <!-- =================== -->
@@ -14369,6 +14730,7 @@
14369
14730
 
14370
14731
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
14371
14732
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
14733
+ <xsl:call-template name="refine_indexsect-title-style"/>
14372
14734
  <!-- Index -->
14373
14735
  <xsl:apply-templates/>
14374
14736
  </fo:block>
@@ -14377,6 +14739,7 @@
14377
14739
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
14378
14740
  <!-- Letter A, B, C, ... -->
14379
14741
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
14742
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
14380
14743
  <xsl:apply-templates/>
14381
14744
  </fo:block>
14382
14745
  </xsl:template>
@@ -14609,12 +14972,18 @@
14609
14972
  <xsl:attribute-set name="toc-leader-style">
14610
14973
  </xsl:attribute-set> <!-- END: toc-leader-style -->
14611
14974
 
14975
+ <xsl:template name="refine_toc-leader-style">
14976
+ </xsl:template>
14977
+
14612
14978
  <xsl:attribute-set name="toc-pagenumber-style">
14613
14979
  <xsl:attribute name="font-family">Arial</xsl:attribute>
14614
14980
  <xsl:attribute name="font-weight">bold</xsl:attribute>
14615
14981
  <xsl:attribute name="font-size">10pt</xsl:attribute>
14616
14982
  </xsl:attribute-set>
14617
14983
 
14984
+ <xsl:template name="refine_toc-pagenumber-style">
14985
+ </xsl:template>
14986
+
14618
14987
  <!-- List of Figures, Tables -->
14619
14988
  <xsl:attribute-set name="toc-listof-title-style">
14620
14989
  <xsl:attribute name="font-family">Arial</xsl:attribute>
@@ -14630,12 +14999,18 @@
14630
14999
  <xsl:attribute-set name="toc-listof-item-block-style">
14631
15000
  </xsl:attribute-set>
14632
15001
 
15002
+ <xsl:template name="refine_toc-listof-item-block-style">
15003
+ </xsl:template>
15004
+
14633
15005
  <xsl:attribute-set name="toc-listof-item-style">
14634
15006
  <xsl:attribute name="role">TOCI</xsl:attribute>
14635
15007
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
14636
15008
  <xsl:attribute name="margin-left">8mm</xsl:attribute>
14637
15009
  </xsl:attribute-set>
14638
15010
 
15011
+ <xsl:template name="refine_toc-listof-item-style">
15012
+ </xsl:template>
15013
+
14639
15014
  <xsl:template name="processPrefaceSectionsDefault_Contents">
14640
15015
  <xsl:variable name="nodes_preface_">
14641
15016
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -15758,23 +16133,55 @@
15758
16133
  <!-- Ruby text (CJK languages) rendering -->
15759
16134
  <!-- ===================================== -->
15760
16135
  <!-- ===================================== -->
16136
+
16137
+ <xsl:attribute-set name="ruby-style">
16138
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
16139
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
16140
+ </xsl:attribute-set>
16141
+
16142
+ <xsl:template name="refine_ruby-style">
16143
+ <xsl:if test="not(ancestor::mn:ruby)">
16144
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
16145
+ </xsl:if>
16146
+ <xsl:variable name="rt_text" select="mn:rt"/>
16147
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
16148
+ <!-- Example: width="2em" -->
16149
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
16150
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
16151
+ <xsl:variable name="text_width">
16152
+ <xsl:choose>
16153
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
16154
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
16155
+ </xsl:choose>
16156
+ </xsl:variable>
16157
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
16158
+ </xsl:template> <!-- refine_ruby-style -->
16159
+
16160
+ <xsl:attribute-set name="rb-style">
16161
+ <xsl:attribute name="line-height">1em</xsl:attribute>
16162
+ <xsl:attribute name="text-align">center</xsl:attribute>
16163
+ </xsl:attribute-set>
16164
+
16165
+ <xsl:template name="refine_rb-style">
16166
+ </xsl:template>
16167
+
16168
+ <xsl:attribute-set name="rt-style">
16169
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
16170
+ <xsl:attribute name="text-align">center</xsl:attribute>
16171
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
16172
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
16173
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
16174
+ </xsl:attribute-set>
16175
+
16176
+ <xsl:template name="refine_rt-style">
16177
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
16178
+ <xsl:attribute name="space-before">0em</xsl:attribute>
16179
+ </xsl:if>
16180
+ </xsl:template>
16181
+
15761
16182
  <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>
16183
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
16184
+ <xsl:call-template name="refine_ruby-style"/>
15778
16185
 
15779
16186
  <xsl:choose>
15780
16187
  <xsl:when test="ancestor::mn:ruby">
@@ -15792,17 +16199,14 @@
15792
16199
  </xsl:template>
15793
16200
 
15794
16201
  <xsl:template match="mn:rb">
15795
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
16202
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
15796
16203
  </xsl:template>
15797
16204
 
15798
16205
  <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>
16206
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
16207
+ <xsl:call-template name="refine_rt-style"/>
15803
16208
  <xsl:apply-templates/>
15804
16209
  </fo:block>
15805
-
15806
16210
  </xsl:template>
15807
16211
 
15808
16212
  <!-- ===================================== -->
@@ -15811,6 +16215,18 @@
15811
16215
  <!-- ===================================== -->
15812
16216
  <!-- ===================================== -->
15813
16217
 
16218
+ <xsl:attribute-set name="annex-title-style">
16219
+ </xsl:attribute-set>
16220
+
16221
+ <xsl:template name="refine_annex-title-style">
16222
+ </xsl:template>
16223
+
16224
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
16225
+ </xsl:attribute-set>
16226
+
16227
+ <xsl:template name="refine_p-zzSTDTitle1-style">
16228
+ </xsl:template>
16229
+
15814
16230
  <xsl:template name="processPrefaceSectionsDefault">
15815
16231
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
15816
16232
  <xsl:sort select="@displayorder" data-type="number"/>