metanorma-jis 0.6.3 → 0.6.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.
@@ -7270,10 +7270,16 @@
7270
7270
  <xsl:attribute-set name="license-statement-style">
7271
7271
  </xsl:attribute-set> <!-- license-statement-style -->
7272
7272
 
7273
+ <xsl:template name="refine_license-statement-style">
7274
+ </xsl:template>
7275
+
7273
7276
  <xsl:attribute-set name="license-statement-title-style">
7274
7277
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7275
7278
  </xsl:attribute-set> <!-- license-statement-title-style -->
7276
7279
 
7280
+ <xsl:template name="refine_license-statement-title-style">
7281
+ </xsl:template>
7282
+
7277
7283
  <xsl:attribute-set name="license-statement-p-style">
7278
7284
  </xsl:attribute-set> <!-- license-statement-p-style -->
7279
7285
 
@@ -7284,23 +7290,47 @@
7284
7290
  <xsl:attribute-set name="legal-statement-style">
7285
7291
  </xsl:attribute-set> <!-- legal-statement-style -->
7286
7292
 
7293
+ <xsl:template name="refine_legal-statement-style">
7294
+ </xsl:template>
7295
+
7287
7296
  <xsl:attribute-set name="legal-statement-title-style">
7288
7297
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7289
7298
  </xsl:attribute-set> <!-- legal-statement-title-style -->
7290
7299
 
7300
+ <xsl:template name="refine_legal-statement-title-style">
7301
+ </xsl:template>
7302
+
7291
7303
  <xsl:attribute-set name="legal-statement-p-style">
7292
7304
  </xsl:attribute-set> <!-- legal-statement-p-style -->
7293
7305
 
7306
+ <xsl:template name="refine_legal-statement-p-style">
7307
+ <xsl:if test="@align">
7308
+ <xsl:attribute name="text-align">
7309
+ <xsl:value-of select="@align"/>
7310
+ </xsl:attribute>
7311
+ </xsl:if>
7312
+ </xsl:template>
7313
+
7294
7314
  <xsl:attribute-set name="feedback-statement-style">
7295
7315
  </xsl:attribute-set> <!-- feedback-statement-style -->
7296
7316
 
7317
+ <xsl:template name="refine_feedback-statement-style">
7318
+ </xsl:template>
7319
+
7297
7320
  <xsl:attribute-set name="feedback-statement-title-style">
7298
7321
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7299
7322
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
7300
7323
 
7324
+ <xsl:template name="refine_feedback-statement-title-style">
7325
+
7326
+ </xsl:template>
7327
+
7301
7328
  <xsl:attribute-set name="feedback-statement-p-style">
7302
7329
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
7303
7330
 
7331
+ <xsl:template name="refine_feedback-statement-p-style">
7332
+ </xsl:template>
7333
+
7304
7334
  <!-- End boilerplate sections styles -->
7305
7335
 
7306
7336
  <!-- ================================= -->
@@ -7326,6 +7356,7 @@
7326
7356
 
7327
7357
  <xsl:template match="mn:license-statement">
7328
7358
  <fo:block xsl:use-attribute-sets="license-statement-style">
7359
+ <xsl:call-template name="refine_license-statement-style"/>
7329
7360
  <xsl:apply-templates/>
7330
7361
  </fo:block>
7331
7362
  </xsl:template> <!-- license-statement -->
@@ -7343,6 +7374,7 @@
7343
7374
  <xsl:template match="mn:legal-statement">
7344
7375
  <xsl:param name="isLegacy">false</xsl:param>
7345
7376
  <fo:block xsl:use-attribute-sets="legal-statement-style">
7377
+ <xsl:call-template name="refine_legal-statement-style"/>
7346
7378
  <xsl:apply-templates/>
7347
7379
  </fo:block>
7348
7380
  </xsl:template> <!-- legal-statement -->
@@ -7510,6 +7542,27 @@
7510
7542
  <xsl:attribute-set name="sourcecode-container-style">
7511
7543
  </xsl:attribute-set>
7512
7544
 
7545
+ <xsl:template name="refine_sourcecode-container-style">
7546
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
7547
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7548
+ </xsl:if>
7549
+
7550
+ <xsl:if test="ancestor::mn:example">
7551
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7552
+ </xsl:if>
7553
+
7554
+ <xsl:copy-of select="@id"/>
7555
+
7556
+ <xsl:if test="parent::mn:note">
7557
+ <xsl:attribute name="margin-left">
7558
+ <xsl:choose>
7559
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
7560
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7561
+ </xsl:choose>
7562
+ </xsl:attribute>
7563
+ </xsl:if>
7564
+ </xsl:template>
7565
+
7513
7566
  <xsl:attribute-set name="sourcecode-style">
7514
7567
  <xsl:attribute name="white-space">pre</xsl:attribute>
7515
7568
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -7527,6 +7580,9 @@
7527
7580
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
7528
7581
  </xsl:attribute-set> <!-- sourcecode-name-style -->
7529
7582
 
7583
+ <xsl:template name="refine_sourcecode-name-style">
7584
+ </xsl:template>
7585
+
7530
7586
  <xsl:template name="add-zero-spaces-equal">
7531
7587
  <xsl:param name="text" select="."/>
7532
7588
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -7614,24 +7670,8 @@
7614
7670
  <xsl:otherwise>
7615
7671
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7616
7672
 
7617
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
7618
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
7619
- </xsl:if>
7620
-
7621
- <xsl:if test="ancestor::mn:example">
7622
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
7623
- </xsl:if>
7624
-
7625
- <xsl:copy-of select="@id"/>
7673
+ <xsl:call-template name="refine_sourcecode-container-style"/>
7626
7674
 
7627
- <xsl:if test="parent::mn:note">
7628
- <xsl:attribute name="margin-left">
7629
- <xsl:choose>
7630
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
7631
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7632
- </xsl:choose>
7633
- </xsl:attribute>
7634
- </xsl:if>
7635
7675
  <fo:block-container margin-left="0mm" role="SKIP">
7636
7676
 
7637
7677
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -7958,6 +7998,7 @@
7958
7998
  <xsl:template match="mn:sourcecode/mn:fmt-name">
7959
7999
  <xsl:if test="normalize-space() != ''">
7960
8000
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
8001
+ <xsl:call-template name="refine_sourcecode-name-style"/>
7961
8002
  <xsl:apply-templates/>
7962
8003
  </fo:block>
7963
8004
  </xsl:if>
@@ -8004,11 +8045,30 @@
8004
8045
  <xsl:attribute-set name="pre-style">
8005
8046
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
8006
8047
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
8007
- </xsl:attribute-set>
8048
+ </xsl:attribute-set> <!-- pre-style -->
8049
+
8050
+ <xsl:template name="refine_pre-style">
8051
+ </xsl:template>
8008
8052
 
8009
8053
  <xsl:attribute-set name="tt-style">
8010
8054
  </xsl:attribute-set>
8011
8055
 
8056
+ <xsl:template name="refine_tt-style">
8057
+ <xsl:variable name="_font-size"> <!-- inherit -->
8058
+ </xsl:variable>
8059
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8060
+ <xsl:if test="$font-size != ''">
8061
+ <xsl:attribute name="font-size">
8062
+ <xsl:choose>
8063
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
8064
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
8065
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
8066
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
8067
+ </xsl:choose>
8068
+ </xsl:attribute>
8069
+ </xsl:if>
8070
+ </xsl:template>
8071
+
8012
8072
  <xsl:variable name="color-added-text">
8013
8073
  <xsl:text>rgb(0, 255, 0)</xsl:text>
8014
8074
  </xsl:variable>
@@ -8021,9 +8081,14 @@
8021
8081
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
8022
8082
  </xsl:attribute-set>
8023
8083
 
8084
+ <xsl:template name="refine_add-style">
8085
+ </xsl:template>
8086
+
8024
8087
  <xsl:variable name="add-style">
8025
- <add-style xsl:use-attribute-sets="add-style"/>
8026
- </xsl:variable>
8088
+ <add-style xsl:use-attribute-sets="add-style">
8089
+ <xsl:call-template name="refine_add-style"/>
8090
+ </add-style>
8091
+ </xsl:variable>
8027
8092
  <xsl:template name="append_add-style">
8028
8093
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
8029
8094
  </xsl:template>
@@ -8036,24 +8101,80 @@
8036
8101
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8037
8102
  </xsl:attribute-set>
8038
8103
 
