metanorma-iso 3.1.3 → 3.1.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.
@@ -7658,11 +7658,17 @@
7658
7658
  <xsl:attribute-set name="license-statement-style">
7659
7659
  </xsl:attribute-set> <!-- license-statement-style -->
7660
7660
 
7661
+ <xsl:template name="refine_license-statement-style">
7662
+ </xsl:template>
7663
+
7661
7664
  <xsl:attribute-set name="license-statement-title-style">
7662
7665
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7663
7666
  <xsl:attribute name="text-align">center</xsl:attribute>
7664
7667
  </xsl:attribute-set> <!-- license-statement-title-style -->
7665
7668
 
7669
+ <xsl:template name="refine_license-statement-title-style">
7670
+ </xsl:template>
7671
+
7666
7672
  <xsl:attribute-set name="license-statement-p-style">
7667
7673
  <xsl:attribute name="margin-left">1.5mm</xsl:attribute>
7668
7674
  <xsl:attribute name="margin-right">1.5mm</xsl:attribute>
@@ -7675,23 +7681,47 @@
7675
7681
  <xsl:attribute-set name="legal-statement-style">
7676
7682
  </xsl:attribute-set> <!-- legal-statement-style -->
7677
7683
 
7684
+ <xsl:template name="refine_legal-statement-style">
7685
+ </xsl:template>
7686
+
7678
7687
  <xsl:attribute-set name="legal-statement-title-style">
7679
7688
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7680
7689
  </xsl:attribute-set> <!-- legal-statement-title-style -->
7681
7690
 
7691
+ <xsl:template name="refine_legal-statement-title-style">
7692
+ </xsl:template>
7693
+
7682
7694
  <xsl:attribute-set name="legal-statement-p-style">
7683
7695
  </xsl:attribute-set> <!-- legal-statement-p-style -->
7684
7696
 
7697
+ <xsl:template name="refine_legal-statement-p-style">
7698
+ <xsl:if test="@align">
7699
+ <xsl:attribute name="text-align">
7700
+ <xsl:value-of select="@align"/>
7701
+ </xsl:attribute>
7702
+ </xsl:if>
7703
+ </xsl:template>
7704
+
7685
7705
  <xsl:attribute-set name="feedback-statement-style">
7686
7706
  </xsl:attribute-set> <!-- feedback-statement-style -->
7687
7707
 
7708
+ <xsl:template name="refine_feedback-statement-style">
7709
+ </xsl:template>
7710
+
7688
7711
  <xsl:attribute-set name="feedback-statement-title-style">
7689
7712
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7690
7713
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
7691
7714
 
7715
+ <xsl:template name="refine_feedback-statement-title-style">
7716
+
7717
+ </xsl:template>
7718
+
7692
7719
  <xsl:attribute-set name="feedback-statement-p-style">
7693
7720
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
7694
7721
 
7722
+ <xsl:template name="refine_feedback-statement-p-style">
7723
+ </xsl:template>
7724
+
7695
7725
  <!-- End boilerplate sections styles -->
7696
7726
 
7697
7727
  <!-- ================================= -->
@@ -7717,6 +7747,7 @@
7717
7747
 
7718
7748
  <xsl:template match="mn:license-statement">
7719
7749
  <fo:block xsl:use-attribute-sets="license-statement-style">
7750
+ <xsl:call-template name="refine_license-statement-style"/>
7720
7751
  <xsl:apply-templates/>
7721
7752
  </fo:block>
7722
7753
  </xsl:template> <!-- license-statement -->
@@ -7726,6 +7757,7 @@
7726
7757
  <xsl:call-template name="getLevel"/>
7727
7758
  </xsl:variable>
7728
7759
  <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
7760
+ <xsl:call-template name="refine_license-statement-title-style"/>
7729
7761
  <xsl:apply-templates/>
7730
7762
  </fo:block>
7731
7763
 
@@ -7746,6 +7778,7 @@
7746
7778
  <xsl:template match="mn:legal-statement">
7747
7779
  <xsl:param name="isLegacy">false</xsl:param>
7748
7780
  <fo:block xsl:use-attribute-sets="legal-statement-style">
7781
+ <xsl:call-template name="refine_legal-statement-style"/>
7749
7782
  <xsl:apply-templates/>
7750
7783
  </fo:block>
7751
7784
  </xsl:template> <!-- legal-statement -->
@@ -7919,6 +7952,27 @@
7919
7952
  <xsl:attribute-set name="sourcecode-container-style">
7920
7953
  </xsl:attribute-set>
7921
7954
 
7955
+ <xsl:template name="refine_sourcecode-container-style">
7956
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
7957
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7958
+ </xsl:if>
7959
+
7960
+ <xsl:if test="ancestor::mn:example">
7961
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7962
+ </xsl:if>
7963
+
7964
+ <xsl:copy-of select="@id"/>
7965
+
7966
+ <xsl:if test="parent::mn:note">
7967
+ <xsl:attribute name="margin-left">
7968
+ <xsl:choose>
7969
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
7970
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7971
+ </xsl:choose>
7972
+ </xsl:attribute>
7973
+ </xsl:if>
7974
+ </xsl:template>
7975
+
7922
7976
  <xsl:attribute-set name="sourcecode-style">
7923
7977
  <xsl:attribute name="white-space">pre</xsl:attribute>
7924
7978
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -7938,6 +7992,9 @@
7938
7992
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
7939
7993
  </xsl:attribute-set> <!-- sourcecode-name-style -->
7940
7994
 
7995
+ <xsl:template name="refine_sourcecode-name-style">
7996
+ </xsl:template>
7997
+
7941
7998
  <xsl:template name="add-zero-spaces-equal">
7942
7999
  <xsl:param name="text" select="."/>
7943
8000
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -8025,24 +8082,8 @@
8025
8082
  <xsl:otherwise>
8026
8083
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
8027
8084
 
8028
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
8029
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
8030
- </xsl:if>
8031
-
8032
- <xsl:if test="ancestor::mn:example">
8033
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
8034
- </xsl:if>
8035
-
8036
- <xsl:copy-of select="@id"/>
8085
+ <xsl:call-template name="refine_sourcecode-container-style"/>
8037
8086
 
8038
- <xsl:if test="parent::mn:note">
8039
- <xsl:attribute name="margin-left">
8040
- <xsl:choose>
8041
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
8042
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
8043
- </xsl:choose>
8044
- </xsl:attribute>
8045
- </xsl:if>
8046
8087
  <fo:block-container margin-left="0mm" role="SKIP">
8047
8088
 
8048
8089
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -8369,6 +8410,7 @@
8369
8410
  <xsl:template match="mn:sourcecode/mn:fmt-name">
8370
8411
  <xsl:if test="normalize-space() != ''">
8371
8412
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
8413
+ <xsl:call-template name="refine_sourcecode-name-style"/>
8372
8414
  <xsl:apply-templates/>
8373
8415
  </fo:block>
8374
8416
  </xsl:if>
@@ -8416,12 +8458,31 @@
8416
8458
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
8417
8459
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
8418
8460
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
8419
- </xsl:attribute-set>
8461
+ </xsl:attribute-set> <!-- pre-style -->
8462
+
8463
+ <xsl:template name="refine_pre-style">
8464
+ </xsl:template>
8420
8465
 
8421
8466
  <xsl:attribute-set name="tt-style">
8422
8467
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
8423
8468
  </xsl:attribute-set>
8424
8469
 
8470
+ <xsl:template name="refine_tt-style">
8471
+ <xsl:variable name="_font-size">9 <!-- inherit -->
8472
+ </xsl:variable>
8473
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8474
+ <xsl:if test="$font-size != ''">
8475
+ <xsl:attribute name="font-size">
8476
+ <xsl:choose>
8477
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
8478
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
8479
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
8480
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
8481
+ </xsl:choose>
8482
+ </xsl:attribute>
8483
+ </xsl:if>
8484
+ </xsl:template>
8485
+
8425
8486
  <xsl:variable name="color-added-text">
8426
8487
  <xsl:text>rgb(0, 255, 0)</xsl:text>
8427
8488
  </xsl:variable>
@@ -8434,9 +8495,14 @@
8434
8495
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
8435
8496
  </xsl:attribute-set>
8436
8497
 
8498
+ <xsl:template name="refine_add-style">
8499
+ </xsl:template>
8500
+
8437
8501
  <xsl:variable name="add-style">
8438
- <add-style xsl:use-attribute-sets="add-style"/>
8439
- </xsl:variable>
8502
+ <add-style xsl:use-attribute-sets="add-style">
8503
+ <xsl:call-template name="refine_add-style"/>
8504
+ </add-style>
8505
+ </xsl:variable>
8440
8506
  <xsl:template name="append_add-style">
8441
8507
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
8442
8508
  </xsl:template>
@@ -8449,27 +8515,83 @@
8449
8515
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8450
8516
  </xsl:attribute-set>
8451
8517
 
8452
- <xsl:template match="mn:br">
8453
- <xsl:value-of select="$linebreak"/>
8518
+ <xsl:template name="refine_del-style">
8454
8519
  </xsl:template>
8455
8520
 
8456
- <xsl:template match="mn:em">
8457
- <fo:inline font-style="italic">
8458
- <xsl:call-template name="refine_italic_style"/>
8459
- <xsl:apply-templates/>
8460
- </fo:inline>
8461
- </xsl:template>
8521
+ <xsl:attribute-set name="strong-style">
8522
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
8523
+ </xsl:attribute-set>
8524
+
8525
+ <xsl:template name="refine_strong_style">
8526
+ <xsl:if test="ancestor::*[local-name() = 'item']">
8527
+ <xsl:attribute name="role">SKIP</xsl:attribute>
8528
+ </xsl:if>
8529
+ <xsl:if test="ancestor::*['preferred']">
8530
+ <xsl:attribute name="role">SKIP</xsl:attribute>
8531
+ </xsl:if>
8532
+ </xsl:template> <!-- refine_strong_style -->
8462
8533
 
8463
- <xsl:template name="refine_italic_style">
8534
+ <xsl:attribute-set name="em-style">
8535
+ <xsl:attribute name="font-style">italic</xsl:attribute>
8536
+ </xsl:attribute-set>
8537
+
8538
+ <xsl:template name="refine_em_style">
8464
8539
  <xsl:if test="ancestor::*[local-name() = 'item']">
8465
8540
  <xsl:attribute name="role">SKIP</xsl:attribute>
8466
8541
  </xsl:if>
8542
+ </xsl:template> <!-- refine_em_style -->
8543
+
8544
+ <xsl:attribute-set name="sup-style">
8545
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8546
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
8547
+ </xsl:attribute-set>
8548
+
8549
+ <xsl:template name="refine_sup-style">
8550
+ </xsl:template>
8551
+
8552
+ <xsl:attribute-set name="sub-style">
8553
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8554
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
8555
+ </xsl:attribute-set>
8556
+
8557
+ <xsl:template name="refine_sub-style">
8558
+ </xsl:template>
8559
+
8560
+ <xsl:attribute-set name="underline-style">
8561
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
8562
+ </xsl:attribute-set>
8563
+
8564
+ <xsl:template name="refine_underline-style">
8565
+ </xsl:template>
8566
+
8567
+ <xsl:attribute-set name="hi-style">
8568
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
8569
+ </xsl:attribute-set>
8570
+
8571
+ <xsl:template name="refine_hi-style">
8572
+ </xsl:template>
8573
+
8574
+ <xsl:attribute-set name="strike-style">
8575
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8576
+ </xsl:attribute-set>
8577
+
8578
+ <xsl:template name="refine_strike-style">
8579
+ </xsl:template>
8580
+
8581
+ <xsl:template match="mn:br">
8582
+ <xsl:value-of select="$linebreak"/>
8583
+ </xsl:template>
8584
+
8585
+ <xsl:template match="mn:em">
8586
+ <fo:inline xsl:use-attribute-sets="em-style">
8587
+ <xsl:call-template name="refine_em_style"/>
8588
+ <xsl:apply-templates/>
8589
+ </fo:inline>
8467
8590
  </xsl:template>
8468
8591
 
8469
8592
  <xsl:template match="mn:strong | *[local-name()='b']">
8470
8593
  <xsl:param name="split_keep-within-line"/>
8471
- <fo:inline font-weight="bold">
8472
-
8594
+ <fo:inline xsl:use-attribute-sets="strong-style">
8473
8595
  <xsl:call-template name="refine_strong_style"/>
8474
8596
 
8475
8597
  <xsl:apply-templates>
@@ -8478,47 +8600,27 @@
8478
8600
  </fo:inline>
8479
8601
  </xsl:template>
8480
8602
 
8481
- <xsl:template name="refine_strong_style">
8482
- <xsl:if test="ancestor::*[local-name() = 'item']">
8483
- <xsl:attribute name="role">SKIP</xsl:attribute>
8484
- </xsl:if>
8485
- <xsl:if test="ancestor::*['preferred']">
8486
- <xsl:attribute name="role">SKIP</xsl:attribute>
8487
- </xsl:if>
8488
- </xsl:template>
8489
-
8490
8603
  <xsl:template match="*[local-name()='padding']">
8491
8604
  <fo:inline padding-right="{@value}"> </fo:inline>
8492
8605
  </xsl:template>
8493
8606
 
8494
8607
  <xsl:template match="mn:sup">
8495
- <fo:inline font-size="80%" vertical-align="super">
8608
+ <fo:inline xsl:use-attribute-sets="sup-style">
8609
+ <xsl:call-template name="refine_sup-style"/>
8496
8610
  <xsl:apply-templates/>
8497
8611
  </fo:inline>
8498
8612
  </xsl:template>
8499
8613
 
8500
8614
  <xsl:template match="mn:sub">
8501
- <fo:inline font-size="80%" vertical-align="sub">
8615
+ <fo:inline xsl:use-attribute-sets="sub-style">
8616
+ <xsl:call-template name="refine_sub-style"/>
8502
8617
  <xsl:apply-templates/>
8503
8618
  </fo:inline>
8504
8619
  </xsl:template>
8505
8620
 
8506
8621
  <xsl:template match="mn:tt">
8507
8622
  <fo:inline xsl:use-attribute-sets="tt-style">
8508
-
8509
- <xsl:variable name="_font-size">9 <!-- inherit -->
8510
- </xsl:variable>
8511
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8512
- <xsl:if test="$font-size != ''">
8513
- <xsl:attribute name="font-size">
8514
- <xsl:choose>
8515
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
8516
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
8517
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
8518
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
8519
- </xsl:choose>
8520
- </xsl:attribute>
8521
- </xsl:if>
8623
+ <xsl:call-template name="refine_tt-style"/>
8522
8624
  <xsl:apply-templates/>
8523
8625
  </fo:inline>
8524
8626
  </xsl:template> <!-- tt -->
@@ -8537,7 +8639,8 @@
8537
8639
  </xsl:template>
8538
8640
 
8539
8641
  <xsl:template match="mn:underline">
8540
- <fo:inline text-decoration="underline">
8642
+ <fo:inline xsl:use-attribute-sets="underline-style">
8643
+ <xsl:call-template name="refine_underline-style"/>
8541
8644
  <xsl:apply-templates/>
8542
8645
  </fo:inline>
8543
8646
  </xsl:template>
@@ -8695,6 +8798,7 @@
8695
8798
 
8696
8799
  <xsl:template match="mn:del">
8697
8800
  <fo:inline xsl:use-attribute-sets="del-style">
8801
+ <xsl:call-template name="refine_del-style"/>
8698
8802
  <xsl:apply-templates/>
8699
8803
  </fo:inline>
8700
8804
  </xsl:template>
@@ -8704,7 +8808,8 @@
8704
8808
 
8705
8809
  <!-- highlight text -->
8706
8810
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
8707
- <fo:inline background-color="yellow">
8811
+ <fo:inline xsl:use-attribute-sets="hi-style">
8812
+ <xsl:call-template name="refine_hi-style"/>
8708
8813
  <xsl:apply-templates/>
8709
8814
  </fo:inline>
8710
8815
  </xsl:template>
@@ -8796,7 +8901,8 @@
8796
8901
  </xsl:template>
8797
8902
 
8798
8903
  <xsl:template match="mn:strike">
8799
- <fo:inline text-decoration="line-through">
8904
+ <fo:inline xsl:use-attribute-sets="strike-style">
8905
+ <xsl:call-template name="refine_strike-style"/>
8800
8906
  <xsl:apply-templates/>
8801
8907
  </fo:inline>
8802
8908
  </xsl:template>
@@ -8876,6 +8982,7 @@
8876
8982
 
8877
8983
  <xsl:template match="mn:pre" name="pre">
8878
8984
  <fo:block xsl:use-attribute-sets="pre-style">
8985
+ <xsl:call-template name="refine_pre-style"/>
8879
8986
  <xsl:copy-of select="@id"/>
8880
8987
  <xsl:choose>
8881
8988
 
@@ -8906,17 +9013,29 @@
8906
9013
  <xsl:attribute-set name="permission-style">
8907
9014
  </xsl:attribute-set>
8908
9015
 
9016
+ <xsl:template name="refine_permission-style">
9017
+ </xsl:template>
9018
+
8909
9019
  <xsl:attribute-set name="permission-name-style">
8910
9020
  </xsl:attribute-set>
8911
9021
 
9022
+ <xsl:template name="refine_permission-name-style">
9023
+ </xsl:template>
9024
+
8912
9025
  <xsl:attribute-set name="permission-label-style">
8913
9026
  </xsl:attribute-set>
8914
9027
 
9028
+ <xsl:template name="refine_permission-label-style">
9029
+ </xsl:template>
9030
+
8915
9031
  <xsl:attribute-set name="requirement-style">
8916
9032
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
8917
9033
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
8918
9034
  </xsl:attribute-set>
8919
9035
 
9036
+ <xsl:template name="refine_requirement-style">
9037
+ </xsl:template>
9038
+
8920
9039
  <xsl:attribute-set name="requirement-name-style">
8921
9040
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8922
9041
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -8924,9 +9043,15 @@
8924
9043
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
8925
9044
  </xsl:attribute-set>
8926
9045
 
9046
+ <xsl:template name="refine_requirement-name-style">
9047
+ </xsl:template>
9048
+
8927
9049
  <xsl:attribute-set name="requirement-label-style">
8928
9050
  </xsl:attribute-set>
8929
9051
 