8104
+ <xsl:template name="refine_del-style">
8105
+ </xsl:template>
8106
+
8107
+ <xsl:attribute-set name="strong-style">
8108
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
8109
+ </xsl:attribute-set>
8110
+
8111
+ <xsl:template name="refine_strong_style">
8112
+ <xsl:if test="not($vertical_layout = 'true')">
8113
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8114
+ </xsl:if>
8115
+ <xsl:if test="ancestor::*['preferred']">
8116
+ <xsl:attribute name="role">SKIP</xsl:attribute>
8117
+ </xsl:if>
8118
+ </xsl:template> <!-- refine_strong_style -->
8119
+
8120
+ <xsl:attribute-set name="em-style">
8121
+ <xsl:attribute name="font-style">italic</xsl:attribute>
8122
+ </xsl:attribute-set>
8123
+
8124
+ <xsl:template name="refine_em_style">
8125
+ </xsl:template> <!-- refine_em_style -->
8126
+
8127
+ <xsl:attribute-set name="sup-style">
8128
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8129
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
8130
+ </xsl:attribute-set>
8131
+
8132
+ <xsl:template name="refine_sup-style">
8133
+ </xsl:template>
8134
+
8135
+ <xsl:attribute-set name="sub-style">
8136
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8137
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
8138
+ </xsl:attribute-set>
8139
+
8140
+ <xsl:template name="refine_sub-style">
8141
+ </xsl:template>
8142
+
8143
+ <xsl:attribute-set name="underline-style">
8144
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
8145
+ </xsl:attribute-set>
8146
+
8147
+ <xsl:template name="refine_underline-style">
8148
+ </xsl:template>
8149
+
8150
+ <xsl:attribute-set name="hi-style">
8151
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
8152
+ </xsl:attribute-set>
8153
+
8154
+ <xsl:template name="refine_hi-style">
8155
+ </xsl:template>
8156
+
8157
+ <xsl:attribute-set name="strike-style">
8158
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8159
+ </xsl:attribute-set>
8160
+
8161
+ <xsl:template name="refine_strike-style">
8162
+ </xsl:template>
8163
+
8039
8164
  <xsl:template match="mn:br">
8040
8165
  <xsl:value-of select="$linebreak"/>
8041
8166
  </xsl:template>
8042
8167
 
8043
- <xsl:template match="mn:em">
8044
- <fo:inline font-style="italic">
8045
- <xsl:call-template name="refine_italic_style"/>
8168
+ <xsl:template match="mn:em">
8169
+ <fo:inline xsl:use-attribute-sets="em-style">
8170
+ <xsl:call-template name="refine_em_style"/>
8046
8171
  <xsl:apply-templates/>
8047
8172
  </fo:inline>
8048
8173
  </xsl:template>
8049
8174
 
8050
- <xsl:template name="refine_italic_style">
8051
- </xsl:template>
8052
-
8053
8175
  <xsl:template match="mn:strong | *[local-name()='b']">
8054
8176
  <xsl:param name="split_keep-within-line"/>
8055
- <fo:inline font-weight="bold">
8056
-
8177
+ <fo:inline xsl:use-attribute-sets="strong-style">
8057
8178
  <xsl:call-template name="refine_strong_style"/>
8058
8179
 
8059
8180
  <xsl:apply-templates>
@@ -8062,47 +8183,27 @@
8062
8183
  </fo:inline>
8063
8184
  </xsl:template>
8064
8185
 
8065
- <xsl:template name="refine_strong_style">
8066
- <xsl:if test="not($vertical_layout = 'true')">
8067
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8068
- </xsl:if>
8069
- <xsl:if test="ancestor::*['preferred']">
8070
- <xsl:attribute name="role">SKIP</xsl:attribute>
8071
- </xsl:if>
8072
- </xsl:template>
8073
-
8074
8186
  <xsl:template match="*[local-name()='padding']">
8075
8187
  <fo:inline padding-right="{@value}"> </fo:inline>
8076
8188
  </xsl:template>
8077
8189
 
8078
8190
  <xsl:template match="mn:sup">
8079
- <fo:inline font-size="80%" vertical-align="super">
8191
+ <fo:inline xsl:use-attribute-sets="sup-style">
8192
+ <xsl:call-template name="refine_sup-style"/>
8080
8193
  <xsl:apply-templates/>
8081
8194
  </fo:inline>
8082
8195
  </xsl:template>
8083
8196
 
8084
8197
  <xsl:template match="mn:sub">
8085
- <fo:inline font-size="80%" vertical-align="sub">
8198
+ <fo:inline xsl:use-attribute-sets="sub-style">
8199
+ <xsl:call-template name="refine_sub-style"/>
8086
8200
  <xsl:apply-templates/>
8087
8201
  </fo:inline>
8088
8202
  </xsl:template>
8089
8203
 
8090
8204
  <xsl:template match="mn:tt">
8091
8205
  <fo:inline xsl:use-attribute-sets="tt-style">
8092
-
8093
- <xsl:variable name="_font-size"> <!-- inherit -->
8094
- </xsl:variable>
8095
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8096
- <xsl:if test="$font-size != ''">
8097
- <xsl:attribute name="font-size">
8098
- <xsl:choose>
8099
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
8100
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
8101
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
8102
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
8103
- </xsl:choose>
8104
- </xsl:attribute>
8105
- </xsl:if>
8206
+ <xsl:call-template name="refine_tt-style"/>
8106
8207
  <xsl:apply-templates/>
8107
8208
  </fo:inline>
8108
8209
  </xsl:template> <!-- tt -->
@@ -8121,7 +8222,8 @@
8121
8222
  </xsl:template>
8122
8223
 
8123
8224
  <xsl:template match="mn:underline">
8124
- <fo:inline text-decoration="underline">
8225
+ <fo:inline xsl:use-attribute-sets="underline-style">
8226
+ <xsl:call-template name="refine_underline-style"/>
8125
8227
  <xsl:apply-templates/>
8126
8228
  </fo:inline>
8127
8229
  </xsl:template>
@@ -8279,6 +8381,7 @@
8279
8381
 
8280
8382
  <xsl:template match="mn:del">
8281
8383
  <fo:inline xsl:use-attribute-sets="del-style">
8384
+ <xsl:call-template name="refine_del-style"/>
8282
8385
  <xsl:apply-templates/>
8283
8386
  </fo:inline>
8284
8387
  </xsl:template>
@@ -8288,7 +8391,8 @@
8288
8391
 
8289
8392
  <!-- highlight text -->
8290
8393
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
8291
- <fo:inline background-color="yellow">
8394
+ <fo:inline xsl:use-attribute-sets="hi-style">
8395
+ <xsl:call-template name="refine_hi-style"/>
8292
8396
  <xsl:apply-templates/>
8293
8397
  </fo:inline>
8294
8398
  </xsl:template>
@@ -8374,7 +8478,8 @@
8374
8478
  </xsl:template>
8375
8479
 
8376
8480
  <xsl:template match="mn:strike">
8377
- <fo:inline text-decoration="line-through">
8481
+ <fo:inline xsl:use-attribute-sets="strike-style">
8482
+ <xsl:call-template name="refine_strike-style"/>
8378
8483
  <xsl:apply-templates/>
8379
8484
  </fo:inline>
8380
8485
  </xsl:template>
@@ -8462,6 +8567,7 @@
8462
8567
 
8463
8568
  <xsl:template match="mn:pre" name="pre">
8464
8569
  <fo:block xsl:use-attribute-sets="pre-style">
8570
+ <xsl:call-template name="refine_pre-style"/>
8465
8571
  <xsl:copy-of select="@id"/>
8466
8572
  <xsl:choose>
8467
8573
 
@@ -8492,22 +8598,40 @@
8492
8598
  <xsl:attribute-set name="permission-style">
8493
8599
  </xsl:attribute-set>
8494
8600
 
8601
+ <xsl:template name="refine_permission-style">
8602
+ </xsl:template>
8603
+
8495
8604
  <xsl:attribute-set name="permission-name-style">
8496
8605
  </xsl:attribute-set>
8497
8606
 
8607
+ <xsl:template name="refine_permission-name-style">
8608
+ </xsl:template>
8609
+
8498
8610
  <xsl:attribute-set name="permission-label-style">
8499
8611
  </xsl:attribute-set>
8500
8612
 
8613
+ <xsl:template name="refine_permission-label-style">
8614
+ </xsl:template>
8615
+
8501
8616
  <xsl:attribute-set name="requirement-style">
8502
8617
  </xsl:attribute-set>
8503
8618
 
8619
+ <xsl:template name="refine_requirement-style">
8620
+ </xsl:template>
8621
+
8504
8622
  <xsl:attribute-set name="requirement-name-style">
8505
8623
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8506
8624
  </xsl:attribute-set>
8507
8625
 
8626
+ <xsl:template name="refine_requirement-name-style">
8627
+ </xsl:template>
8628
+
8508
8629
  <xsl:attribute-set name="requirement-label-style">
8509
8630
  </xsl:attribute-set>
8510
8631
 
8632
+ <xsl:template name="refine_requirement-label-style">
8633
+ </xsl:template>
8634
+
8511
8635
  <xsl:attribute-set name="subject-style">
8512
8636
  </xsl:attribute-set>
8513
8637
 
@@ -8535,18 +8659,28 @@
8535
8659
  <xsl:attribute-set name="recommendation-style">
8536
8660
  </xsl:attribute-set>
8537
8661
 
8662
+ <xsl:template name="refine_recommendation-style">
8663
+ </xsl:template>
8664
+
8538
8665
  <xsl:attribute-set name="recommendation-name-style">
8539
8666
  </xsl:attribute-set>
8540
8667
 
8668
+ <xsl:template name="refine_recommendation-name-style">
8669
+ </xsl:template>
8670
+
8541
8671
  <xsl:attribute-set name="recommendation-label-style">
8542
8672
  </xsl:attribute-set>
8543
8673
 
8674
+ <xsl:template name="refine_recommendation-label-style">
8675
+ </xsl:template>
8676
+
8544
8677
  <!-- ========== -->
8545
8678
  <!-- permission -->
8546
8679
  <!-- ========== -->