9052
+ <xsl:template name="refine_requirement-label-style">
9053
+ </xsl:template>
9054
+
8930
9055
  <xsl:attribute-set name="subject-style">
8931
9056
  </xsl:attribute-set>
8932
9057
 
@@ -8954,18 +9079,28 @@
8954
9079
  <xsl:attribute-set name="recommendation-style">
8955
9080
  </xsl:attribute-set>
8956
9081
 
9082
+ <xsl:template name="refine_recommendation-style">
9083
+ </xsl:template>
9084
+
8957
9085
  <xsl:attribute-set name="recommendation-name-style">
8958
9086
  </xsl:attribute-set>
8959
9087
 
9088
+ <xsl:template name="refine_recommendation-name-style">
9089
+ </xsl:template>
9090
+
8960
9091
  <xsl:attribute-set name="recommendation-label-style">
8961
9092
  </xsl:attribute-set>
8962
9093
 
9094
+ <xsl:template name="refine_recommendation-label-style">
9095
+ </xsl:template>
9096
+
8963
9097
  <!-- ========== -->
8964
9098
  <!-- permission -->
8965
9099
  <!-- ========== -->
8966
9100
  <xsl:template match="mn:permission">
8967
9101
  <xsl:call-template name="setNamedDestination"/>
8968
9102
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
9103
+ <xsl:call-template name="refine_permission-style"/>
8969
9104
  <xsl:apply-templates select="mn:fmt-name"/>
8970
9105
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8971
9106
  </fo:block>
@@ -8974,6 +9109,7 @@
8974
9109
  <xsl:template match="mn:permission/mn:fmt-name">
8975
9110
  <xsl:if test="normalize-space() != ''">
8976
9111
  <fo:block xsl:use-attribute-sets="permission-name-style">
9112
+ <xsl:call-template name="refine_permission-name-style"/>
8977
9113
  <xsl:apply-templates/>
8978
9114
  </fo:block>
8979
9115
  </xsl:if>
@@ -8981,6 +9117,7 @@
8981
9117
 
8982
9118
  <xsl:template match="mn:permission/mn:label">
8983
9119
  <fo:block xsl:use-attribute-sets="permission-label-style">
9120
+ <xsl:call-template name="refine_permission-label-style"/>
8984
9121
  <xsl:apply-templates/>
8985
9122
  </fo:block>
8986
9123
  </xsl:template>
@@ -8993,6 +9130,7 @@
8993
9130
  <xsl:template match="mn:requirement">
8994
9131
  <xsl:call-template name="setNamedDestination"/>
8995
9132
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
9133
+ <xsl:call-template name="refine_requirement-style"/>
8996
9134
  <xsl:apply-templates select="mn:fmt-name"/>
8997
9135
  <xsl:apply-templates select="mn:label"/>
8998
9136
  <xsl:apply-templates select="@obligation"/>
@@ -9005,6 +9143,7 @@
9005
9143
  <xsl:if test="normalize-space() != ''">
9006
9144
 
9007
9145
  <fo:block xsl:use-attribute-sets="requirement-name-style">
9146
+ <xsl:call-template name="refine_requirement-name-style"/>
9008
9147
  <xsl:apply-templates/>
9009
9148
  <xsl:text>:</xsl:text>
9010
9149
  </fo:block>
@@ -9013,6 +9152,7 @@
9013
9152
 
9014
9153
  <xsl:template match="mn:requirement/mn:label">
9015
9154
  <fo:block xsl:use-attribute-sets="requirement-label-style">
9155
+ <xsl:call-template name="refine_requirement-label-style"/>
9016
9156
  <xsl:apply-templates/>
9017
9157
  </fo:block>
9018
9158
  </xsl:template>
@@ -9038,6 +9178,7 @@
9038
9178
  <xsl:template match="mn:recommendation">
9039
9179
  <xsl:call-template name="setNamedDestination"/>
9040
9180
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
9181
+ <xsl:call-template name="refine_recommendation-style"/>
9041
9182
  <xsl:apply-templates select="mn:fmt-name"/>
9042
9183
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9043
9184
  </fo:block>
@@ -9047,6 +9188,7 @@
9047
9188
  <xsl:if test="normalize-space() != ''">
9048
9189
 
9049
9190
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
9191
+ <xsl:call-template name="refine_recommendation-name-style"/>
9050
9192
  <xsl:apply-templates/>
9051
9193
  </fo:block>
9052
9194
  </xsl:if>
@@ -9054,6 +9196,7 @@
9054
9196
 
9055
9197
  <xsl:template match="mn:recommendation/mn:label">
9056
9198
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
9199
+ <xsl:call-template name="refine_recommendation-label-style"/>
9057
9200
  <xsl:apply-templates/>
9058
9201
  </fo:block>
9059
9202
  </xsl:template>
@@ -9235,36 +9378,69 @@
9235
9378
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
9236
9379
  </xsl:attribute-set> <!-- term-style -->
9237
9380
 
9381
+ <xsl:template name="refine_term-style">
9382
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
9383
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
9384
+ </xsl:if>
9385
+ </xsl:template>
9386
+
9238
9387
  <xsl:attribute-set name="term-name-style">
9239
9388
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
9240
9389
  <xsl:attribute name="font-weight">bold</xsl:attribute>
9241
9390
  </xsl:attribute-set> <!-- term-name-style -->
9242
9391
 
9243
- <xsl:attribute-set name="preferred-block-style">
9392
+ <xsl:template name="refine_term-name-style">
9393
+ </xsl:template>
9394
+
9395
+ <xsl:attribute-set name="preferred-block-style">
9244
9396
  <xsl:attribute name="line-height">1.1</xsl:attribute>
9245
9397
  </xsl:attribute-set> <!-- preferred-block-style -->
9246
9398
 
9399
+ <xsl:template name="refine_preferred-block-style">
9400
+ </xsl:template>
9401
+
9247
9402
  <xsl:attribute-set name="preferred-term-style">
9248
9403
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
9249
9404
  <xsl:attribute name="font-weight">bold</xsl:attribute>
9250
9405
  </xsl:attribute-set> <!-- preferred-term-style -->
9251
9406
 
9407
+ <xsl:template name="refine_preferred-term-style">
9408
+ <xsl:if test="mn:strong">
9409
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
9410
+ </xsl:if>
9411
+ </xsl:template>
9412
+
9252
9413
  <xsl:attribute-set name="domain-style">
9253
9414
  </xsl:attribute-set> <!-- domain-style -->
9254
9415
 
9416
+ <xsl:template name="refine_domain-style">
9417
+ </xsl:template>
9418
+
9255
9419
  <xsl:attribute-set name="admitted-style">
9256
9420
  </xsl:attribute-set> <!-- admitted-style -->
9257
9421
 
9422
+ <xsl:template name="refine_admitted-style">
9423
+ </xsl:template>
9424
+
9258
9425
  <xsl:attribute-set name="deprecates-style">
9259
9426
  </xsl:attribute-set> <!-- deprecates-style -->
9260
9427
 
9428
+ <xsl:template name="refine_deprecates-style">
9429
+ </xsl:template>
9430
+
9261
9431
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
9262
9432
  </xsl:attribute-set>
9263
9433
 
9434
+ <xsl:template name="refine_related-block-style">
9435
+ </xsl:template>
9436
+
9264
9437
  <xsl:attribute-set name="definition-style">
9265
9438
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
9266
9439
  </xsl:attribute-set> <!-- definition-style -->
9267
9440
 
9441
+ <xsl:template name="refine_definition-style">
9442
+ </xsl:template>
9443
+
9268
9444
  <xsl:attribute-set name="termsource-style">
9269
9445
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
9270
9446
  </xsl:attribute-set> <!-- termsource-style -->
@@ -9275,9 +9451,15 @@
9275
9451
  <xsl:attribute-set name="termsource-text-style">
9276
9452
  </xsl:attribute-set> <!-- termsource-text-style -->
9277
9453
 
9454
+ <xsl:template name="refine_termsource-text-style">
9455
+ </xsl:template>
9456
+
9278
9457
  <xsl:attribute-set name="origin-style">
9279
9458
  </xsl:attribute-set> <!-- origin-style -->
9280
9459
 
9460
+ <xsl:template name="refine_origin-style">
9461
+ </xsl:template>
9462
+
9281
9463
  <!-- ====== -->
9282
9464
  <!-- term -->
9283
9465
  <!-- ====== -->
@@ -9293,10 +9475,8 @@
9293
9475
  <xsl:template match="mn:term">
9294
9476
  <xsl:call-template name="setNamedDestination"/>
9295
9477
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
9478
+ <xsl:call-template name="refine_term-style"/>
9296
9479
 
9297
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
9298
- <xsl:attribute name="space-before">12pt</xsl:attribute>
9299
- </xsl:if>
9300
9480
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9301
9481
  </fo:block>
9302
9482
  </xsl:template>
@@ -9372,6 +9552,7 @@
9372
9552
  <!-- text SOURCE: -->
9373
9553
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
9374
9554
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
9555
+ <xsl:call-template name="refine_termsource-text-style"/>
9375
9556
  <xsl:value-of select="."/>
9376
9557
  </fo:inline>
9377
9558
  </xsl:template>
@@ -9384,6 +9565,7 @@
9384
9565
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
9385
9566
  </xsl:if>
9386
9567
  <fo:inline xsl:use-attribute-sets="origin-style">