8547
8680
  <xsl:template match="mn:permission">
8548
8681
  <xsl:call-template name="setNamedDestination"/>
8549
8682
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
8683
+ <xsl:call-template name="refine_permission-style"/>
8550
8684
  <xsl:apply-templates select="mn:fmt-name"/>
8551
8685
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8552
8686
  </fo:block>
@@ -8555,6 +8689,7 @@
8555
8689
  <xsl:template match="mn:permission/mn:fmt-name">
8556
8690
  <xsl:if test="normalize-space() != ''">
8557
8691
  <fo:block xsl:use-attribute-sets="permission-name-style">
8692
+ <xsl:call-template name="refine_permission-name-style"/>
8558
8693
  <xsl:apply-templates/>
8559
8694
  </fo:block>
8560
8695
  </xsl:if>
@@ -8562,6 +8697,7 @@
8562
8697
 
8563
8698
  <xsl:template match="mn:permission/mn:label">
8564
8699
  <fo:block xsl:use-attribute-sets="permission-label-style">
8700
+ <xsl:call-template name="refine_permission-label-style"/>
8565
8701
  <xsl:apply-templates/>
8566
8702
  </fo:block>
8567
8703
  </xsl:template>
@@ -8574,6 +8710,7 @@
8574
8710
  <xsl:template match="mn:requirement">
8575
8711
  <xsl:call-template name="setNamedDestination"/>
8576
8712
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
8713
+ <xsl:call-template name="refine_requirement-style"/>
8577
8714
  <xsl:apply-templates select="mn:fmt-name"/>
8578
8715
  <xsl:apply-templates select="mn:label"/>
8579
8716
  <xsl:apply-templates select="@obligation"/>
@@ -8586,6 +8723,7 @@
8586
8723
  <xsl:if test="normalize-space() != ''">
8587
8724
 
8588
8725
  <fo:block xsl:use-attribute-sets="requirement-name-style">
8726
+ <xsl:call-template name="refine_requirement-name-style"/>
8589
8727
  <xsl:apply-templates/>
8590
8728
  </fo:block>
8591
8729
  </xsl:if>
@@ -8593,6 +8731,7 @@
8593
8731
 
8594
8732
  <xsl:template match="mn:requirement/mn:label">
8595
8733
  <fo:block xsl:use-attribute-sets="requirement-label-style">
8734
+ <xsl:call-template name="refine_requirement-label-style"/>
8596
8735
  <xsl:apply-templates/>
8597
8736
  </fo:block>
8598
8737
  </xsl:template>
@@ -8618,6 +8757,7 @@
8618
8757
  <xsl:template match="mn:recommendation">
8619
8758
  <xsl:call-template name="setNamedDestination"/>
8620
8759
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
8760
+ <xsl:call-template name="refine_recommendation-style"/>
8621
8761
  <xsl:apply-templates select="mn:fmt-name"/>
8622
8762
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8623
8763
  </fo:block>
@@ -8627,6 +8767,7 @@
8627
8767
  <xsl:if test="normalize-space() != ''">
8628
8768
 
8629
8769
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
8770
+ <xsl:call-template name="refine_recommendation-name-style"/>
8630
8771
  <xsl:apply-templates/>
8631
8772
  </fo:block>
8632
8773
  </xsl:if>
@@ -8634,6 +8775,7 @@
8634
8775
 
8635
8776
  <xsl:template match="mn:recommendation/mn:label">
8636
8777
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
8778
+ <xsl:call-template name="refine_recommendation-label-style"/>
8637
8779
  <xsl:apply-templates/>
8638
8780
  </fo:block>
8639
8781
  </xsl:template>
@@ -8815,38 +8957,75 @@
8815
8957
  <xsl:attribute name="space-before">12pt</xsl:attribute>
8816
8958
  </xsl:attribute-set> <!-- term-style -->
8817
8959
 
8960
+ <xsl:template name="refine_term-style">
8961
+ </xsl:template>
8962
+
8818
8963
  <xsl:attribute-set name="term-name-style">
8819
8964
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8820
8965
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8821
8966
  <xsl:attribute name="space-after">2pt</xsl:attribute>
8822
8967
  </xsl:attribute-set> <!-- term-name-style -->
8823
8968
 
8824
- <xsl:attribute-set name="preferred-block-style">
8969
+ <xsl:template name="refine_term-name-style">
8970
+ <xsl:if test="not($vertical_layout = 'true')">
8971
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8972
+ </xsl:if>
8973
+ </xsl:template>
8974
+
8975
+ <xsl:attribute-set name="preferred-block-style">
8825
8976
  </xsl:attribute-set> <!-- preferred-block-style -->
8826
8977
 
8978
+ <xsl:template name="refine_preferred-block-style">
8979
+ <xsl:if test="$vertical_layout = 'true'">
8980
+ <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
8981
+ <xsl:attribute name="margin-left">-6mm</xsl:attribute>
8982
+ </xsl:if>
8983
+ </xsl:template>
8984
+
8827
8985
  <xsl:attribute-set name="preferred-term-style">
8828
8986
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8829
8987
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8830
8988
  <xsl:attribute name="font-weight">normal</xsl:attribute>
8831
8989
  </xsl:attribute-set> <!-- preferred-term-style -->
8832
8990
 
8991
+ <xsl:template name="refine_preferred-term-style">
8992
+ <xsl:if test="mn:strong">
8993
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
8994
+ </xsl:if>
8995
+ </xsl:template>
8996
+
8833
8997
  <xsl:attribute-set name="domain-style">
8834
8998
  </xsl:attribute-set> <!-- domain-style -->
8835
8999
 
9000
+ <xsl:template name="refine_domain-style">
9001
+ </xsl:template>
9002
+
8836
9003
  <xsl:attribute-set name="admitted-style">
8837
9004
  </xsl:attribute-set> <!-- admitted-style -->
8838
9005
 
9006
+ <xsl:template name="refine_admitted-style">
9007
+ </xsl:template>
9008
+
8839
9009
  <xsl:attribute-set name="deprecates-style">
8840
9010
  </xsl:attribute-set> <!-- deprecates-style -->
8841
9011
 
9012
+ <xsl:template name="refine_deprecates-style">
9013
+ </xsl:template>
9014
+
8842
9015
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
8843
9016
  </xsl:attribute-set>
8844
9017
 
9018
+ <xsl:template name="refine_related-block-style">
9019
+ </xsl:template>
9020
+
8845
9021
  <xsl:attribute-set name="definition-style">
8846
9022
  <xsl:attribute name="space-before">2pt</xsl:attribute>
8847
9023
  <xsl:attribute name="space-after">2pt</xsl:attribute>
8848
9024
  </xsl:attribute-set> <!-- definition-style -->
8849
9025
 
9026
+ <xsl:template name="refine_definition-style">
9027
+ </xsl:template>
9028
+
8850
9029
  <xsl:attribute-set name="termsource-style">
8851
9030
  <xsl:attribute name="margin-left">6mm</xsl:attribute>
8852
9031
  </xsl:attribute-set> <!-- termsource-style -->
@@ -8857,9 +9036,15 @@
8857
9036
  <xsl:attribute-set name="termsource-text-style">
8858
9037
  </xsl:attribute-set> <!-- termsource-text-style -->
8859
9038
 
9039
+ <xsl:template name="refine_termsource-text-style">
9040
+ </xsl:template>
9041
+
8860
9042
  <xsl:attribute-set name="origin-style">
8861
9043
  </xsl:attribute-set> <!-- origin-style -->
8862
9044
 
9045
+ <xsl:template name="refine_origin-style">
9046
+ </xsl:template>
9047
+
8863
9048
  <!-- ====== -->
8864
9049
  <!-- term -->
8865
9050
  <!-- ====== -->
@@ -8875,9 +9060,8 @@
8875
9060
  <xsl:template match="mn:term">
8876
9061
  <xsl:call-template name="setNamedDestination"/>
8877
9062
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
9063
+ <xsl:call-template name="refine_term-style"/>
8878
9064
 
8879
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
8880
- </xsl:if>
8881
9065
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8882
9066
  </fo:block>
8883
9067
  </xsl:template>
@@ -8953,6 +9137,7 @@
8953
9137
  <!-- text SOURCE: -->
8954
9138
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
8955
9139
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
9140
+ <xsl:call-template name="refine_termsource-text-style"/>
8956
9141
  <xsl:value-of select="."/>
8957
9142
  </fo:inline>
8958
9143
  </xsl:template>
@@ -8965,6 +9150,7 @@
8965
9150
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
8966
9151
  </xsl:if>
8967
9152
  <fo:inline xsl:use-attribute-sets="origin-style">
9153
+ <xsl:call-template name="refine_origin-style"/>
8968
9154
  <xsl:apply-templates/>
8969
9155
  </fo:inline>
8970
9156
  </fo:basic-link>
@@ -9013,17 +9199,13 @@
9013
9199
  <xsl:call-template name="getLevelTermName"/>
9014
9200
  </xsl:variable>
9015
9201
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
9016
- <xsl:if test="$vertical_layout = 'true'">
9017
- <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
9018
- <xsl:attribute name="margin-left">-6mm</xsl:attribute>
9019
- </xsl:if>
9202
+
9203
+ <xsl:call-template name="refine_preferred-block-style"/>
9020
9204
 
9021
9205
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
9022
9206
 
9023
9207
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9024
- <xsl:if test="not($vertical_layout = 'true')">
9025
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
9026
- </xsl:if>
9208
+ <xsl:call-template name="refine_term-name-style"/>
9027
9209
 
9028
9210
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
9029
9211
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -9034,7 +9216,7 @@
9034
9216
  </xsl:if>
9035
9217
 
9036
9218
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9037
- <xsl:call-template name="setStyle_preferred"/>
9219
+ <xsl:call-template name="refine_preferred-term-style"/>
9038
9220
  <xsl:if test="$vertical_layout = 'true'">
9039
9221
  <xsl:attribute name="margin-left">6mm</xsl:attribute>
9040
9222
  <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
@@ -9063,22 +9245,18 @@
9063
9245
 
9064
9246
  <xsl:template match="mn:fmt-admitted">
9065
9247
  <fo:block xsl:use-attribute-sets="admitted-style">
9248
+ <xsl:call-template name="refine_admitted-style"/>
9066
9249
  <xsl:apply-templates/>
9067
9250
  </fo:block>
9068
9251
  </xsl:template>
9069
9252
 
9070
9253
  <xsl:template match="mn:fmt-deprecates">
9071
9254
  <fo:block xsl:use-attribute-sets="deprecates-style">
9255
+ <xsl:call-template name="refine_deprecates-style"/>
9072
9256
  <xsl:apply-templates/>
9073
9257
  </fo:block>
9074
9258
  </xsl:template>
9075
9259
 
9076
- <xsl:template name="setStyle_preferred">
9077
- <xsl:if test="mn:strong">
9078
- <xsl:attribute name="font-weight">normal</xsl:attribute>
9079
- </xsl:if>
9080
- </xsl:template>
9081
-
9082
9260
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
9083
9261
  <!-- in metanorma xml preferred terms delimited by semicolons -->
9084
9262
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -9088,6 +9266,7 @@
9088
9266
 
9089
9267
  <xsl:template match="mn:fmt-related">
9090
9268
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
9269
+ <xsl:call-template name="refine_related-block-style"/>
9091
9270
  <xsl:apply-templates/>
9092
9271
  </fo:block>
9093
9272
  </xsl:template>
@@ -9102,6 +9281,7 @@
9102
9281
  <!-- ========== -->
9103
9282
  <xsl:template match="mn:fmt-definition">
9104
9283
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9284
+ <xsl:call-template name="refine_definition-style"/>
9105
9285
  <xsl:apply-templates/>
9106
9286
  </fo:block>
9107
9287
  </xsl:template>
@@ -9152,6 +9332,9 @@
9152
9332
  <xsl:attribute-set name="example-body-style">
9153
9333
  </xsl:attribute-set> <!-- example-body-style -->
9154
9334
 
9335
+ <xsl:template name="refine_example-body-style">
9336
+ </xsl:template>
9337
+
9155
9338
  <xsl:attribute-set name="example-name-style">
9156
9339
  </xsl:attribute-set> <!-- example-name-style -->
9157
9340
 
@@ -9204,6 +9387,8 @@
9204
9387
  <xsl:when test="contains($element, 'block')">
9205
9388
  <fo:block xsl:use-attribute-sets="example-p-style">
9206
9389
 
9390
+ <xsl:call-template name="refine_example-p-style"/>
9391
+
9207
9392
  <xsl:apply-templates/>
9208
9393
  </fo:block>
9209
9394
  </xsl:when>
@@ -9531,6 +9716,9 @@
9531
9716
  <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
9532
9717
  </xsl:attribute-set> <!-- table-fn-number-style -->
9533
9718
 
9719
+ <xsl:template name="refine_table-fn-number-style">
9720
+ </xsl:template>
9721
+
9534
9722
  <xsl:attribute-set name="table-fmt-fn-label-style">
9535
9723
  <xsl:attribute name="font-size">80%</xsl:attribute>
9536
9724
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -9544,30 +9732,12 @@
9544
9732
  </xsl:if>
9545
9733
  </xsl:template>
9546
9734
 
9547
- <xsl:attribute-set name="fn-container-body-style">
9548
- <xsl:attribute name="text-indent">0</xsl:attribute>
9549
- <xsl:attribute name="start-indent">0</xsl:attribute>
9550
- </xsl:attribute-set>
9551
-
9552
9735
  <xsl:attribute-set name="table-fn-body-style">
9553
9736
  </xsl:attribute-set>
9554
9737
 
9555
- <xsl:attribute-set name="figure-fn-number-style">
9556
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
9557
- </xsl:attribute-set> <!-- figure-fn-number-style -->
9558
-
9559
- <xsl:attribute-set name="figure-fmt-fn-label-style">
9560
- <xsl:attribute name="font-size">80%</xsl:attribute>
9561
- <xsl:attribute name="vertical-align">super</xsl:attribute>
9562
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
9563
-
9564
- <xsl:template name="refine_figure-fmt-fn-label-style">
9738
+ <xsl:template name="refine_table-fn-body-style">
9565
9739
  </xsl:template>
9566
9740
 
9567
- <xsl:attribute-set name="figure-fn-body-style">
9568
- <xsl:attribute name="text-align">justify</xsl:attribute>
9569
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9570
- </xsl:attribute-set>
9571
9741
  <!-- ========================== -->
9572
9742
  <!-- END Table styles -->
9573
9743
  <!-- ========================== -->
@@ -10794,6 +10964,7 @@
10794
10964
  </fo:block>
10795
10965
  </fo:list-item-label>
10796
10966
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
10967
+ <xsl:call-template name="refine_table-fn-body-style"/>
10797
10968
  <fo:block>
10798
10969
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10799
10970
  </fo:block>
@@ -10872,6 +11043,7 @@
10872
11043
  </fo:block>
10873
11044
  </fo:list-item-label>
10874
11045
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
11046
+ <xsl:call-template name="refine_table-fn-body-style"/>
10875
11047
  <fo:block>
10876
11048
  <!-- <xsl:copy-of select="./node()"/> -->
10877
11049
  <xsl:apply-templates/>
@@ -10893,6 +11065,7 @@
10893
11065
  <xsl:param name="process">false</xsl:param>
10894
11066
  <xsl:if test="$process = 'true'">
10895
11067
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
11068
+ <xsl:call-template name="refine_table-fn-number-style"/>
10896
11069
 
10897
11070
  <!-- tab is padding-right -->
10898
11071
  <xsl:apply-templates select=".//mn:tab">
@@ -11765,9 +11938,18 @@
11765
11938
  <xsl:attribute-set name="dl-block-style">
11766
11939
  </xsl:attribute-set>
11767
11940
 
11941
+ <xsl:template name="refine_dl-block-style">
11942
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
11943
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
11944
+ </xsl:if>
11945
+ </xsl:template>
11946
+
11768
11947
  <xsl:attribute-set name="dt-row-style">
11769
11948
  </xsl:attribute-set>
11770
11949
 
11950
+ <xsl:template name="refine_dt-row-style">
11951
+ </xsl:template>
11952
+
11771
11953
  <xsl:attribute-set name="dt-cell-style">
11772
11954
  </xsl:attribute-set>
11773
11955
 
@@ -11787,6 +11969,9 @@
11787
11969
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11788
11970
  </xsl:attribute-set> <!-- dl-name-style -->
11789
11971
 
11972
+ <xsl:template name="refine_dl-name-style">
11973
+ </xsl:template>
11974
+
11790
11975
  <xsl:attribute-set name="dd-cell-style">
11791
11976
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
11792
11977
  </xsl:attribute-set>
@@ -11825,9 +12010,7 @@
11825
12010
  <!-- <dl><xsl:copy-of select="."/></dl> -->
11826
12011
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
11827
12012
 
11828
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
11829
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
11830
- </xsl:if>
12013
+ <xsl:call-template name="refine_dl-block-style"/>
11831
12014
 
11832
12015
  <xsl:call-template name="setBlockSpanAll"/>
11833
12016
  <xsl:if test="not(ancestor::mn:quote)">
@@ -12129,6 +12312,8 @@
12129
12312
  <xsl:if test="$process = 'true'">
12130
12313
  <fo:block xsl:use-attribute-sets="dl-name-style">
12131
12314
 
12315
+ <xsl:call-template name="refine_dl-name-style"/>
12316
+
12132
12317
  <xsl:apply-templates/>
12133
12318
  </fo:block>
12134
12319
  </xsl:if>
@@ -12317,6 +12502,8 @@
12317
12502
  <xsl:param name="split_keep-within-line"/>
12318
12503
 
12319
12504
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
12505
+ <xsl:call-template name="refine_dt-row-style"/>
12506
+
12320
12507
  <xsl:call-template name="insert_dt_cell">
12321
12508
  <xsl:with-param name="key_iso" select="$key_iso"/>
12322
12509
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -12534,15 +12721,22 @@
12534
12721
  <xsl:attribute-set name="appendix-style">
12535
12722
  </xsl:attribute-set>
12536
12723
 
12724
+ <xsl:template name="refine_appendix-style">
12725
+ </xsl:template>
12726
+
12537
12727
  <xsl:attribute-set name="appendix-example-style">
12538
12728
  </xsl:attribute-set>
12539
12729
 