9568
+ <xsl:call-template name="refine_origin-style"/>
9387
9569
  <xsl:apply-templates/>
9388
9570
  </fo:inline>
9389
9571
  </fo:basic-link>
@@ -9433,9 +9615,12 @@
9433
9615
  </xsl:variable>
9434
9616
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
9435
9617
 
9618
+ <xsl:call-template name="refine_preferred-block-style"/>
9619
+
9436
9620
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
9437
9621
 
9438
9622
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9623
+ <xsl:call-template name="refine_term-name-style"/>
9439
9624
 
9440
9625
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
9441
9626
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -9446,7 +9631,7 @@
9446
9631
  </xsl:if>
9447
9632
 
9448
9633
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9449
- <xsl:call-template name="setStyle_preferred"/>
9634
+ <xsl:call-template name="refine_preferred-term-style"/>
9450
9635
 
9451
9636
  <xsl:apply-templates/>
9452
9637
  </fo:block>
@@ -9467,22 +9652,18 @@
9467
9652
 
9468
9653
  <xsl:template match="mn:fmt-admitted">
9469
9654
  <fo:block xsl:use-attribute-sets="admitted-style">
9655
+ <xsl:call-template name="refine_admitted-style"/>
9470
9656
  <xsl:apply-templates/>
9471
9657
  </fo:block>
9472
9658
  </xsl:template>
9473
9659
 
9474
9660
  <xsl:template match="mn:fmt-deprecates">
9475
9661
  <fo:block xsl:use-attribute-sets="deprecates-style">
9662
+ <xsl:call-template name="refine_deprecates-style"/>
9476
9663
  <xsl:apply-templates/>
9477
9664
  </fo:block>
9478
9665
  </xsl:template>
9479
9666
 
9480
- <xsl:template name="setStyle_preferred">
9481
- <xsl:if test="mn:strong">
9482
- <xsl:attribute name="font-weight">normal</xsl:attribute>
9483
- </xsl:if>
9484
- </xsl:template>
9485
-
9486
9667
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
9487
9668
  <!-- in metanorma xml preferred terms delimited by semicolons -->
9488
9669
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -9492,6 +9673,7 @@
9492
9673
 
9493
9674
  <xsl:template match="mn:fmt-related">
9494
9675
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
9676
+ <xsl:call-template name="refine_related-block-style"/>
9495
9677
  <xsl:apply-templates/>
9496
9678
  </fo:block>
9497
9679
  </xsl:template>
@@ -9506,6 +9688,7 @@
9506
9688
  <!-- ========== -->
9507
9689
  <xsl:template match="mn:fmt-definition">
9508
9690
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9691
+ <xsl:call-template name="refine_definition-style"/>
9509
9692
  <xsl:apply-templates/>
9510
9693
  </fo:block>
9511
9694
  </xsl:template>
@@ -9568,6 +9751,9 @@
9568
9751
  <xsl:attribute name="margin-right">7mm</xsl:attribute>
9569
9752
  </xsl:attribute-set> <!-- example-body-style -->
9570
9753
 
9754
+ <xsl:template name="refine_example-body-style">
9755
+ </xsl:template>
9756
+
9571
9757
  <xsl:attribute-set name="example-name-style">
9572
9758
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
9573
9759
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -9622,6 +9808,8 @@
9622
9808
  <xsl:when test="contains($element, 'block')">
9623
9809
  <fo:block xsl:use-attribute-sets="example-p-style">
9624
9810
 
9811
+ <xsl:call-template name="refine_example-p-style"/>
9812
+
9625
9813
  <xsl:apply-templates/>
9626
9814
  </fo:block>
9627
9815
  </xsl:when>
@@ -9678,6 +9866,7 @@
9678
9866
  </fo:block>
9679
9867
 
9680
9868
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9869
+ <xsl:call-template name="refine_example-body-style"/>
9681
9870
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9682
9871
  <xsl:variable name="example_body">
9683
9872
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -9740,6 +9929,7 @@
9740
9929
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
9741
9930
  <!-- display further elements in blocks -->
9742
9931
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9932
+ <xsl:call-template name="refine_example-body-style"/>
9743
9933
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9744
9934
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
9745
9935
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -10078,6 +10268,9 @@
10078
10268
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
10079
10269
  </xsl:attribute-set> <!-- table-fn-number-style -->
10080
10270
 
10271
+ <xsl:template name="refine_table-fn-number-style">
10272
+ </xsl:template>
10273
+
10081
10274
  <xsl:attribute-set name="table-fmt-fn-label-style">
10082
10275
  <xsl:attribute name="font-size">80%</xsl:attribute>
10083
10276
  <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
@@ -10090,30 +10283,12 @@
10090
10283
  </xsl:if>
10091
10284
  </xsl:template>
10092
10285
 
10093
- <xsl:attribute-set name="fn-container-body-style">
10094
- <xsl:attribute name="text-indent">0</xsl:attribute>
10095
- <xsl:attribute name="start-indent">0</xsl:attribute>
10096
- </xsl:attribute-set>
10097
-
10098
10286
  <xsl:attribute-set name="table-fn-body-style">
10099
10287
  </xsl:attribute-set>
10100
10288
 
10101
- <xsl:attribute-set name="figure-fn-number-style">
10102
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
10103
- </xsl:attribute-set> <!-- figure-fn-number-style -->
10104
-
10105
- <xsl:attribute-set name="figure-fmt-fn-label-style">
10106
- <xsl:attribute name="font-size">80%</xsl:attribute>
10107
- <xsl:attribute name="vertical-align">super</xsl:attribute>
10108
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
10109
-
10110
- <xsl:template name="refine_figure-fmt-fn-label-style">
10289
+ <xsl:template name="refine_table-fn-body-style">
10111
10290
  </xsl:template>
10112
10291
 
10113
- <xsl:attribute-set name="figure-fn-body-style">
10114
- <xsl:attribute name="text-align">justify</xsl:attribute>
10115
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10116
- </xsl:attribute-set>
10117
10292
  <!-- ========================== -->
10118
10293
  <!-- END Table styles -->
10119
10294
  <!-- ========================== -->
@@ -11459,6 +11634,7 @@
11459
11634
  </xsl:apply-templates>
11460
11635
 
11461
11636
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
11637
+ <xsl:call-template name="refine_table-fn-body-style"/>
11462
11638
  <!-- <xsl:copy-of select="./node()"/> -->
11463
11639
  <xsl:apply-templates/>
11464
11640
  </fo:inline>
@@ -11477,6 +11653,7 @@
11477
11653
  <xsl:param name="process">false</xsl:param>
11478
11654
  <xsl:if test="$process = 'true'">
11479
11655
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
11656
+ <xsl:call-template name="refine_table-fn-number-style"/>
11480
11657
 
11481
11658
  <!-- tab is padding-right -->
11482
11659
  <xsl:apply-templates select=".//mn:tab">
@@ -12348,9 +12525,18 @@
12348
12525
  <xsl:attribute-set name="dl-block-style">
12349
12526
  </xsl:attribute-set>
12350
12527
 
12528
+ <xsl:template name="refine_dl-block-style">
12529
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
12530
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
12531
+ </xsl:if>
12532
+ </xsl:template>
12533
+
12351
12534
  <xsl:attribute-set name="dt-row-style">
12352
12535
  </xsl:attribute-set>
12353
12536
 
12537
+ <xsl:template name="refine_dt-row-style">
12538
+ </xsl:template>
12539
+
12354
12540
  <xsl:attribute-set name="dt-cell-style">
12355
12541
  </xsl:attribute-set>
12356
12542
 
@@ -12374,6 +12560,9 @@
12374
12560
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12375
12561
  </xsl:attribute-set> <!-- dl-name-style -->
12376
12562
 
12563
+ <xsl:template name="refine_dl-name-style">
12564
+ </xsl:template>
12565
+
12377
12566
  <xsl:attribute-set name="dd-cell-style">
12378
12567
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
12379
12568
  </xsl:attribute-set>
@@ -12412,9 +12601,7 @@
12412
12601
  <!-- <dl><xsl:copy-of select="."/></dl> -->
12413
12602
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
12414
12603
 
12415
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
12416
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
12417
- </xsl:if>
12604
+ <xsl:call-template name="refine_dl-block-style"/>
12418
12605
 
12419
12606
  <xsl:call-template name="setBlockSpanAll"/>
12420
12607
  <xsl:if test="not(ancestor::mn:quote)">
@@ -12720,6 +12907,8 @@
12720
12907
  <xsl:if test="$process = 'true'">
12721
12908
  <fo:block xsl:use-attribute-sets="dl-name-style">
12722
12909
 
12910
+ <xsl:call-template name="refine_dl-name-style"/>
12911
+
12723
12912
  <xsl:apply-templates/>
12724
12913
  </fo:block>
12725
12914
  </xsl:if>
@@ -12908,6 +13097,8 @@
12908
13097
  <xsl:param name="split_keep-within-line"/>
12909
13098
 
12910
13099
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
13100
+ <xsl:call-template name="refine_dt-row-style"/>
13101
+
12911
13102
  <xsl:call-template name="insert_dt_cell">
12912
13103
  <xsl:with-param name="key_iso" select="$key_iso"/>
12913
13104
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -13121,18 +13312,25 @@
13121
13312
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13122
13313
  </xsl:attribute-set>
13123
13314
 
13315
+ <xsl:template name="refine_appendix-style">
13316
+ </xsl:template>
13317
+
13124
13318
  <xsl:attribute-set name="appendix-example-style">
13125
13319
  <xsl:attribute name="font-size">10pt</xsl:attribute>
13126
13320
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
13127
13321
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
13128
13322
  </xsl:attribute-set>
13129
13323
 
13324
+ <xsl:template name="refine_appendix-example-style">
13325
+ </xsl:template>
13326
+
13130
13327
  <!-- ======================== -->
13131
13328
  <!-- Appendix processing -->
13132
13329
  <!-- ======================== -->
13133
13330
  <xsl:template match="mn:appendix">
13134
13331
  <xsl:call-template name="setNamedDestination"/>
13135
13332
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
13333
+ <xsl:call-template name="refine_appendix-style"/>
13136
13334
  <xsl:apply-templates select="mn:fmt-title"/>
13137
13335
  </fo:block>
13138
13336
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -13151,6 +13349,7 @@
13151
13349
  <xsl:template match="mn:appendix//mn:example" priority="2">
13152
13350
  <xsl:call-template name="setNamedDestination"/>
13153
13351
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
13352
+ <xsl:call-template name="refine_appendix-example-style"/>
13154
13353
  <xsl:apply-templates select="mn:fmt-name"/>
13155
13354
  </fo:block>
13156
13355
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -13159,7 +13358,16 @@
13159
13358
  <xsl:attribute-set name="xref-style">
13160
13359
  <xsl:attribute name="color">blue</xsl:attribute>
13161
13360
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
13162
- </xsl:attribute-set>
13361
+ </xsl:attribute-set> <!-- xref-style -->
13362
+
13363
+ <xsl:template name="refine_xref-style">
13364
+ <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])">
13365
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
13366
+ </xsl:if>
13367
+ <xsl:if test="parent::mn:add">
13368
+ <xsl:call-template name="append_add-style"/>
13369
+ </xsl:if>
13370
+ </xsl:template> <!-- refine_xref-style -->
13163
13371
 
13164
13372
  <xsl:template match="mn:fmt-xref">
13165
13373
  <xsl:call-template name="insert_basic_link">
@@ -13168,12 +13376,8 @@
13168
13376
  <xsl:call-template name="getAltText"/>
13169
13377
  </xsl:variable>
13170
13378
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
13171
- <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])">
13172
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
13173
- </xsl:if>
13174
- <xsl:if test="parent::mn:add">
13175
- <xsl:call-template name="append_add-style"/>
13176
- </xsl:if>
13379
+ <xsl:call-template name="refine_xref-style"/>
13380
+
13177
13381
  <xsl:apply-templates/>
13178
13382
  </fo:basic-link>
13179
13383
  </xsl:with-param>
@@ -13286,7 +13490,7 @@
13286
13490
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
13287
13491
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13288
13492
  <xsl:attribute name="text-align">justify</xsl:attribute>
13289
- </xsl:attribute-set>
13493
+ </xsl:attribute-set> <!-- note-style -->
13290
13494
 
13291
13495
  <xsl:template name="refine_note-style">
13292
13496
  <xsl:if test="$layoutVersion = '1951'">
@@ -13311,14 +13515,20 @@
13311
13515
  <xsl:if test="$doctype = 'amendment' and parent::mn:quote">
13312
13516
  <xsl:attribute name="font-size">inherit</xsl:attribute>
13313
13517
  </xsl:if>
13314
- </xsl:template>
13518
+ <xsl:if test="ancestor::mn:bibliography">
13519
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13520
+ <xsl:if test="following-sibling::*[1][self::mn:bibitem or self::mn:note]">
13521
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
13522
+ </xsl:if>
13523
+ </xsl:if>
13524
+ </xsl:template> <!-- refine_note-style -->
13315
13525
 
13316
13526
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
13317
13527
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
13318
13528
 
13319
13529
  <xsl:attribute-set name="note-name-style">
13320
13530
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
13321
- </xsl:attribute-set>
13531
+ </xsl:attribute-set> <!-- note-name-style -->
13322
13532
 
13323
13533
  <xsl:template name="refine_note-name-style">
13324
13534
  <xsl:variable name="note_name" select="mn:fmt-name"/>
@@ -13351,14 +13561,20 @@
13351
13561
  <xsl:attribute-set name="note-p-style">
13352
13562
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
13353
13563
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13354
- </xsl:attribute-set>
13564
+ </xsl:attribute-set> <!-- note-p-style -->
13565
+
13566
+ <xsl:template name="refine_note-p-style">
13567
+ <xsl:if test="ancestor::mn:bibliography">
13568
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13569
+ </xsl:if>
13570
+ </xsl:template>
13355
13571
 
13356
13572
  <xsl:attribute-set name="termnote-style">
13357
13573
  <xsl:attribute name="font-size">10pt</xsl:attribute>
13358
13574
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
13359
13575
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
13360
13576
  <xsl:attribute name="text-align">justify</xsl:attribute>
13361
- </xsl:attribute-set>
13577
+ </xsl:attribute-set> <!-- termnote-style -->
13362
13578
 
13363
13579
  <xsl:template name="refine_termnote-style">
13364
13580
  <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
@@ -13370,7 +13586,7 @@
13370
13586
  </xsl:template> <!-- refine_termnote-style -->
13371
13587
 
13372
13588
  <xsl:attribute-set name="termnote-name-style">
13373
- </xsl:attribute-set>
13589
+ </xsl:attribute-set> <!-- termnote-name-style -->
13374
13590
 
13375
13591
  <xsl:template name="refine_termnote-name-style">
13376
13592
  </xsl:template>
@@ -13378,6 +13594,9 @@
13378
13594
  <xsl:attribute-set name="termnote-p-style">
13379
13595
  </xsl:attribute-set>
13380
13596
 
13597
+ <xsl:template name="refine_termnote-p-style">
13598
+ </xsl:template>
13599
+
13381
13600
  <!-- ====== -->
13382
13601
  <!-- note -->
13383
13602
  <!-- termnote -->
@@ -13460,11 +13679,13 @@
13460
13679
  <xsl:choose>
13461
13680
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
13462
13681
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
13682
+ <xsl:call-template name="refine_note-p-style"/>
13463
13683
  <xsl:apply-templates/>
13464
13684
  </fo:inline>
13465
13685
  </xsl:when>
13466
13686
  <xsl:otherwise>
13467
13687
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
13688
+ <xsl:call-template name="refine_note-p-style"/>
13468
13689
  <xsl:apply-templates/>
13469
13690
  </fo:block>
13470
13691
  </xsl:otherwise>
@@ -13559,11 +13780,13 @@
13559
13780
  <xsl:choose>
13560
13781
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
13561
13782
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
13783
+ <xsl:call-template name="refine_termnote-p-style"/>
13562
13784
  <xsl:apply-templates/>
13563
13785
  </fo:inline>
13564
13786
  </xsl:when>
13565
13787
  <xsl:otherwise>
13566
13788
  <fo:block xsl:use-attribute-sets="termnote-p-style">
13789
+ <xsl:call-template name="refine_termnote-p-style"/>
13567
13790
  <xsl:apply-templates/>
13568
13791
  </fo:block>
13569
13792
  </xsl:otherwise>
@@ -13577,7 +13800,7 @@
13577
13800
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
13578
13801
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
13579
13802
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
13580
- </xsl:attribute-set>
13803
+ </xsl:attribute-set> <!-- quote-style -->
13581
13804
 
13582
13805
  <xsl:template name="refine_quote-style">
13583
13806
  <xsl:if test="$doctype = 'amendment' and (mn:note or mn:termnote)">
@@ -13590,6 +13813,9 @@
13590
13813
  <xsl:attribute name="text-align">right</xsl:attribute>
13591
13814
  </xsl:attribute-set>
13592
13815
 
13816
+ <xsl:template name="refine_quote-source-style">
13817
+ </xsl:template>
13818
+
13593
13819
  <!-- ====== -->
13594
13820
  <!-- quote -->
13595
13821
  <!-- source -->
@@ -13618,6 +13844,7 @@
13618
13844
  </fo:block-container>
13619
13845
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
13620
13846
  <fo:block xsl:use-attribute-sets="quote-source-style">
13847
+ <xsl:call-template name="refine_quote-source-style"/>
13621
13848
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
13622
13849
  <xsl:apply-templates select="mn:author"/>
13623
13850
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -13690,6 +13917,9 @@
13690
13917
  <xsl:attribute-set name="figure-style">
13691
13918
  </xsl:attribute-set>
13692
13919
 
13920
+ <xsl:template name="refine_figure-style">
13921
+ </xsl:template>
13922
+
13693
13923
  <xsl:attribute-set name="figure-name-style">
13694
13924
  <xsl:attribute name="role">Caption</xsl:attribute>
13695
13925
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -13697,7 +13927,7 @@
13697
13927
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
13698
13928
  <xsl:attribute name="space-after">12pt</xsl:attribute>
13699
13929
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
13700
- </xsl:attribute-set>
13930
+ </xsl:attribute-set> <!-- figure-name-style -->
13701
13931
 
13702
13932
  <xsl:template name="refine_figure-name-style">
13703
13933
  </xsl:template> <!-- refine_figure-name-style -->