12730
+ <xsl:template name="refine_appendix-example-style">
12731
+ </xsl:template>
12732
+
12540
12733
  <!-- ======================== -->
12541
12734
  <!-- Appendix processing -->
12542
12735
  <!-- ======================== -->
12543
12736
  <xsl:template match="mn:appendix">
12544
12737
  <xsl:call-template name="setNamedDestination"/>
12545
12738
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
12739
+ <xsl:call-template name="refine_appendix-style"/>
12546
12740
  <xsl:apply-templates select="mn:fmt-title"/>
12547
12741
  </fo:block>
12548
12742
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -12561,13 +12755,26 @@
12561
12755
  <xsl:template match="mn:appendix//mn:example" priority="2">
12562
12756
  <xsl:call-template name="setNamedDestination"/>
12563
12757
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
12758
+ <xsl:call-template name="refine_appendix-example-style"/>
12564
12759
  <xsl:apply-templates select="mn:fmt-name"/>
12565
12760
  </fo:block>
12566
12761
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
12567
12762
  </xsl:template>
12568
12763
 
12569
12764
  <xsl:attribute-set name="xref-style">
12570
- </xsl:attribute-set>
12765
+ </xsl:attribute-set> <!-- xref-style -->
12766
+
12767
+ <xsl:template name="refine_xref-style">
12768
+ <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])">
12769
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
12770
+ </xsl:if>
12771
+ <xsl:if test="not($vertical_layout = 'true')">
12772
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
12773
+ </xsl:if>
12774
+ <xsl:if test="parent::mn:add">
12775
+ <xsl:call-template name="append_add-style"/>
12776
+ </xsl:if>
12777
+ </xsl:template> <!-- refine_xref-style -->
12571
12778
 
12572
12779
  <xsl:template match="mn:fmt-xref">
12573
12780
  <xsl:call-template name="insert_basic_link">
@@ -12576,15 +12783,8 @@
12576
12783
  <xsl:call-template name="getAltText"/>
12577
12784
  </xsl:variable>
12578
12785
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
12579
- <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])">
12580
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
12581
- </xsl:if>
12582
- <xsl:if test="not($vertical_layout = 'true')">
12583
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
12584
- </xsl:if>
12585
- <xsl:if test="parent::mn:add">
12586
- <xsl:call-template name="append_add-style"/>
12587
- </xsl:if>
12786
+ <xsl:call-template name="refine_xref-style"/>
12787
+
12588
12788
  <xsl:apply-templates/>
12589
12789
  </fo:basic-link>
12590
12790
  </xsl:with-param>
@@ -12693,16 +12893,16 @@
12693
12893
  <xsl:attribute-set name="note-style">
12694
12894
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
12695
12895
  <xsl:attribute name="space-before">2pt</xsl:attribute>
12696
- </xsl:attribute-set>
12896
+ </xsl:attribute-set> <!-- note-style -->
12697
12897
 
12698
12898
  <xsl:template name="refine_note-style">
12699
- </xsl:template>
12899
+ </xsl:template> <!-- refine_note-style -->
12700
12900
 
12701
12901
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
12702
12902
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
12703
12903
 
12704
12904
  <xsl:attribute-set name="note-name-style">
12705
- </xsl:attribute-set>
12905
+ </xsl:attribute-set> <!-- note-name-style -->
12706
12906
 
12707
12907
  <xsl:template name="refine_note-name-style">
12708
12908
  <xsl:if test="not($vertical_layout = 'true')">
@@ -12722,19 +12922,22 @@
12722
12922
  </xsl:template> <!-- refine_table-note-name-style -->
12723
12923
 
12724
12924
  <xsl:attribute-set name="note-p-style">
12725
- </xsl:attribute-set>
12925
+ </xsl:attribute-set> <!-- note-p-style -->
12926
+
12927
+ <xsl:template name="refine_note-p-style">
12928
+ </xsl:template>
12726
12929
 
12727
12930
  <xsl:attribute-set name="termnote-style">
12728
12931
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
12729
12932
  <xsl:attribute name="space-before">4pt</xsl:attribute>
12730
12933
  <xsl:attribute name="space-after">4pt</xsl:attribute>
12731
- </xsl:attribute-set>
12934
+ </xsl:attribute-set> <!-- termnote-style -->
12732
12935
 
12733
12936
  <xsl:template name="refine_termnote-style">
12734
12937
  </xsl:template> <!-- refine_termnote-style -->
12735
12938
 
12736
12939
  <xsl:attribute-set name="termnote-name-style">
12737
- </xsl:attribute-set>
12940
+ </xsl:attribute-set> <!-- termnote-name-style -->
12738
12941
 
12739
12942
  <xsl:template name="refine_termnote-name-style">
12740
12943
  <xsl:if test="not($vertical_layout = 'true')">
@@ -12745,6 +12948,9 @@
12745
12948
  <xsl:attribute-set name="termnote-p-style">
12746
12949
  </xsl:attribute-set>
12747
12950
 
12951
+ <xsl:template name="refine_termnote-p-style">
12952
+ </xsl:template>
12953
+
12748
12954
  <!-- ====== -->
12749
12955
  <!-- note -->
12750
12956
  <!-- termnote -->
@@ -12797,11 +13003,13 @@
12797
13003
  <xsl:choose>
12798
13004
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
12799
13005
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
13006
+ <xsl:call-template name="refine_note-p-style"/>
12800
13007
  <xsl:apply-templates/>
12801
13008
  </fo:inline>
12802
13009
  </xsl:when>
12803
13010
  <xsl:otherwise>
12804
13011
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
13012
+ <xsl:call-template name="refine_note-p-style"/>
12805
13013
  <xsl:apply-templates/>
12806
13014
  </fo:block>
12807
13015
  </xsl:otherwise>
@@ -12893,11 +13101,13 @@
12893
13101
  <xsl:choose>
12894
13102
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
12895
13103
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
13104
+ <xsl:call-template name="refine_termnote-p-style"/>
12896
13105
  <xsl:apply-templates/>
12897
13106
  </fo:inline>
12898
13107
  </xsl:when>
12899
13108
  <xsl:otherwise>
12900
13109
  <fo:block xsl:use-attribute-sets="termnote-p-style">
13110
+ <xsl:call-template name="refine_termnote-p-style"/>
12901
13111
  <xsl:apply-templates/>
12902
13112
  </fo:block>
12903
13113
  </xsl:otherwise>
@@ -12912,7 +13122,7 @@
12912
13122
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
12913
13123
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
12914
13124
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
12915
- </xsl:attribute-set>
13125
+ </xsl:attribute-set> <!-- quote-style -->
12916
13126
 
12917
13127
  <xsl:template name="refine_quote-style">
12918
13128
  <xsl:if test="ancestor::mn:li">
@@ -12924,6 +13134,9 @@
12924
13134
  <xsl:attribute name="text-align">right</xsl:attribute>
12925
13135
  </xsl:attribute-set>
12926
13136
 
13137
+ <xsl:template name="refine_quote-source-style">
13138
+ </xsl:template>
13139
+
12927
13140
  <!-- ====== -->
12928
13141
  <!-- quote -->
12929
13142
  <!-- source -->
@@ -12952,6 +13165,7 @@
12952
13165
  </fo:block-container>
12953
13166
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
12954
13167
  <fo:block xsl:use-attribute-sets="quote-source-style">
13168
+ <xsl:call-template name="refine_quote-source-style"/>
12955
13169
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
12956
13170
  <xsl:apply-templates select="mn:author"/>
12957
13171
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -13081,13 +13295,16 @@
13081
13295
  <xsl:attribute-set name="figure-style">
13082
13296
  </xsl:attribute-set>
13083
13297
 
13298
+ <xsl:template name="refine_figure-style">
13299
+ </xsl:template>
13300
+
13084
13301
  <xsl:attribute-set name="figure-name-style">
13085
13302
  <xsl:attribute name="role">Caption</xsl:attribute>
13086
13303
  <xsl:attribute name="text-align">center</xsl:attribute>
13087
13304
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
13088
13305
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13089
13306
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
13090
- </xsl:attribute-set>
13307
+ </xsl:attribute-set> <!-- figure-name-style -->
13091
13308
 
13092
13309
  <xsl:template name="refine_figure-name-style">
13093
13310
  <xsl:if test="ancestor::mn:figure">
@@ -13102,7 +13319,7 @@
13102
13319
  <xsl:attribute-set name="image-style">
13103
13320
  <xsl:attribute name="role">SKIP</xsl:attribute>
13104
13321
  <xsl:attribute name="text-align">center</xsl:attribute>
13105
- </xsl:attribute-set>
13322
+ </xsl:attribute-set> <!-- image-style -->
13106
13323
 
13107
13324
  <xsl:template name="refine_image-style">
13108
13325
  <xsl:if test="$vertical_layout = 'true'">
@@ -13114,14 +13331,51 @@
13114
13331
  <xsl:attribute name="width">100%</xsl:attribute>
13115
13332
  <xsl:attribute name="content-height">100%</xsl:attribute>
13116
13333
  <xsl:attribute name="scaling">uniform</xsl:attribute>
13117
- </xsl:attribute-set>
13334
+ </xsl:attribute-set> <!-- image-graphic-style -->
13335
+
13336
+ <xsl:template name="refine_image-graphic-style">
13337
+ </xsl:template>
13118
13338
 