@@ -13705,7 +13935,7 @@
13705
13935
  <xsl:attribute-set name="image-style">
13706
13936
  <xsl:attribute name="role">SKIP</xsl:attribute>
13707
13937
  <xsl:attribute name="text-align">center</xsl:attribute>
13708
- </xsl:attribute-set>
13938
+ </xsl:attribute-set> <!-- image-style -->
13709
13939
 
13710
13940
  <xsl:template name="refine_image-style">
13711
13941
  </xsl:template>
@@ -13715,14 +13945,51 @@
13715
13945
  <xsl:attribute name="content-height">100%</xsl:attribute>
13716
13946
  <xsl:attribute name="scaling">uniform</xsl:attribute>
13717
13947
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
13718
- </xsl:attribute-set>
13948
+ </xsl:attribute-set> <!-- image-graphic-style -->
13949
+
13950
+ <xsl:template name="refine_image-graphic-style">
13951
+ </xsl:template>
13719
13952
 
13720
13953
  <xsl:attribute-set name="figure-source-style">
13721
13954
  </xsl:attribute-set>
13722
13955
 
13956
+ <xsl:template name="refine_figure-source-style">
13957
+ </xsl:template>
13958
+
13723
13959
  <xsl:attribute-set name="figure-pseudocode-p-style">
13724
13960
  </xsl:attribute-set>
13725
13961
 
13962
+ <xsl:template name="refine_figure-pseudocode-p-style">
13963
+ </xsl:template>
13964
+
13965
+ <xsl:attribute-set name="figure-fn-number-style">
13966
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
13967
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
13968
+
13969
+ <xsl:template name="refine_figure-fn-number-style">
13970
+ </xsl:template>
13971
+
13972
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
13973
+ <xsl:attribute name="font-size">80%</xsl:attribute>
13974
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
13975
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
13976
+
13977
+ <xsl:template name="refine_figure-fmt-fn-label-style">
13978
+ </xsl:template>
13979
+
13980
+ <xsl:attribute-set name="figure-fn-body-style">
13981
+ <xsl:attribute name="text-align">justify</xsl:attribute>
13982
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13983
+ </xsl:attribute-set>
13984
+
13985
+ <xsl:template name="refine_figure-fn-body-style">
13986
+ <xsl:variable name="key_iso">true
13987
+ </xsl:variable>
13988
+ <xsl:if test="normalize-space($key_iso) = 'true'">
13989
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
13990
+ </xsl:if>
13991
+ </xsl:template>
13992
+
13726
13993
  <!-- ============================ -->
13727
13994
  <!-- figure's footnotes rendering -->
13728
13995
  <!-- ============================ -->
@@ -13835,9 +14102,8 @@
13835
14102
  </fo:table-cell>
13836
14103
  <fo:table-cell>
13837
14104
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
13838
- <xsl:if test="normalize-space($key_iso) = 'true'">
13839
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
13840
- </xsl:if>
14105
+ <xsl:call-template name="refine_figure-fn-body-style"/>
14106
+
13841
14107
  <!-- <xsl:copy-of select="./node()"/> -->
13842
14108
  <xsl:apply-templates/>
13843
14109
  </fo:block>
@@ -13855,6 +14121,7 @@
13855
14121
  <xsl:param name="process">false</xsl:param>
13856
14122
  <xsl:if test="$process = 'true'">
13857
14123
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
14124
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13858
14125
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
13859
14126
 
13860
14127
  <!-- tab is padding-right -->
@@ -13892,6 +14159,7 @@
13892
14159
  <xsl:attribute name="font-size">10pt</xsl:attribute>
13893
14160
  </xsl:if>
13894
14161
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
14162
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13895
14163
  <!-- <xsl:value-of select="@reference"/> -->
13896
14164
  <xsl:apply-templates/>
13897
14165
  </fo:inline>
@@ -13939,6 +14207,8 @@
13939
14207
 
13940
14208
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
13941
14209
 
14210
+ <xsl:call-template name="refine_figure-style"/>
14211
+
13942
14212
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
13943
14213
  <xsl:call-template name="setIDforNamedDestination"/>
13944
14214
  </xsl:for-each>
@@ -13982,6 +14252,7 @@
13982
14252
 
13983
14253
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
13984
14254
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
14255
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
13985
14256
  <xsl:apply-templates/>
13986
14257
  </fo:block>
13987
14258
  </xsl:template>
@@ -14111,6 +14382,8 @@
14111
14382
  </xsl:variable>
14112
14383
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
14113
14384
 
14385
+ <xsl:call-template name="refine_image-graphic-style"/>
14386
+
14114
14387
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
14115
14388
  <xsl:variable name="scale">
14116
14389
  <xsl:call-template name="getImageScale">
@@ -14810,6 +15083,9 @@
14810
15083
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
14811
15084
  </xsl:attribute-set> <!-- formula-style -->
14812
15085
 
15086
+ <xsl:template name="refine_formula-style">
15087
+ </xsl:template>
15088
+
14813
15089
  <xsl:attribute-set name="formula-stem-block-style">
14814
15090
  <xsl:attribute name="text-align">center</xsl:attribute>
14815
15091
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -14881,6 +15157,8 @@
14881
15157
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
14882
15158
  <fo:block xsl:use-attribute-sets="formula-style">
14883
15159
 
15160
+ <xsl:call-template name="refine_formula-style"/>
15161
+
14884
15162
  <fo:table table-layout="fixed" width="100%">
14885
15163
  <fo:table-column column-width="95%"/>
14886
15164
  <fo:table-column column-width="5%"/>
@@ -15311,6 +15589,9 @@
15311
15589
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15312
15590
  </xsl:attribute-set> <!-- list-name-style -->
15313
15591
 
15592
+ <xsl:template name="refine_list-name-style">
15593
+ </xsl:template>
15594
+
15314
15595
  <xsl:attribute-set name="list-item-style">
15315
15596
  </xsl:attribute-set>
15316
15597
 
@@ -15651,6 +15932,7 @@
15651
15932
  <xsl:param name="process">false</xsl:param>
15652
15933
  <xsl:if test="$process = 'true'">
15653
15934
  <fo:block xsl:use-attribute-sets="list-name-style">
15935
+ <xsl:call-template name="refine_list-name-style"/>
15654
15936
  <xsl:apply-templates/>
15655
15937
  </fo:block>
15656
15938
  </xsl:if>
@@ -15711,29 +15993,50 @@
15711
15993
  <!-- END Lists processing -->
15712
15994
  <!-- ===================================== -->
15713
15995
 
15996
+ <xsl:attribute-set name="footnote-separator-leader-style">
15997
+ </xsl:attribute-set>
15998
+
15999
+ <xsl:template name="refine_footnote-separator-leader-style">
16000
+ </xsl:template>
16001
+
16002
+ <xsl:attribute-set name="fn-container-body-style">
16003
+ <xsl:attribute name="text-indent">0</xsl:attribute>
16004
+ <xsl:attribute name="start-indent">0</xsl:attribute>
16005
+ </xsl:attribute-set>
16006
+
16007
+ <xsl:template name="refine_fn-container-body-style">
16008
+ </xsl:template>
16009
+
15714
16010
  <xsl:attribute-set name="fn-reference-style">
15715
16011
  <xsl:attribute name="font-size">80%</xsl:attribute>
15716
16012
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15717
-
15718
- </xsl:attribute-set>
16013
+ </xsl:attribute-set> <!-- fn-reference-style -->
15719
16014
 
15720
16015
  <xsl:template name="refine_fn-reference-style">
15721
16016
  <xsl:if test="ancestor::*[local-name()='table']">
15722
16017
  <xsl:attribute name="font-weight">normal</xsl:attribute>
15723
16018
  <xsl:attribute name="baseline-shift">15%</xsl:attribute>
15724
16019
  </xsl:if>
16020
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16021
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
15725
16022
  </xsl:template> <!-- refine_fn-reference-style -->
15726
16023
 
15727
16024
  <xsl:attribute-set name="fn-style">
15728
16025
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15729
16026
  </xsl:attribute-set>
15730
16027
 
16028
+ <xsl:template name="refine_fn-style">
16029
+ </xsl:template>
16030
+
15731
16031
  <xsl:attribute-set name="fn-num-style">
15732
16032
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15733
16033
  <xsl:attribute name="font-size">80%</xsl:attribute>
15734
16034
  <!--<xsl:attribute name="vertical-align">super</xsl:attribute> -->
15735
16035
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
15736
- </xsl:attribute-set>
16036
+ </xsl:attribute-set> <!-- fn-num-style -->
16037
+
16038
+ <xsl:template name="refine_fn-num-style">
16039
+ </xsl:template>
15737
16040
 
15738
16041
  <xsl:attribute-set name="fn-body-style">
15739
16042
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -15742,7 +16045,7 @@
15742
16045
  <xsl:attribute name="start-indent">0</xsl:attribute>
15743
16046
  <xsl:attribute name="font-size">10pt</xsl:attribute>
15744
16047
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15745
- </xsl:attribute-set>
16048
+ </xsl:attribute-set> <!-- fn-body-style" -->
15746
16049
 
15747
16050
  <xsl:template name="refine_fn-body-style">
15748
16051
  <xsl:if test="$layoutVersion = '1951'">
@@ -15826,10 +16129,12 @@
15826
16129
  <xsl:choose>
15827
16130
  <xsl:when test="ancestor::mn:bibitem">
15828
16131
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
16132
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
15829
16133
  </fn_styles>
15830
16134
  </xsl:when>
15831
16135
  <xsl:otherwise>
15832
16136
  <fn_styles xsl:use-attribute-sets="fn-num-style">
16137
+ <xsl:call-template name="refine_fn-num-style"/>
15833
16138
  </fn_styles>
15834
16139
  </xsl:otherwise>
15835
16140
  </xsl:choose>
@@ -15839,13 +16144,16 @@
15839
16144
  <xsl:copy-of select="."/>
15840
16145
  </xsl:for-each>
15841
16146
 
15842
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
16147
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16148
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
15843
16149
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
15844
- </xsl:if>
16150
+ </xsl:if> -->
15845
16151
  <xsl:if test="$layoutVersion = '2024'">
15846
16152
  <xsl:attribute name="font-size">70%</xsl:attribute>
15847
16153
  </xsl:if>
15848
16154
 
16155
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
16156
+
15849
16157
  <xsl:call-template name="insert_basic_link">
15850
16158
  <xsl:with-param name="element">
15851
16159
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
@@ -15867,10 +16175,12 @@
15867
16175
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
15868
16176
 
15869
16177
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
16178
+ <xsl:call-template name="refine_fn-style"/>
15870
16179
  <xsl:copy-of select="$footnote_inline"/>
15871
16180
  <fo:footnote-body role="Note">
15872
16181
 
15873
16182
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
16183
+ <xsl:call-template name="refine_fn-container-body-style"/>
15874
16184
 
15875
16185
  <xsl:variable name="fn_block">
15876
16186
  <xsl:call-template name="refine_fn-body-style"/>
@@ -15969,17 +16279,30 @@
15969
16279
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15970
16280
  </xsl:attribute-set> <!-- admonition-style -->
15971
16281
 
16282
+ <xsl:template name="refine_admonition-style">
16283
+ </xsl:template>
16284
+
15972
16285
  <xsl:attribute-set name="admonition-container-style">
15973
16286
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
15974
16287
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
15975
16288
  </xsl:attribute-set> <!-- admonition-container-style -->
15976
16289
 
16290
+ <xsl:template name="refine_admonition-container-style">
16291
+ </xsl:template>
16292
+
15977
16293
  <xsl:attribute-set name="admonition-name-style">
15978
16294
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
15979
16295
  </xsl:attribute-set> <!-- admonition-name-style -->
15980
16296
 
16297
+ <xsl:template name="refine_admonition-name-style">
16298
+ </xsl:template>
16299
+
15981
16300
  <xsl:attribute-set name="admonition-p-style">
15982
16301
  </xsl:attribute-set> <!-- admonition-p-style -->
16302
+
16303
+ <xsl:template name="refine_admonition-p-style">
16304
+ </xsl:template>
16305
+
15983
16306
  <!-- end admonition -->
15984
16307
 
15985
16308
  <!-- ================ -->
@@ -15988,6 +16311,8 @@
15988
16311
  <xsl:template match="mn:admonition">
15989
16312
  <fo:block xsl:use-attribute-sets="admonition-style">
15990
16313
 
16314
+ <xsl:call-template name="refine_admonition-style"/>
16315
+
15991
16316
  <xsl:call-template name="setBlockSpanAll"/>
15992
16317
 
15993
16318
  <xsl:if test="@type = 'editorial'">
@@ -16064,11 +16389,24 @@
16064
16389
  <!-- END Admonition -->
16065
16390
  <!-- ================ -->
16066
16391
 
16392
+ <xsl:attribute-set name="references-non-normative-title-style">
16393
+ </xsl:attribute-set>
16394
+
16395
+ <xsl:template name="refine_references-non-normative-title-style">
16396
+
16397
+ </xsl:template>
16398
+
16067
16399
  <!-- bibitem in Normative References (references/@normative="true") -->
16068
16400
  <xsl:attribute-set name="bibitem-normative-style">
16069
16401
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16070
16402
  </xsl:attribute-set> <!-- bibitem-normative-style -->
16071
16403
 
16404
+ <xsl:template name="refine_bibitem-normative-style">
16405
+ <xsl:if test="$layoutVersion = '2024'">
16406
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
16407
+ </xsl:if>
16408
+ </xsl:template>
16409
+
16072
16410
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
16073
16411
  <xsl:attribute-set name="bibitem-normative-list-style">
16074
16412
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -16076,9 +16414,15 @@
16076
16414
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16077
16415
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
16078
16416
 
16417
+ <xsl:template name="refine_bibitem-normative-list-style">
16418
+ </xsl:template>
16419
+
16079
16420
  <xsl:attribute-set name="bibitem-non-normative-style">
16080
16421
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
16081
16422
 
16423
+ <xsl:template name="refine_bibitem-non-normative-style">
16424
+ </xsl:template>
16425
+
16082
16426
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
16083
16427
  <xsl:attribute-set name="bibitem-non-normative-list-style">
16084
16428
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -16086,18 +16430,33 @@
16086
16430
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16087
16431
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
16088
16432
 
16433
+ <xsl:template name="refine_bibitem-non-normative-list-style">
16434
+ </xsl:template>
16435
+
16089
16436
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
16090
16437
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
16091
16438
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16092
16439
  </xsl:attribute-set>
16093
16440
 
16441
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
16442
+ <xsl:if test="$layoutVersion = '2024'">
16443
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
16444
+ </xsl:if>
16445
+ </xsl:template>
16446
+
16094
16447
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
16095
16448
  <xsl:attribute-set name="bibitem-normative-list-body-style">
16096
16449
  </xsl:attribute-set>
16097
16450
 
16451
+ <xsl:template name="refine_bibitem-normative-list-body-style">
16452
+ </xsl:template>
16453
+
16098
16454
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
16099
16455
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
16100
16456
 
16457
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
16458
+ </xsl:template>
16459
+
16101
16460
  <!-- footnote reference number for bibitem, in the text -->
16102
16461
  <xsl:attribute-set name="bibitem-note-fn-style">
16103
16462
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -16106,6 +16465,9 @@
16106
16465
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
16107
16466
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
16108
16467
 
16468
+ <xsl:template name="refine_bibitem-note-fn-style">
16469
+ </xsl:template>
16470
+
16109
16471
  <!-- footnote number on the page bottom -->
16110
16472
  <xsl:attribute-set name="bibitem-note-fn-number-style">
16111
16473
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -16124,6 +16486,9 @@
16124
16486
  <xsl:attribute-set name="references-non-normative-style">
16125
16487
  </xsl:attribute-set> <!-- references-non-normative-style -->
16126
16488
 
16489
+ <xsl:template name="refine_references-non-normative-style">
16490
+ </xsl:template>
16491
+
16127
16492
  <!-- ======================= -->
16128
16493
  <!-- Bibliography rendering -->
16129
16494
  <!-- ======================= -->
@@ -16170,6 +16535,7 @@
16170
16535
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
16171
16536
 
16172
16537
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
16538
+ <xsl:call-template name="refine_references-non-normative-style"/>
16173
16539
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
16174
16540
  </fo:block>
16175
16541
  </xsl:template> <!-- references -->
@@ -16183,9 +16549,8 @@
16183
16549
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
16184
16550
  <xsl:call-template name="setNamedDestination"/>
16185
16551
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16186
- <xsl:if test="$layoutVersion = '2024'">
16187
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
16188
- </xsl:if>
16552
+ <xsl:call-template name="refine_bibitem-normative-style"/>
16553
+
16189
16554
  <xsl:call-template name="processBibitem"/>
16190
16555
  </fo:block>
16191
16556
 
@@ -16197,13 +16562,14 @@
16197
16562
  </xsl:variable>
16198
16563
  <xsl:if test="normalize-space($list_items) != ''">
16199
16564
  <fo:list-block xsl:use-attribute-sets="bibitem-non-normative-list-style">
16565
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
16200
16566
  <xsl:copy-of select="$list_items"/>
16201
16567
  </fo:list-block>
16202
16568
  </xsl:if>
16203
16569
  </xsl:template>
16204
16570
 
16205
16571
  <!-- Bibliography (non-normative references) -->
16206
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
16572
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
16207
16573
  <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 -->
16208
16574
  <xsl:choose>
16209
16575
  <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
@@ -16214,15 +16580,17 @@
16214
16580
 
16215
16581
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
16216
16582
 
16583
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
16584
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
16585
+
16217
16586
  <xsl:template name="insertListItem_Bibitem">
16218
16587
  <xsl:choose>
16219
16588
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
16220
16589
  <xsl:otherwise>
16221
16590
  <xsl:call-template name="setNamedDestination"/>
16222
16591
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
16223
- <xsl:if test="$layoutVersion = '2024'">
16224
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
16225
- </xsl:if>
16592
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
16593
+
16226
16594
  <fo:list-item-label end-indent="label-end()">
16227
16595
  <fo:block role="SKIP">
16228
16596
  <fo:inline role="SKIP">
@@ -16233,16 +16601,18 @@
16233
16601
  </fo:block>
16234
16602
  </fo:list-item-label>
16235
16603
  <fo:list-item-body start-indent="body-start()">
16236
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16604
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
16605
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
16237
16606
  <xsl:call-template name="processBibitem">