13119
13339
  <xsl:attribute-set name="figure-source-style">
13120
13340
  </xsl:attribute-set>
13121
13341
 
13342
+ <xsl:template name="refine_figure-source-style">
13343
+ </xsl:template>
13344
+
13122
13345
  <xsl:attribute-set name="figure-pseudocode-p-style">
13123
13346
  </xsl:attribute-set>
13124
13347
 
13348
+ <xsl:template name="refine_figure-pseudocode-p-style">
13349
+ </xsl:template>
13350
+
13351
+ <xsl:attribute-set name="figure-fn-number-style">
13352
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
13353
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
13354
+
13355
+ <xsl:template name="refine_figure-fn-number-style">
13356
+ </xsl:template>
13357
+
13358
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
13359
+ <xsl:attribute name="font-size">80%</xsl:attribute>
13360
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
13361
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
13362
+
13363
+ <xsl:template name="refine_figure-fmt-fn-label-style">
13364
+ </xsl:template>
13365
+
13366
+ <xsl:attribute-set name="figure-fn-body-style">
13367
+ <xsl:attribute name="text-align">justify</xsl:attribute>
13368
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13369
+ </xsl:attribute-set>
13370
+
13371
+ <xsl:template name="refine_figure-fn-body-style">
13372
+ <xsl:variable name="key_iso">
13373
+ </xsl:variable>
13374
+ <xsl:if test="normalize-space($key_iso) = 'true'">
13375
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
13376
+ </xsl:if>
13377
+ </xsl:template>
13378
+
13125
13379
  <!-- ============================ -->
13126
13380
  <!-- figure's footnotes rendering -->
13127
13381
  <!-- ============================ -->
@@ -13234,9 +13488,8 @@
13234
13488
  </fo:table-cell>
13235
13489
  <fo:table-cell>
13236
13490
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
13237
- <xsl:if test="normalize-space($key_iso) = 'true'">
13238
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
13239
- </xsl:if>
13491
+ <xsl:call-template name="refine_figure-fn-body-style"/>
13492
+
13240
13493
  <!-- <xsl:copy-of select="./node()"/> -->
13241
13494
  <xsl:apply-templates/>
13242
13495
  </fo:block>
@@ -13254,6 +13507,7 @@
13254
13507
  <xsl:param name="process">false</xsl:param>
13255
13508
  <xsl:if test="$process = 'true'">
13256
13509
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
13510
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13257
13511
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
13258
13512
 
13259
13513
  <!-- tab is padding-right -->
@@ -13291,6 +13545,7 @@
13291
13545
  <xsl:attribute name="font-size">10pt</xsl:attribute>
13292
13546
  </xsl:if>
13293
13547
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
13548
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13294
13549
  <!-- <xsl:value-of select="@reference"/> -->
13295
13550
  <xsl:apply-templates/>
13296
13551
  </fo:inline>
@@ -13341,6 +13596,8 @@
13341
13596
 
13342
13597
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
13343
13598
 
13599
+ <xsl:call-template name="refine_figure-style"/>
13600
+
13344
13601
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
13345
13602
  <xsl:call-template name="setIDforNamedDestination"/>
13346
13603
  </xsl:for-each>
@@ -13395,6 +13652,7 @@
13395
13652
 
13396
13653
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
13397
13654
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
13655
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
13398
13656
  <xsl:apply-templates/>
13399
13657
  </fo:block>
13400
13658
  </xsl:template>
@@ -13524,6 +13782,8 @@
13524
13782
  </xsl:variable>
13525
13783
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
13526
13784
 
13785
+ <xsl:call-template name="refine_image-graphic-style"/>
13786
+
13527
13787
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
13528
13788
  <xsl:variable name="scale">
13529
13789
  <xsl:call-template name="getImageScale">
@@ -14231,6 +14491,9 @@
14231
14491
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
14232
14492
  </xsl:attribute-set> <!-- formula-style -->
14233
14493
 
14494
+ <xsl:template name="refine_formula-style">
14495
+ </xsl:template>
14496
+
14234
14497
  <xsl:attribute-set name="formula-stem-block-style">
14235
14498
  <xsl:attribute name="text-align">center</xsl:attribute>
14236
14499
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -14299,6 +14562,8 @@
14299
14562
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
14300
14563
  <fo:block xsl:use-attribute-sets="formula-style">
14301
14564
 
14565
+ <xsl:call-template name="refine_formula-style"/>
14566
+
14302
14567
  <fo:table table-layout="fixed" width="100%">
14303
14568
  <fo:table-column column-width="95%"/>
14304
14569
  <fo:table-column column-width="5%"/>
@@ -14718,6 +14983,9 @@
14718
14983
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
14719
14984
  </xsl:attribute-set> <!-- list-name-style -->
14720
14985
 
14986
+ <xsl:template name="refine_list-name-style">
14987
+ </xsl:template>
14988
+
14721
14989
  <xsl:attribute-set name="list-item-style">
14722
14990
  </xsl:attribute-set>
14723
14991
 
@@ -15045,6 +15313,7 @@
15045
15313
  <xsl:param name="process">false</xsl:param>
15046
15314
  <xsl:if test="$process = 'true'">
15047
15315
  <fo:block xsl:use-attribute-sets="list-name-style">
15316
+ <xsl:call-template name="refine_list-name-style"/>
15048
15317
  <xsl:apply-templates/>
15049
15318
  </fo:block>
15050
15319
  </xsl:if>
@@ -15105,38 +15374,67 @@
15105
15374
  <!-- END Lists processing -->
15106
15375
  <!-- ===================================== -->
15107
15376
 
15377
+ <xsl:attribute-set name="footnote-separator-leader-style">
15378
+ </xsl:attribute-set>
15379
+
15380
+ <xsl:template name="refine_footnote-separator-leader-style">
15381
+ </xsl:template>
15382
+
15383
+ <xsl:attribute-set name="fn-container-body-style">
15384
+ <xsl:attribute name="text-indent">0</xsl:attribute>
15385
+ <xsl:attribute name="start-indent">0</xsl:attribute>
15386
+ </xsl:attribute-set>
15387
+
15388
+ <xsl:template name="refine_fn-container-body-style">
15389
+ </xsl:template>
15390
+
15108
15391
  <xsl:attribute-set name="fn-reference-style">
15109
15392
  <xsl:attribute name="font-size">80%</xsl:attribute>
15110
15393
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15111
15394
  <xsl:attribute name="font-size">67%</xsl:attribute>
15112
15395
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15113
15396
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15114
-
15115
- </xsl:attribute-set>
15397
+ </xsl:attribute-set> <!-- fn-reference-style -->
15116
15398
 
15117
15399
  <xsl:template name="refine_fn-reference-style">
15118
15400
  <xsl:if test="not($vertical_layout = 'true')">
15119
15401
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15120
15402
  </xsl:if>
15403
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
15404
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
15121
15405
  </xsl:template> <!-- refine_fn-reference-style -->
15122
15406
 
15123
15407
  <xsl:attribute-set name="fn-style">
15124
15408
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15125
15409
  </xsl:attribute-set>
15126
15410
 
15411
+ <xsl:template name="refine_fn-style">
15412
+ </xsl:template>
15413
+
15127
15414
  <xsl:attribute-set name="fn-num-style">
15128
15415
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15129
15416
  <xsl:attribute name="font-size">67%</xsl:attribute>
15130
15417
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15131
15418
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15132
- </xsl:attribute-set>
15419
+ </xsl:attribute-set> <!-- fn-num-style -->
15420
+
15421
+ <xsl:template name="refine_fn-num-style">
15422
+ <xsl:if test="not($vertical_layout = 'true')">
15423
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15424
+ </xsl:if>
15425
+ <xsl:if test="$vertical_layout = 'true'">
15426
+ <xsl:attribute name="vertical-align">baseline</xsl:attribute>
15427
+ <xsl:attribute name="font-size">80%</xsl:attribute>
15428
+ <xsl:attribute name="baseline-shift">20%</xsl:attribute>
15429
+ </xsl:if>
15430
+ </xsl:template>
15133
15431
 
15134
15432
  <xsl:attribute-set name="fn-body-style">
15135
15433
  <xsl:attribute name="font-weight">normal</xsl:attribute>
15136
15434
  <xsl:attribute name="font-style">normal</xsl:attribute>
15137
15435
  <xsl:attribute name="text-indent">0</xsl:attribute>
15138
15436
  <xsl:attribute name="start-indent">0</xsl:attribute>
15139
- </xsl:attribute-set>
15437
+ </xsl:attribute-set> <!-- fn-body-style" -->
15140
15438
 
15141
15439
  <xsl:template name="refine_fn-body-style">
15142
15440
  <xsl:if test="not($vertical_layout = 'true')">
@@ -15219,21 +15517,12 @@
15219
15517
  <xsl:choose>
15220
15518
  <xsl:when test="ancestor::mn:bibitem">
15221
15519
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
15222
- <xsl:if test="not($vertical_layout = 'true')">
15223
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15224
- </xsl:if>
15520
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
15225
15521
  </fn_styles>
15226
15522
  </xsl:when>
15227
15523
  <xsl:otherwise>
15228
15524
  <fn_styles xsl:use-attribute-sets="fn-num-style">