16238
16607
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
16239
16608
  </xsl:call-template>
16240
16609
  </fo:block>
16610
+ <xsl:call-template name="processBibitemFollowingNotes"/>
16241
16611
  </fo:list-item-body>
16242
16612
  </fo:list-item>
16243
16613
  </xsl:otherwise>
16244
16614
  </xsl:choose>
16245
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
16615
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
16246
16616
  <xsl:with-param name="skip">false</xsl:with-param>
16247
16617
  </xsl:apply-templates>
16248
16618
  </xsl:template>
@@ -16258,25 +16628,19 @@
16258
16628
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
16259
16629
  </xsl:apply-templates>
16260
16630
  <xsl:apply-templates select="mn:formattedref"/>
16261
- <!-- end bibitem processing -->
16631
+ <xsl:if test="ancestor::mn:references[@normative = 'true']">
16632
+ <xsl:call-template name="processBibitemFollowingNotes"/>
16633
+ </xsl:if>
16262
16634
 
16263
- <xsl:call-template name="processBibliographyNote"/>
16635
+ <!-- end bibitem processing -->
16264
16636
  </xsl:template> <!-- processBibitem (bibitem) -->
16265
16637
 
16266
- <xsl:template name="processBibliographyNote">
16267
- <xsl:if test="self::mn:note">
16268
- <xsl:variable name="note_node">
16269
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
16270
- <xsl:copy> <!-- skip @id -->
16271
- <xsl:copy-of select="node()"/>
16272
- </xsl:copy>
16273
- </xsl:element>
16274
- </xsl:variable>
16275
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
16276
- <xsl:call-template name="note"/>
16277
- </xsl:for-each> -->
16638
+ <xsl:template name="processBibitemFollowingNotes">
16639
+ <!-- current context is bibitem element -->
16640
+ <xsl:variable name="bibitem_id" select="@id"/>
16641
+ <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]]">
16278
16642
  <xsl:call-template name="note"/>
16279
- </xsl:if>
16643
+ </xsl:for-each>
16280
16644
  </xsl:template>
16281
16645
 
16282
16646
  <xsl:template match="mn:title" mode="title">
@@ -16479,14 +16843,20 @@
16479
16843
  <xsl:attribute name="font-size">16pt</xsl:attribute>
16480
16844
  <xsl:attribute name="font-weight">bold</xsl:attribute>
16481
16845
  <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
16482
- </xsl:attribute-set>
16846
+ </xsl:attribute-set> <!-- indexsect-title-style -->
16847
+
16848
+ <xsl:template name="refine_indexsect-title-style">
16849
+ </xsl:template>
16483
16850
 
16484
16851
  <xsl:attribute-set name="indexsect-clause-title-style">
16485
16852
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
16486
16853
  <xsl:attribute name="font-size">10pt</xsl:attribute>
16487
16854
  <xsl:attribute name="font-weight">bold</xsl:attribute>
16488
16855
  <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
16489
- </xsl:attribute-set>
16856
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
16857
+
16858
+ <xsl:template name="refine_indexsect-clause-title-style">
16859
+ </xsl:template>
16490
16860
  <!-- End Index section styles -->
16491
16861
 
16492
16862
  <!-- =================== -->
@@ -16680,6 +17050,7 @@
16680
17050
 
16681
17051
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
16682
17052
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
17053
+ <xsl:call-template name="refine_indexsect-title-style"/>
16683
17054
  <!-- Index -->
16684
17055
  <xsl:apply-templates/>
16685
17056
  </fo:block>
@@ -16688,6 +17059,7 @@
16688
17059
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
16689
17060
  <!-- Letter A, B, C, ... -->
16690
17061
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
17062
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
16691
17063
  <xsl:apply-templates/>
16692
17064
  </fo:block>
16693
17065
  </xsl:template>
@@ -16915,9 +17287,15 @@
16915
17287
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
16916
17288
  </xsl:attribute-set> <!-- END: toc-leader-style -->
16917
17289
 
17290
+ <xsl:template name="refine_toc-leader-style">
17291
+ </xsl:template>
17292
+
16918
17293
  <xsl:attribute-set name="toc-pagenumber-style">
16919
17294
  </xsl:attribute-set>
16920
17295
 
17296
+ <xsl:template name="refine_toc-pagenumber-style">
17297
+ </xsl:template>
17298
+
16921
17299
  <!-- List of Figures, Tables -->
16922
17300
  <xsl:attribute-set name="toc-listof-title-style">
16923
17301
  <xsl:attribute name="role">TOCI</xsl:attribute>
@@ -16931,6 +17309,9 @@
16931
17309
  <xsl:attribute-set name="toc-listof-item-block-style">
16932
17310
  </xsl:attribute-set>
16933
17311
 
17312
+ <xsl:template name="refine_toc-listof-item-block-style">
17313
+ </xsl:template>
17314
+
16934
17315
  <xsl:attribute-set name="toc-listof-item-style">
16935
17316
  <xsl:attribute name="role">TOCI</xsl:attribute>
16936
17317
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -16938,6 +17319,9 @@
16938
17319
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
16939
17320
  </xsl:attribute-set>
16940
17321
 
17322
+ <xsl:template name="refine_toc-listof-item-style">
17323
+ </xsl:template>
17324
+
16941
17325
  <xsl:template name="processPrefaceSectionsDefault_Contents">
16942
17326
  <xsl:variable name="nodes_preface_">
16943
17327
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -18051,23 +18435,55 @@
18051
18435
  <!-- Ruby text (CJK languages) rendering -->
18052
18436
  <!-- ===================================== -->
18053
18437
  <!-- ===================================== -->
18438
+
18439
+ <xsl:attribute-set name="ruby-style">
18440
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
18441
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
18442
+ </xsl:attribute-set>
18443
+
18444
+ <xsl:template name="refine_ruby-style">
18445
+ <xsl:if test="not(ancestor::mn:ruby)">
18446
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
18447
+ </xsl:if>
18448
+ <xsl:variable name="rt_text" select="mn:rt"/>
18449
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
18450
+ <!-- Example: width="2em" -->
18451
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
18452
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
18453
+ <xsl:variable name="text_width">
18454
+ <xsl:choose>
18455
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
18456
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
18457
+ </xsl:choose>
18458
+ </xsl:variable>
18459
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
18460
+ </xsl:template> <!-- refine_ruby-style -->
18461
+
18462
+ <xsl:attribute-set name="rb-style">
18463
+ <xsl:attribute name="line-height">1em</xsl:attribute>
18464
+ <xsl:attribute name="text-align">center</xsl:attribute>
18465
+ </xsl:attribute-set>
18466
+
18467
+ <xsl:template name="refine_rb-style">
18468
+ </xsl:template>
18469
+
18470
+ <xsl:attribute-set name="rt-style">
18471
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
18472
+ <xsl:attribute name="text-align">center</xsl:attribute>
18473
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
18474
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
18475
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
18476
+ </xsl:attribute-set>
18477
+
18478
+ <xsl:template name="refine_rt-style">
18479
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
18480
+ <xsl:attribute name="space-before">0em</xsl:attribute>
18481
+ </xsl:if>
18482
+ </xsl:template>
18483
+
18054
18484
  <xsl:template match="mn:ruby">
18055
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
18056
- <xsl:if test="not(ancestor::mn:ruby)">
18057
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
18058
- </xsl:if>
18059
- <xsl:variable name="rt_text" select="mn:rt"/>
18060
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
18061
- <!-- Example: width="2em" -->
18062
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
18063
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
18064
- <xsl:variable name="text_width">
18065
- <xsl:choose>
18066
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
18067
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
18068
- </xsl:choose>
18069
- </xsl:variable>
18070
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
18485
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
18486
+ <xsl:call-template name="refine_ruby-style"/>
18071
18487
 
18072
18488
  <xsl:choose>
18073
18489
  <xsl:when test="ancestor::mn:ruby">
@@ -18085,17 +18501,14 @@
18085
18501
  </xsl:template>
18086
18502
 
18087
18503
  <xsl:template match="mn:rb">
18088
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
18504
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
18089
18505
  </xsl:template>
18090
18506
 
18091
18507
  <xsl:template match="mn:rt">
18092
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
18093
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
18094
- <xsl:attribute name="space-before">0em</xsl:attribute>
18095
- </xsl:if>
18508
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
18509
+ <xsl:call-template name="refine_rt-style"/>
18096
18510
  <xsl:apply-templates/>
18097
18511
  </fo:block>
18098
-
18099
18512
  </xsl:template>
18100
18513
 
18101
18514
  <!-- ===================================== -->
@@ -18104,6 +18517,18 @@
18104
18517
  <!-- ===================================== -->
18105
18518
  <!-- ===================================== -->
18106
18519
 
18520
+ <xsl:attribute-set name="annex-title-style">
18521
+ </xsl:attribute-set>
18522
+
18523
+ <xsl:template name="refine_annex-title-style">
18524
+ </xsl:template>
18525
+
18526
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
18527
+ </xsl:attribute-set>
18528
+
18529
+ <xsl:template name="refine_p-zzSTDTitle1-style">
18530
+ </xsl:template>
18531
+
18107
18532
  <xsl:template name="processPrefaceSectionsDefault">
18108
18533
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
18109
18534
  <xsl:sort select="@displayorder" data-type="number"/>