15229
- <xsl:if test="not($vertical_layout = 'true')">
15230
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15231
- </xsl:if>
15232
- <xsl:if test="$vertical_layout = 'true'">
15233
- <xsl:attribute name="vertical-align">baseline</xsl:attribute>
15234
- <xsl:attribute name="font-size">80%</xsl:attribute>
15235
- <xsl:attribute name="baseline-shift">20%</xsl:attribute>
15236
- </xsl:if>
15525
+ <xsl:call-template name="refine_fn-num-style"/>
15237
15526
  </fn_styles>
15238
15527
  </xsl:otherwise>
15239
15528
  </xsl:choose>
@@ -15243,9 +15532,12 @@
15243
15532
  <xsl:copy-of select="."/>
15244
15533
  </xsl:for-each>
15245
15534
 
15246
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
15535
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
15536
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
15247
15537
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
15248
- </xsl:if>
15538
+ </xsl:if> -->
15539
+
15540
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
15249
15541
 
15250
15542
  <xsl:call-template name="insert_basic_link">
15251
15543
  <xsl:with-param name="element">
@@ -15279,10 +15571,12 @@
15279
15571
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
15280
15572
 
15281
15573
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
15574
+ <xsl:call-template name="refine_fn-style"/>
15282
15575
  <xsl:copy-of select="$footnote_inline"/>
15283
15576
  <fo:footnote-body role="Note">
15284
15577
 
15285
15578
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
15579
+ <xsl:call-template name="refine_fn-container-body-style"/>
15286
15580
 
15287
15581
  <xsl:variable name="fn_block">
15288
15582
  <xsl:call-template name="refine_fn-body-style"/>
@@ -15417,17 +15711,30 @@
15417
15711
  <xsl:attribute-set name="admonition-style">
15418
15712
  </xsl:attribute-set> <!-- admonition-style -->
15419
15713
 
15714
+ <xsl:template name="refine_admonition-style">
15715
+ </xsl:template>
15716
+
15420
15717
  <xsl:attribute-set name="admonition-container-style">
15421
15718
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
15422
15719
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
15423
15720
  </xsl:attribute-set> <!-- admonition-container-style -->
15424
15721
 
15722
+ <xsl:template name="refine_admonition-container-style">
15723
+ </xsl:template>
15724
+
15425
15725
  <xsl:attribute-set name="admonition-name-style">
15426
15726
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
15427
15727
  </xsl:attribute-set> <!-- admonition-name-style -->
15428
15728
 
15729
+ <xsl:template name="refine_admonition-name-style">
15730
+ </xsl:template>
15731
+
15429
15732
  <xsl:attribute-set name="admonition-p-style">
15430
15733
  </xsl:attribute-set> <!-- admonition-p-style -->
15734
+
15735
+ <xsl:template name="refine_admonition-p-style">
15736
+ </xsl:template>
15737
+
15431
15738
  <!-- end admonition -->
15432
15739
 
15433
15740
  <!-- ================ -->
@@ -15437,8 +15744,12 @@
15437
15744
  <xsl:call-template name="setNamedDestination"/>
15438
15745
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
15439
15746
 
15747
+ <xsl:call-template name="refine_admonition-style"/>
15748
+
15440
15749
  <xsl:call-template name="setBlockSpanAll"/>
15441
15750
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
15751
+
15752
+ <xsl:call-template name="refine_admonition-container-style"/>
15442
15753
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
15443
15754
  <fo:block>
15444
15755
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -15494,6 +15805,7 @@
15494
15805
 
15495
15806
  <xsl:template match="mn:admonition/mn:p">
15496
15807
  <fo:block xsl:use-attribute-sets="admonition-p-style">
15808
+ <xsl:call-template name="refine_admonition-p-style"/>
15497
15809
 
15498
15810
  <xsl:apply-templates/>
15499
15811
  </fo:block>
@@ -15503,6 +15815,13 @@
15503
15815
  <!-- END Admonition -->
15504
15816
  <!-- ================ -->
15505
15817
 
15818
+ <xsl:attribute-set name="references-non-normative-title-style">
15819
+ </xsl:attribute-set>
15820
+
15821
+ <xsl:template name="refine_references-non-normative-title-style">
15822
+
15823
+ </xsl:template>
15824
+
15506
15825
  <!-- bibitem in Normative References (references/@normative="true") -->
15507
15826
  <xsl:attribute-set name="bibitem-normative-style">
15508
15827
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -15510,32 +15829,53 @@
15510
15829
  <xsl:attribute name="text-indent">-6mm</xsl:attribute>
15511
15830
  </xsl:attribute-set> <!-- bibitem-normative-style -->
15512
15831
 
15832
+ <xsl:template name="refine_bibitem-normative-style">
15833
+ </xsl:template>
15834
+
15513
15835
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
15514
15836
  <xsl:attribute-set name="bibitem-normative-list-style">
15515
15837
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
15516
15838
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15517
15839
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
15518
15840
 
15841
+ <xsl:template name="refine_bibitem-normative-list-style">
15842
+ </xsl:template>
15843
+
15519
15844
  <xsl:attribute-set name="bibitem-non-normative-style">
15520
15845
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
15521
15846
 
15847
+ <xsl:template name="refine_bibitem-non-normative-style">
15848
+ </xsl:template>
15849
+
15522
15850
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
15523
15851
  <xsl:attribute-set name="bibitem-non-normative-list-style">
15524
15852
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
15525
15853
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15526
15854
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
15527
15855
 
15856
+ <xsl:template name="refine_bibitem-non-normative-list-style">
15857
+ </xsl:template>
15858
+
15528
15859
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
15529
15860
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15530
15861
  </xsl:attribute-set>
15531
15862
 
15863
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
15864
+ </xsl:template>
15865
+
15532
15866
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
15533
15867
  <xsl:attribute-set name="bibitem-normative-list-body-style">
15534
15868
  </xsl:attribute-set>
15535
15869
 
15870
+ <xsl:template name="refine_bibitem-normative-list-body-style">
15871
+ </xsl:template>
15872
+
15536
15873
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
15537
15874
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
15538
15875
 
15876
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
15877
+ </xsl:template>
15878
+
15539
15879
  <!-- footnote reference number for bibitem, in the text -->
15540
15880
  <xsl:attribute-set name="bibitem-note-fn-style">
15541
15881
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -15545,6 +15885,12 @@
15545
15885
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15546
15886
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
15547
15887
 
15888
+ <xsl:template name="refine_bibitem-note-fn-style">
15889
+ <xsl:if test="not($vertical_layout = 'true')">
15890
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15891
+ </xsl:if>
15892
+ </xsl:template>
15893
+
15548
15894
  <!-- footnote number on the page bottom -->
15549
15895
  <xsl:attribute-set name="bibitem-note-fn-number-style">
15550
15896
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -15560,6 +15906,9 @@
15560
15906
  <xsl:attribute-set name="references-non-normative-style">
15561
15907
  </xsl:attribute-set> <!-- references-non-normative-style -->
15562
15908
 
15909
+ <xsl:template name="refine_references-non-normative-style">
15910
+ </xsl:template>
15911
+
15563
15912
  <!-- ======================= -->
15564
15913
  <!-- Bibliography rendering -->
15565
15914
  <!-- ======================= -->
@@ -15611,6 +15960,7 @@
15611
15960
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
15612
15961
 
15613
15962
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
15963
+ <xsl:call-template name="refine_references-non-normative-style"/>
15614
15964
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
15615
15965
  <!-- render footnotes after references -->
15616
15966
  <xsl:apply-templates select=".//mn:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
@@ -15630,6 +15980,7 @@
15630
15980
  <fo:block-container margin-left="6mm" role="SKIP">
15631
15981
  <fo:block-container margin-left="0mm" role="SKIP">
15632
15982
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
15983
+ <xsl:call-template name="refine_bibitem-normative-style"/>
15633
15984
  <xsl:call-template name="processBibitem"/>
15634
15985
  </fo:block>
15635
15986
  </fo:block-container>
@@ -15638,12 +15989,14 @@
15638
15989
  </xsl:template> <!-- bibitem -->
15639
15990
 
15640
15991
  <!-- Bibliography (non-normative references) -->
15641
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
15992
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
15642
15993
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
15643
15994
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
15644
15995
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
15645
15996
  <xsl:call-template name="setNamedDestination"/>
15646
15997
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
15998
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
15999
+
15647
16000
  <fo:list-item>
15648
16001
  <fo:list-item-label end-indent="label-end()">
15649
16002
  <fo:block role="SKIP">
@@ -15656,6 +16009,7 @@
15656
16009
  </fo:list-item-label>
15657
16010
  <fo:list-item-body start-indent="body-start()">
15658
16011
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16012
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
15659
16013
  <xsl:call-template name="processBibitem">
15660
16014
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
15661
16015
  </xsl:call-template>
@@ -15666,12 +16020,17 @@
15666
16020
 
15667
16021
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
15668
16022
 
16023
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
16024
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
16025
+
15669
16026
  <xsl:template name="insertListItem_Bibitem">
15670
16027
  <xsl:choose>
15671
16028
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
15672
16029
  <xsl:otherwise>
15673
16030
  <xsl:call-template name="setNamedDestination"/>
15674
16031
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
16032
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
16033
+
15675
16034
  <fo:list-item-label end-indent="label-end()">
15676
16035
  <fo:block role="SKIP">
15677
16036
  <fo:inline role="SKIP">
@@ -15682,16 +16041,18 @@
15682
16041
  </fo:block>
15683
16042
  </fo:list-item-label>
15684
16043
  <fo:list-item-body start-indent="body-start()">
15685
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16044
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
16045
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
15686
16046
  <xsl:call-template name="processBibitem">
15687
16047
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
15688
16048
  </xsl:call-template>
15689
16049
  </fo:block>
16050
+ <xsl:call-template name="processBibitemFollowingNotes"/>
15690
16051
  </fo:list-item-body>
15691
16052
  </fo:list-item>
15692
16053
  </xsl:otherwise>
15693
16054
  </xsl:choose>
15694
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
16055
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
15695
16056
  <xsl:with-param name="skip">false</xsl:with-param>
15696
16057
  </xsl:apply-templates>
15697
16058
  </xsl:template>
@@ -15710,24 +16071,16 @@
15710
16071
  </xsl:apply-templates>
15711
16072
  </fo:inline>
15712
16073
  <xsl:apply-templates select="mn:formattedref"/>
16074
+ <xsl:call-template name="processBibitemFollowingNotes"/>
15713
16075
 
15714
- <xsl:call-template name="processBibliographyNote"/>
15715
16076
  </xsl:template> <!-- processBibitem (bibitem) -->
15716
16077
 
15717
- <xsl:template name="processBibliographyNote">
15718
- <xsl:if test="self::mn:note">
15719
- <xsl:variable name="note_node">
15720
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
15721
- <xsl:copy> <!-- skip @id -->
15722
- <xsl:copy-of select="node()"/>
15723
- </xsl:copy>
15724
- </xsl:element>
15725
- </xsl:variable>
15726
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
15727
- <xsl:call-template name="note"/>
15728
- </xsl:for-each> -->
16078
+ <xsl:template name="processBibitemFollowingNotes">
16079
+ <!-- current context is bibitem element -->
16080
+ <xsl:variable name="bibitem_id" select="@id"/>
16081
+ <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]]">
15729
16082
  <xsl:call-template name="note"/>
15730
- </xsl:if>
16083
+ </xsl:for-each>
15731
16084
  </xsl:template>
15732
16085
 
15733
16086
  <xsl:template match="mn:title" mode="title">
@@ -15927,11 +16280,17 @@
15927
16280
  <!-- Index section styles -->
15928
16281
  <xsl:attribute-set name="indexsect-title-style">
15929
16282
  <xsl:attribute name="role">H1</xsl:attribute>
15930
- </xsl:attribute-set>
16283
+ </xsl:attribute-set> <!-- indexsect-title-style -->
16284
+
16285
+ <xsl:template name="refine_indexsect-title-style">
16286
+ </xsl:template>
15931
16287
 
15932
16288
  <xsl:attribute-set name="indexsect-clause-title-style">
15933
16289
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
15934
- </xsl:attribute-set>
16290
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
16291
+
16292
+ <xsl:template name="refine_indexsect-clause-title-style">
16293
+ </xsl:template>
15935
16294
  <!-- End Index section styles -->
15936
16295
 
15937
16296
  <!-- =================== -->
@@ -16125,6 +16484,7 @@
16125
16484
 
16126
16485
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
16127
16486
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
16487
+ <xsl:call-template name="refine_indexsect-title-style"/>
16128
16488
  <!-- Index -->
16129
16489
  <xsl:apply-templates/>
16130
16490
  </fo:block>
@@ -16133,6 +16493,7 @@
16133
16493
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
16134
16494
  <!-- Letter A, B, C, ... -->
16135
16495
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
16496
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
16136
16497
  <xsl:apply-templates/>
16137
16498
  </fo:block>
16138
16499
  </xsl:template>
@@ -16357,9 +16718,15 @@
16357
16718
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
16358
16719
  </xsl:attribute-set> <!-- END: toc-leader-style -->
16359
16720
 
16721
+ <xsl:template name="refine_toc-leader-style">
16722
+ </xsl:template>
16723
+
16360
16724
  <xsl:attribute-set name="toc-pagenumber-style">
16361
16725
  </xsl:attribute-set>
16362
16726
 
16727
+ <xsl:template name="refine_toc-pagenumber-style">
16728
+ </xsl:template>
16729
+
16363
16730
  <!-- List of Figures, Tables -->
16364
16731
  <xsl:attribute-set name="toc-listof-title-style">
16365
16732
  </xsl:attribute-set>
@@ -16370,10 +16737,16 @@
16370
16737
  <xsl:attribute-set name="toc-listof-item-block-style">
16371
16738
  </xsl:attribute-set>
16372
16739
 
16740
+ <xsl:template name="refine_toc-listof-item-block-style">
16741
+ </xsl:template>
16742
+
16373
16743
  <xsl:attribute-set name="toc-listof-item-style">
16374
16744
  <xsl:attribute name="role">TOCI</xsl:attribute>
16375
16745
  </xsl:attribute-set>
16376
16746
 
16747
+ <xsl:template name="refine_toc-listof-item-style">
16748
+ </xsl:template>
16749
+
16377
16750
  <xsl:template name="processPrefaceSectionsDefault_Contents">
16378
16751
  <xsl:variable name="nodes_preface_">
16379
16752
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -17480,23 +17853,55 @@
17480
17853
  <!-- Ruby text (CJK languages) rendering -->
17481
17854
  <!-- ===================================== -->
17482
17855
  <!-- ===================================== -->
17856
+
17857
+ <xsl:attribute-set name="ruby-style">
17858
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
17859
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
17860
+ </xsl:attribute-set>
17861
+
17862
+ <xsl:template name="refine_ruby-style">
17863
+ <xsl:if test="not(ancestor::mn:ruby)">
17864
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
17865
+ </xsl:if>
17866
+ <xsl:variable name="rt_text" select="mn:rt"/>
17867
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
17868
+ <!-- Example: width="2em" -->
17869
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
17870
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
17871
+ <xsl:variable name="text_width">
17872
+ <xsl:choose>
17873
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
17874
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
17875
+ </xsl:choose>
17876
+ </xsl:variable>
17877
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
17878
+ </xsl:template> <!-- refine_ruby-style -->
17879
+
17880
+ <xsl:attribute-set name="rb-style">
17881
+ <xsl:attribute name="line-height">1em</xsl:attribute>
17882
+ <xsl:attribute name="text-align">center</xsl:attribute>
17883
+ </xsl:attribute-set>
17884
+
17885
+ <xsl:template name="refine_rb-style">
17886
+ </xsl:template>
17887
+
17888
+ <xsl:attribute-set name="rt-style">
17889
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
17890
+ <xsl:attribute name="text-align">center</xsl:attribute>
17891
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
17892
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
17893
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
17894
+ </xsl:attribute-set>
17895
+
17896
+ <xsl:template name="refine_rt-style">
17897
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
17898
+ <xsl:attribute name="space-before">0em</xsl:attribute>
17899
+ </xsl:if>
17900
+ </xsl:template>
17901
+
17483
17902
  <xsl:template match="mn:ruby">
17484
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
17485
- <xsl:if test="not(ancestor::mn:ruby)">
17486
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
17487
- </xsl:if>
17488
- <xsl:variable name="rt_text" select="mn:rt"/>
17489
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
17490
- <!-- Example: width="2em" -->
17491
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
17492
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
17493
- <xsl:variable name="text_width">
17494
- <xsl:choose>
17495
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
17496
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
17497
- </xsl:choose>
17498
- </xsl:variable>
17499
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
17903
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
17904
+ <xsl:call-template name="refine_ruby-style"/>
17500
17905
 
17501
17906
  <xsl:choose>
17502
17907
  <xsl:when test="ancestor::mn:ruby">
@@ -17514,17 +17919,14 @@
17514
17919
  </xsl:template>
17515
17920
 
17516
17921
  <xsl:template match="mn:rb">
17517
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
17922
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
17518
17923
  </xsl:template>
17519
17924
 
17520
17925
  <xsl:template match="mn:rt">
17521
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
17522
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
17523
- <xsl:attribute name="space-before">0em</xsl:attribute>
17524
- </xsl:if>
17926
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
17927
+ <xsl:call-template name="refine_rt-style"/>
17525
17928
  <xsl:apply-templates/>
17526
17929
  </fo:block>
17527
-
17528
17930
  </xsl:template>
17529
17931
 
17530
17932
  <!-- ===================================== -->
@@ -17533,6 +17935,18 @@
17533
17935
  <!-- ===================================== -->
17534
17936
  <!-- ===================================== -->
17535
17937
 
17938
+ <xsl:attribute-set name="annex-title-style">
17939
+ </xsl:attribute-set>
17940
+
17941
+ <xsl:template name="refine_annex-title-style">
17942
+ </xsl:template>
17943
+
17944
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
17945
+ </xsl:attribute-set>
17946
+
17947
+ <xsl:template name="refine_p-zzSTDTitle1-style">
17948
+ </xsl:template>
17949
+
17536
17950
  <xsl:template name="processPrefaceSectionsDefault">
17537
17951
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
17538
17952
  <xsl:sort select="@displayorder" data-type="number"/>