metanorma-jis 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5797,6 +5797,7 @@
5797
5797
  <xsl:variable name="en_dash">–</xsl:variable>
5798
5798
  <xsl:variable name="em_dash">—</xsl:variable>
5799
5799
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
5800
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
5800
5801
  <xsl:variable name="cr">&#13;</xsl:variable>
5801
5802
  <xsl:variable name="lf">
5802
5803
  </xsl:variable>
@@ -6360,6 +6361,7 @@
6360
6361
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
6361
6362
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
6362
6363
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
6364
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
6363
6365
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
6364
6366
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
6365
6367
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -6374,10 +6376,10 @@
6374
6376
 
6375
6377
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
6376
6378
 
6377
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
6379
+ <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
6378
6380
  <xsl:copy>
6379
6381
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
6380
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
6382
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
6381
6383
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
6382
6384
  </xsl:copy>
6383
6385
  </xsl:template>
@@ -7270,10 +7272,16 @@
7270
7272
  <xsl:attribute-set name="license-statement-style">
7271
7273
  </xsl:attribute-set> <!-- license-statement-style -->
7272
7274
 
7275
+ <xsl:template name="refine_license-statement-style">
7276
+ </xsl:template>
7277
+
7273
7278
  <xsl:attribute-set name="license-statement-title-style">
7274
7279
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7275
7280
  </xsl:attribute-set> <!-- license-statement-title-style -->
7276
7281
 
7282
+ <xsl:template name="refine_license-statement-title-style">
7283
+ </xsl:template>
7284
+
7277
7285
  <xsl:attribute-set name="license-statement-p-style">
7278
7286
  </xsl:attribute-set> <!-- license-statement-p-style -->
7279
7287
 
@@ -7284,23 +7292,47 @@
7284
7292
  <xsl:attribute-set name="legal-statement-style">
7285
7293
  </xsl:attribute-set> <!-- legal-statement-style -->
7286
7294
 
7295
+ <xsl:template name="refine_legal-statement-style">
7296
+ </xsl:template>
7297
+
7287
7298
  <xsl:attribute-set name="legal-statement-title-style">
7288
7299
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7289
7300
  </xsl:attribute-set> <!-- legal-statement-title-style -->
7290
7301
 
7302
+ <xsl:template name="refine_legal-statement-title-style">
7303
+ </xsl:template>
7304
+
7291
7305
  <xsl:attribute-set name="legal-statement-p-style">
7292
7306
  </xsl:attribute-set> <!-- legal-statement-p-style -->
7293
7307
 
7308
+ <xsl:template name="refine_legal-statement-p-style">
7309
+ <xsl:if test="@align">
7310
+ <xsl:attribute name="text-align">
7311
+ <xsl:value-of select="@align"/>
7312
+ </xsl:attribute>
7313
+ </xsl:if>
7314
+ </xsl:template>
7315
+
7294
7316
  <xsl:attribute-set name="feedback-statement-style">
7295
7317
  </xsl:attribute-set> <!-- feedback-statement-style -->
7296
7318
 
7319
+ <xsl:template name="refine_feedback-statement-style">
7320
+ </xsl:template>
7321
+
7297
7322
  <xsl:attribute-set name="feedback-statement-title-style">
7298
7323
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7299
7324
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
7300
7325
 
7326
+ <xsl:template name="refine_feedback-statement-title-style">
7327
+
7328
+ </xsl:template>
7329
+
7301
7330
  <xsl:attribute-set name="feedback-statement-p-style">
7302
7331
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
7303
7332
 
7333
+ <xsl:template name="refine_feedback-statement-p-style">
7334
+ </xsl:template>
7335
+
7304
7336
  <!-- End boilerplate sections styles -->
7305
7337
 
7306
7338
  <!-- ================================= -->
@@ -7326,6 +7358,7 @@
7326
7358
 
7327
7359
  <xsl:template match="mn:license-statement">
7328
7360
  <fo:block xsl:use-attribute-sets="license-statement-style">
7361
+ <xsl:call-template name="refine_license-statement-style"/>
7329
7362
  <xsl:apply-templates/>
7330
7363
  </fo:block>
7331
7364
  </xsl:template> <!-- license-statement -->
@@ -7343,6 +7376,7 @@
7343
7376
  <xsl:template match="mn:legal-statement">
7344
7377
  <xsl:param name="isLegacy">false</xsl:param>
7345
7378
  <fo:block xsl:use-attribute-sets="legal-statement-style">
7379
+ <xsl:call-template name="refine_legal-statement-style"/>
7346
7380
  <xsl:apply-templates/>
7347
7381
  </fo:block>
7348
7382
  </xsl:template> <!-- legal-statement -->
@@ -7510,6 +7544,27 @@
7510
7544
  <xsl:attribute-set name="sourcecode-container-style">
7511
7545
  </xsl:attribute-set>
7512
7546
 
7547
+ <xsl:template name="refine_sourcecode-container-style">
7548
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
7549
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7550
+ </xsl:if>
7551
+
7552
+ <xsl:if test="ancestor::mn:example">
7553
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7554
+ </xsl:if>
7555
+
7556
+ <xsl:copy-of select="@id"/>
7557
+
7558
+ <xsl:if test="parent::mn:note">
7559
+ <xsl:attribute name="margin-left">
7560
+ <xsl:choose>
7561
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
7562
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7563
+ </xsl:choose>
7564
+ </xsl:attribute>
7565
+ </xsl:if>
7566
+ </xsl:template>
7567
+
7513
7568
  <xsl:attribute-set name="sourcecode-style">
7514
7569
  <xsl:attribute name="white-space">pre</xsl:attribute>
7515
7570
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -7519,6 +7574,12 @@
7519
7574
  <xsl:template name="refine_sourcecode-style">
7520
7575
  </xsl:template> <!-- refine_sourcecode-style -->
7521
7576
 
7577
+ <xsl:attribute-set name="sourcecode-number-style">
7578
+ </xsl:attribute-set>
7579
+
7580
+ <xsl:template name="refine_sourcecode-number-style">
7581
+ </xsl:template>
7582
+
7522
7583
  <xsl:attribute-set name="sourcecode-name-style">
7523
7584
  <xsl:attribute name="font-size">11pt</xsl:attribute>
7524
7585
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -7527,6 +7588,9 @@
7527
7588
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
7528
7589
  </xsl:attribute-set> <!-- sourcecode-name-style -->
7529
7590
 
7591
+ <xsl:template name="refine_sourcecode-name-style">
7592
+ </xsl:template>
7593
+
7530
7594
  <xsl:template name="add-zero-spaces-equal">
7531
7595
  <xsl:param name="text" select="."/>
7532
7596
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -7614,24 +7678,8 @@
7614
7678
  <xsl:otherwise>
7615
7679
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7616
7680
 
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"/>
7681
+ <xsl:call-template name="refine_sourcecode-container-style"/>
7626
7682
 
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
7683
  <fo:block-container margin-left="0mm" role="SKIP">
7636
7684
 
7637
7685
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -7958,6 +8006,7 @@
7958
8006
  <xsl:template match="mn:sourcecode/mn:fmt-name">
7959
8007
  <xsl:if test="normalize-space() != ''">
7960
8008
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
8009
+ <xsl:call-template name="refine_sourcecode-name-style"/>
7961
8010
  <xsl:apply-templates/>
7962
8011
  </fo:block>
7963
8012
  </xsl:if>
@@ -8004,11 +8053,30 @@
8004
8053
  <xsl:attribute-set name="pre-style">
8005
8054
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
8006
8055
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
8007
- </xsl:attribute-set>
8056
+ </xsl:attribute-set> <!-- pre-style -->
8057
+
8058
+ <xsl:template name="refine_pre-style">
8059
+ </xsl:template>
8008
8060
 
8009
8061
  <xsl:attribute-set name="tt-style">
8010
8062
  </xsl:attribute-set>
8011
8063
 
8064
+ <xsl:template name="refine_tt-style">
8065
+ <xsl:variable name="_font-size"> <!-- inherit -->
8066
+ </xsl:variable>
8067
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8068
+ <xsl:if test="$font-size != ''">
8069
+ <xsl:attribute name="font-size">
8070
+ <xsl:choose>
8071
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
8072
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
8073
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
8074
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
8075
+ </xsl:choose>
8076
+ </xsl:attribute>
8077
+ </xsl:if>
8078
+ </xsl:template>
8079
+
8012
8080
  <xsl:variable name="color-added-text">
8013
8081
  <xsl:text>rgb(0, 255, 0)</xsl:text>
8014
8082
  </xsl:variable>
@@ -8021,9 +8089,14 @@
8021
8089
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
8022
8090
  </xsl:attribute-set>
8023
8091
 
8092
+ <xsl:template name="refine_add-style">
8093
+ </xsl:template>
8094
+
8024
8095
  <xsl:variable name="add-style">
8025
- <add-style xsl:use-attribute-sets="add-style"/>
8026
- </xsl:variable>
8096
+ <add-style xsl:use-attribute-sets="add-style">
8097
+ <xsl:call-template name="refine_add-style"/>
8098
+ </add-style>
8099
+ </xsl:variable>
8027
8100
  <xsl:template name="append_add-style">
8028
8101
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
8029
8102
  </xsl:template>
@@ -8036,24 +8109,80 @@
8036
8109
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8037
8110
  </xsl:attribute-set>
8038
8111
 
8112
+ <xsl:template name="refine_del-style">
8113
+ </xsl:template>
8114
+
8115
+ <xsl:attribute-set name="strong-style">
8116
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
8117
+ </xsl:attribute-set>
8118
+
8119
+ <xsl:template name="refine_strong_style">
8120
+ <xsl:if test="not($vertical_layout = 'true')">
8121
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8122
+ </xsl:if>
8123
+ <xsl:if test="ancestor::*['preferred']">
8124
+ <xsl:attribute name="role">SKIP</xsl:attribute>
8125
+ </xsl:if>
8126
+ </xsl:template> <!-- refine_strong_style -->
8127
+
8128
+ <xsl:attribute-set name="em-style">
8129
+ <xsl:attribute name="font-style">italic</xsl:attribute>
8130
+ </xsl:attribute-set>
8131
+
8132
+ <xsl:template name="refine_em_style">
8133
+ </xsl:template> <!-- refine_em_style -->
8134
+
8135
+ <xsl:attribute-set name="sup-style">
8136
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8137
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
8138
+ </xsl:attribute-set>
8139
+
8140
+ <xsl:template name="refine_sup-style">
8141
+ </xsl:template>
8142
+
8143
+ <xsl:attribute-set name="sub-style">
8144
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8145
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
8146
+ </xsl:attribute-set>
8147
+
8148
+ <xsl:template name="refine_sub-style">
8149
+ </xsl:template>
8150
+
8151
+ <xsl:attribute-set name="underline-style">
8152
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
8153
+ </xsl:attribute-set>
8154
+
8155
+ <xsl:template name="refine_underline-style">
8156
+ </xsl:template>
8157
+
8158
+ <xsl:attribute-set name="hi-style">
8159
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
8160
+ </xsl:attribute-set>
8161
+
8162
+ <xsl:template name="refine_hi-style">
8163
+ </xsl:template>
8164
+
8165
+ <xsl:attribute-set name="strike-style">
8166
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
8167
+ </xsl:attribute-set>
8168
+
8169
+ <xsl:template name="refine_strike-style">
8170
+ </xsl:template>
8171
+
8039
8172
  <xsl:template match="mn:br">
8040
8173
  <xsl:value-of select="$linebreak"/>
8041
8174
  </xsl:template>
8042
8175
 
8043
- <xsl:template match="mn:em">
8044
- <fo:inline font-style="italic">
8045
- <xsl:call-template name="refine_italic_style"/>
8176
+ <xsl:template match="mn:em">
8177
+ <fo:inline xsl:use-attribute-sets="em-style">
8178
+ <xsl:call-template name="refine_em_style"/>
8046
8179
  <xsl:apply-templates/>
8047
8180
  </fo:inline>
8048
8181
  </xsl:template>
8049
8182
 
8050
- <xsl:template name="refine_italic_style">
8051
- </xsl:template>
8052
-
8053
8183
  <xsl:template match="mn:strong | *[local-name()='b']">
8054
8184
  <xsl:param name="split_keep-within-line"/>
8055
- <fo:inline font-weight="bold">
8056
-
8185
+ <fo:inline xsl:use-attribute-sets="strong-style">
8057
8186
  <xsl:call-template name="refine_strong_style"/>
8058
8187
 
8059
8188
  <xsl:apply-templates>
@@ -8062,47 +8191,27 @@
8062
8191
  </fo:inline>
8063
8192
  </xsl:template>
8064
8193
 
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
8194
  <xsl:template match="*[local-name()='padding']">
8075
8195
  <fo:inline padding-right="{@value}"> </fo:inline>
8076
8196
  </xsl:template>
8077
8197
 
8078
8198
  <xsl:template match="mn:sup">
8079
- <fo:inline font-size="80%" vertical-align="super">
8199
+ <fo:inline xsl:use-attribute-sets="sup-style">
8200
+ <xsl:call-template name="refine_sup-style"/>
8080
8201
  <xsl:apply-templates/>
8081
8202
  </fo:inline>
8082
8203
  </xsl:template>
8083
8204
 
8084
8205
  <xsl:template match="mn:sub">
8085
- <fo:inline font-size="80%" vertical-align="sub">
8206
+ <fo:inline xsl:use-attribute-sets="sub-style">
8207
+ <xsl:call-template name="refine_sub-style"/>
8086
8208
  <xsl:apply-templates/>
8087
8209
  </fo:inline>
8088
8210
  </xsl:template>
8089
8211
 
8090
8212
  <xsl:template match="mn:tt">
8091
8213
  <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>
8214
+ <xsl:call-template name="refine_tt-style"/>
8106
8215
  <xsl:apply-templates/>
8107
8216
  </fo:inline>
8108
8217
  </xsl:template> <!-- tt -->
@@ -8121,7 +8230,8 @@
8121
8230
  </xsl:template>
8122
8231
 
8123
8232
  <xsl:template match="mn:underline">
8124
- <fo:inline text-decoration="underline">
8233
+ <fo:inline xsl:use-attribute-sets="underline-style">
8234
+ <xsl:call-template name="refine_underline-style"/>
8125
8235
  <xsl:apply-templates/>
8126
8236
  </fo:inline>
8127
8237
  </xsl:template>
@@ -8279,6 +8389,7 @@
8279
8389
 
8280
8390
  <xsl:template match="mn:del">
8281
8391
  <fo:inline xsl:use-attribute-sets="del-style">
8392
+ <xsl:call-template name="refine_del-style"/>
8282
8393
  <xsl:apply-templates/>
8283
8394
  </fo:inline>
8284
8395
  </xsl:template>
@@ -8288,7 +8399,8 @@
8288
8399
 
8289
8400
  <!-- highlight text -->
8290
8401
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
8291
- <fo:inline background-color="yellow">
8402
+ <fo:inline xsl:use-attribute-sets="hi-style">
8403
+ <xsl:call-template name="refine_hi-style"/>
8292
8404
  <xsl:apply-templates/>
8293
8405
  </fo:inline>
8294
8406
  </xsl:template>
@@ -8374,7 +8486,8 @@
8374
8486
  </xsl:template>
8375
8487
 
8376
8488
  <xsl:template match="mn:strike">
8377
- <fo:inline text-decoration="line-through">
8489
+ <fo:inline xsl:use-attribute-sets="strike-style">
8490
+ <xsl:call-template name="refine_strike-style"/>
8378
8491
  <xsl:apply-templates/>
8379
8492
  </fo:inline>
8380
8493
  </xsl:template>
@@ -8462,6 +8575,7 @@
8462
8575
 
8463
8576
  <xsl:template match="mn:pre" name="pre">
8464
8577
  <fo:block xsl:use-attribute-sets="pre-style">
8578
+ <xsl:call-template name="refine_pre-style"/>
8465
8579
  <xsl:copy-of select="@id"/>
8466
8580
  <xsl:choose>
8467
8581
 
@@ -8492,22 +8606,40 @@
8492
8606
  <xsl:attribute-set name="permission-style">
8493
8607
  </xsl:attribute-set>
8494
8608
 
8609
+ <xsl:template name="refine_permission-style">
8610
+ </xsl:template>
8611
+
8495
8612
  <xsl:attribute-set name="permission-name-style">
8496
8613
  </xsl:attribute-set>
8497
8614
 
8615
+ <xsl:template name="refine_permission-name-style">
8616
+ </xsl:template>
8617
+
8498
8618
  <xsl:attribute-set name="permission-label-style">
8499
8619
  </xsl:attribute-set>
8500
8620
 
8621
+ <xsl:template name="refine_permission-label-style">
8622
+ </xsl:template>
8623
+
8501
8624
  <xsl:attribute-set name="requirement-style">
8502
8625
  </xsl:attribute-set>
8503
8626
 
8627
+ <xsl:template name="refine_requirement-style">
8628
+ </xsl:template>
8629
+
8504
8630
  <xsl:attribute-set name="requirement-name-style">
8505
8631
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8506
8632
  </xsl:attribute-set>
8507
8633
 
8634
+ <xsl:template name="refine_requirement-name-style">
8635
+ </xsl:template>
8636
+
8508
8637
  <xsl:attribute-set name="requirement-label-style">
8509
8638
  </xsl:attribute-set>
8510
8639
 
8640
+ <xsl:template name="refine_requirement-label-style">
8641
+ </xsl:template>
8642
+
8511
8643
  <xsl:attribute-set name="subject-style">
8512
8644
  </xsl:attribute-set>
8513
8645
 
@@ -8535,18 +8667,28 @@
8535
8667
  <xsl:attribute-set name="recommendation-style">
8536
8668
  </xsl:attribute-set>
8537
8669
 
8670
+ <xsl:template name="refine_recommendation-style">
8671
+ </xsl:template>
8672
+
8538
8673
  <xsl:attribute-set name="recommendation-name-style">
8539
8674
  </xsl:attribute-set>
8540
8675
 
8676
+ <xsl:template name="refine_recommendation-name-style">
8677
+ </xsl:template>
8678
+
8541
8679
  <xsl:attribute-set name="recommendation-label-style">
8542
8680
  </xsl:attribute-set>
8543
8681
 
8682
+ <xsl:template name="refine_recommendation-label-style">
8683
+ </xsl:template>
8684
+
8544
8685
  <!-- ========== -->
8545
8686
  <!-- permission -->
8546
8687
  <!-- ========== -->
8547
8688
  <xsl:template match="mn:permission">
8548
8689
  <xsl:call-template name="setNamedDestination"/>
8549
8690
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
8691
+ <xsl:call-template name="refine_permission-style"/>
8550
8692
  <xsl:apply-templates select="mn:fmt-name"/>
8551
8693
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8552
8694
  </fo:block>
@@ -8555,6 +8697,7 @@
8555
8697
  <xsl:template match="mn:permission/mn:fmt-name">
8556
8698
  <xsl:if test="normalize-space() != ''">
8557
8699
  <fo:block xsl:use-attribute-sets="permission-name-style">
8700
+ <xsl:call-template name="refine_permission-name-style"/>
8558
8701
  <xsl:apply-templates/>
8559
8702
  </fo:block>
8560
8703
  </xsl:if>
@@ -8562,6 +8705,7 @@
8562
8705
 
8563
8706
  <xsl:template match="mn:permission/mn:label">
8564
8707
  <fo:block xsl:use-attribute-sets="permission-label-style">
8708
+ <xsl:call-template name="refine_permission-label-style"/>
8565
8709
  <xsl:apply-templates/>
8566
8710
  </fo:block>
8567
8711
  </xsl:template>
@@ -8574,6 +8718,7 @@
8574
8718
  <xsl:template match="mn:requirement">
8575
8719
  <xsl:call-template name="setNamedDestination"/>
8576
8720
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
8721
+ <xsl:call-template name="refine_requirement-style"/>
8577
8722
  <xsl:apply-templates select="mn:fmt-name"/>
8578
8723
  <xsl:apply-templates select="mn:label"/>
8579
8724
  <xsl:apply-templates select="@obligation"/>
@@ -8586,6 +8731,7 @@
8586
8731
  <xsl:if test="normalize-space() != ''">
8587
8732
 
8588
8733
  <fo:block xsl:use-attribute-sets="requirement-name-style">
8734
+ <xsl:call-template name="refine_requirement-name-style"/>
8589
8735
  <xsl:apply-templates/>
8590
8736
  </fo:block>
8591
8737
  </xsl:if>
@@ -8593,6 +8739,7 @@
8593
8739
 
8594
8740
  <xsl:template match="mn:requirement/mn:label">
8595
8741
  <fo:block xsl:use-attribute-sets="requirement-label-style">
8742
+ <xsl:call-template name="refine_requirement-label-style"/>
8596
8743
  <xsl:apply-templates/>
8597
8744
  </fo:block>
8598
8745
  </xsl:template>
@@ -8618,6 +8765,7 @@
8618
8765
  <xsl:template match="mn:recommendation">
8619
8766
  <xsl:call-template name="setNamedDestination"/>
8620
8767
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
8768
+ <xsl:call-template name="refine_recommendation-style"/>
8621
8769
  <xsl:apply-templates select="mn:fmt-name"/>
8622
8770
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8623
8771
  </fo:block>
@@ -8627,6 +8775,7 @@
8627
8775
  <xsl:if test="normalize-space() != ''">
8628
8776
 
8629
8777
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
8778
+ <xsl:call-template name="refine_recommendation-name-style"/>
8630
8779
  <xsl:apply-templates/>
8631
8780
  </fo:block>
8632
8781
  </xsl:if>
@@ -8634,6 +8783,7 @@
8634
8783
 
8635
8784
  <xsl:template match="mn:recommendation/mn:label">
8636
8785
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
8786
+ <xsl:call-template name="refine_recommendation-label-style"/>
8637
8787
  <xsl:apply-templates/>
8638
8788
  </fo:block>
8639
8789
  </xsl:template>
@@ -8815,38 +8965,81 @@
8815
8965
  <xsl:attribute name="space-before">12pt</xsl:attribute>
8816
8966
  </xsl:attribute-set> <!-- term-style -->
8817
8967
 
8968
+ <xsl:template name="refine_term-style">
8969
+ </xsl:template>
8970
+
8818
8971
  <xsl:attribute-set name="term-name-style">
8819
8972
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8820
8973
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8821
8974
  <xsl:attribute name="space-after">2pt</xsl:attribute>
8822
8975
  </xsl:attribute-set> <!-- term-name-style -->
8823
8976
 
8824
- <xsl:attribute-set name="preferred-block-style">
8977
+ <xsl:template name="refine_term-name-style">
8978
+ <xsl:if test="not($vertical_layout = 'true')">
8979
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8980
+ </xsl:if>
8981
+ </xsl:template>
8982
+
8983
+ <xsl:attribute-set name="preferred-style">
8984
+ </xsl:attribute-set> <!-- preferred-style -->
8985
+
8986
+ <xsl:template name="refine_preferred-style">
8987
+ </xsl:template>
8988
+
8989
+ <xsl:attribute-set name="preferred-block-style">
8825
8990
  </xsl:attribute-set> <!-- preferred-block-style -->
8826
8991
 
8992
+ <xsl:template name="refine_preferred-block-style">
8993
+ <xsl:if test="$vertical_layout = 'true'">
8994
+ <xsl:attribute name="letter-spacing">1mm</xsl:attribute>
8995
+ <xsl:attribute name="margin-left">-6mm</xsl:attribute>
8996
+ </xsl:if>
8997
+ </xsl:template>
8998
+
8827
8999
  <xsl:attribute-set name="preferred-term-style">
8828
9000
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
8829
9001
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8830
9002
  <xsl:attribute name="font-weight">normal</xsl:attribute>
8831
9003
  </xsl:attribute-set> <!-- preferred-term-style -->
8832
9004
 
9005
+ <xsl:template name="refine_preferred-term-style">
9006
+ <xsl:if test="mn:strong">
9007
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
9008
+ </xsl:if>
9009
+ </xsl:template>
9010
+
8833
9011
  <xsl:attribute-set name="domain-style">
8834
9012
  </xsl:attribute-set> <!-- domain-style -->
8835
9013
 
9014
+ <xsl:template name="refine_domain-style">
9015
+ </xsl:template>
9016
+
8836
9017
  <xsl:attribute-set name="admitted-style">
8837
9018
  </xsl:attribute-set> <!-- admitted-style -->
8838
9019
 
9020
+ <xsl:template name="refine_admitted-style">
9021
+ </xsl:template>
9022
+
8839
9023
  <xsl:attribute-set name="deprecates-style">
8840
9024
  </xsl:attribute-set> <!-- deprecates-style -->
8841
9025
 
9026
+ <xsl:template name="refine_deprecates-style">
9027
+ </xsl:template>
9028
+
8842
9029
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
8843
9030
  </xsl:attribute-set>
8844
9031
 
9032
+ <xsl:template name="refine_related-block-style">
9033
+ </xsl:template>
9034
+
8845
9035
  <xsl:attribute-set name="definition-style">
8846
9036
  <xsl:attribute name="space-before">2pt</xsl:attribute>
8847
9037
  <xsl:attribute name="space-after">2pt</xsl:attribute>
8848
9038
  </xsl:attribute-set> <!-- definition-style -->
8849
9039
 
9040
+ <xsl:template name="refine_definition-style">
9041
+ </xsl:template>
9042
+
8850
9043
  <xsl:attribute-set name="termsource-style">
8851
9044
  <xsl:attribute name="margin-left">6mm</xsl:attribute>
8852
9045
  </xsl:attribute-set> <!-- termsource-style -->
@@ -8857,9 +9050,15 @@
8857
9050
  <xsl:attribute-set name="termsource-text-style">
8858
9051
  </xsl:attribute-set> <!-- termsource-text-style -->
8859
9052
 
9053
+ <xsl:template name="refine_termsource-text-style">
9054
+ </xsl:template>
9055
+
8860
9056
  <xsl:attribute-set name="origin-style">
8861
9057
  </xsl:attribute-set> <!-- origin-style -->
8862
9058
 
9059
+ <xsl:template name="refine_origin-style">
9060
+ </xsl:template>
9061
+
8863
9062
  <!-- ====== -->
8864
9063
  <!-- term -->
8865
9064
  <!-- ====== -->
@@ -8875,9 +9074,8 @@
8875
9074
  <xsl:template match="mn:term">
8876
9075
  <xsl:call-template name="setNamedDestination"/>
8877
9076
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
9077
+ <xsl:call-template name="refine_term-style"/>
8878
9078
 
8879
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
8880
- </xsl:if>
8881
9079
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8882
9080
  </fo:block>
8883
9081
  </xsl:template>
@@ -8953,6 +9151,7 @@
8953
9151
  <!-- text SOURCE: -->
8954
9152
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
8955
9153
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
9154
+ <xsl:call-template name="refine_termsource-text-style"/>
8956
9155
  <xsl:value-of select="."/>
8957
9156
  </fo:inline>
8958
9157
  </xsl:template>
@@ -8965,6 +9164,7 @@
8965
9164
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
8966
9165
  </xsl:if>
8967
9166
  <fo:inline xsl:use-attribute-sets="origin-style">
9167
+ <xsl:call-template name="refine_origin-style"/>
8968
9168
  <xsl:apply-templates/>
8969
9169
  </fo:inline>
8970
9170
  </fo:basic-link>
@@ -9013,17 +9213,13 @@
9013
9213
  <xsl:call-template name="getLevelTermName"/>
9014
9214
  </xsl:variable>
9015
9215
  <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>
9216
+
9217
+ <xsl:call-template name="refine_preferred-block-style"/>
9020
9218
 
9021
9219
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
9022
9220
 
9023
9221
  <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>
9222
+ <xsl:call-template name="refine_term-name-style"/>
9027
9223
 
9028
9224
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
9029
9225
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -9034,7 +9230,7 @@
9034
9230
  </xsl:if>
9035
9231
 
9036
9232
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9037
- <xsl:call-template name="setStyle_preferred"/>
9233
+ <xsl:call-template name="refine_preferred-term-style"/>
9038
9234
  <xsl:if test="$vertical_layout = 'true'">
9039
9235
  <xsl:attribute name="margin-left">6mm</xsl:attribute>
9040
9236
  <xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
@@ -9063,22 +9259,18 @@
9063
9259
 
9064
9260
  <xsl:template match="mn:fmt-admitted">
9065
9261
  <fo:block xsl:use-attribute-sets="admitted-style">
9262
+ <xsl:call-template name="refine_admitted-style"/>
9066
9263
  <xsl:apply-templates/>
9067
9264
  </fo:block>
9068
9265
  </xsl:template>
9069
9266
 
9070
9267
  <xsl:template match="mn:fmt-deprecates">
9071
9268
  <fo:block xsl:use-attribute-sets="deprecates-style">
9269
+ <xsl:call-template name="refine_deprecates-style"/>
9072
9270
  <xsl:apply-templates/>
9073
9271
  </fo:block>
9074
9272
  </xsl:template>
9075
9273
 
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
9274
  <!-- 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
9275
  <!-- in metanorma xml preferred terms delimited by semicolons -->
9084
9276
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -9088,6 +9280,7 @@
9088
9280
 
9089
9281
  <xsl:template match="mn:fmt-related">
9090
9282
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
9283
+ <xsl:call-template name="refine_related-block-style"/>
9091
9284
  <xsl:apply-templates/>
9092
9285
  </fo:block>
9093
9286
  </xsl:template>
@@ -9102,6 +9295,7 @@
9102
9295
  <!-- ========== -->
9103
9296
  <xsl:template match="mn:fmt-definition">
9104
9297
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9298
+ <xsl:call-template name="refine_definition-style"/>
9105
9299
  <xsl:apply-templates/>
9106
9300
  </fo:block>
9107
9301
  </xsl:template>
@@ -9152,6 +9346,9 @@
9152
9346
  <xsl:attribute-set name="example-body-style">
9153
9347
  </xsl:attribute-set> <!-- example-body-style -->
9154
9348
 
9349
+ <xsl:template name="refine_example-body-style">
9350
+ </xsl:template>
9351
+
9155
9352
  <xsl:attribute-set name="example-name-style">
9156
9353
  </xsl:attribute-set> <!-- example-name-style -->
9157
9354
 
@@ -9204,6 +9401,8 @@
9204
9401
  <xsl:when test="contains($element, 'block')">
9205
9402
  <fo:block xsl:use-attribute-sets="example-p-style">
9206
9403
 
9404
+ <xsl:call-template name="refine_example-p-style"/>
9405
+
9207
9406
  <xsl:apply-templates/>
9208
9407
  </fo:block>
9209
9408
  </xsl:when>
@@ -9394,6 +9593,12 @@
9394
9593
  </xsl:if>
9395
9594
  </xsl:template> <!-- refine_table-style -->
9396
9595
 
9596
+ <xsl:attribute-set name="table-number-style">
9597
+ </xsl:attribute-set>
9598
+
9599
+ <xsl:template name="refine_table-number-style">
9600
+ </xsl:template>
9601
+
9397
9602
  <xsl:attribute-set name="table-name-style">
9398
9603
  <xsl:attribute name="role">Caption</xsl:attribute>
9399
9604
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -9531,6 +9736,9 @@
9531
9736
  <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
9532
9737
  </xsl:attribute-set> <!-- table-fn-number-style -->
9533
9738
 
9739
+ <xsl:template name="refine_table-fn-number-style">
9740
+ </xsl:template>
9741
+
9534
9742
  <xsl:attribute-set name="table-fmt-fn-label-style">
9535
9743
  <xsl:attribute name="font-size">80%</xsl:attribute>
9536
9744
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -9544,30 +9752,12 @@
9544
9752
  </xsl:if>
9545
9753
  </xsl:template>
9546
9754
 
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
9755
  <xsl:attribute-set name="table-fn-body-style">
9553
9756
  </xsl:attribute-set>
9554
9757
 
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">
9758
+ <xsl:template name="refine_table-fn-body-style">
9565
9759
  </xsl:template>
9566
9760
 
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
9761
  <!-- ========================== -->
9572
9762
  <!-- END Table styles -->
9573
9763
  <!-- ========================== -->
@@ -9884,7 +10074,7 @@
9884
10074
 
9885
10075
  </fo:block>
9886
10076
 
9887
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
10077
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
9888
10078
  <xsl:if test="$continued = 'true'">
9889
10079
 
9890
10080
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -10794,6 +10984,7 @@
10794
10984
  </fo:block>
10795
10985
  </fo:list-item-label>
10796
10986
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
10987
+ <xsl:call-template name="refine_table-fn-body-style"/>
10797
10988
  <fo:block>
10798
10989
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10799
10990
  </fo:block>
@@ -10872,6 +11063,7 @@
10872
11063
  </fo:block>
10873
11064
  </fo:list-item-label>
10874
11065
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
11066
+ <xsl:call-template name="refine_table-fn-body-style"/>
10875
11067
  <fo:block>
10876
11068
  <!-- <xsl:copy-of select="./node()"/> -->
10877
11069
  <xsl:apply-templates/>
@@ -10893,6 +11085,7 @@
10893
11085
  <xsl:param name="process">false</xsl:param>
10894
11086
  <xsl:if test="$process = 'true'">
10895
11087
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
11088
+ <xsl:call-template name="refine_table-fn-number-style"/>
10896
11089
 
10897
11090
  <!-- tab is padding-right -->
10898
11091
  <xsl:apply-templates select=".//mn:tab">
@@ -11765,9 +11958,18 @@
11765
11958
  <xsl:attribute-set name="dl-block-style">
11766
11959
  </xsl:attribute-set>
11767
11960
 
11961
+ <xsl:template name="refine_dl-block-style">
11962
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
11963
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
11964
+ </xsl:if>
11965
+ </xsl:template>
11966
+
11768
11967
  <xsl:attribute-set name="dt-row-style">
11769
11968
  </xsl:attribute-set>
11770
11969
 
11970
+ <xsl:template name="refine_dt-row-style">
11971
+ </xsl:template>
11972
+
11771
11973
  <xsl:attribute-set name="dt-cell-style">
11772
11974
  </xsl:attribute-set>
11773
11975
 
@@ -11787,6 +11989,9 @@
11787
11989
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11788
11990
  </xsl:attribute-set> <!-- dl-name-style -->
11789
11991
 
11992
+ <xsl:template name="refine_dl-name-style">
11993
+ </xsl:template>
11994
+
11790
11995
  <xsl:attribute-set name="dd-cell-style">
11791
11996
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
11792
11997
  </xsl:attribute-set>
@@ -11825,9 +12030,7 @@
11825
12030
  <!-- <dl><xsl:copy-of select="."/></dl> -->
11826
12031
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
11827
12032
 
11828
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
11829
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
11830
- </xsl:if>
12033
+ <xsl:call-template name="refine_dl-block-style"/>
11831
12034
 
11832
12035
  <xsl:call-template name="setBlockSpanAll"/>
11833
12036
  <xsl:if test="not(ancestor::mn:quote)">
@@ -12129,6 +12332,8 @@
12129
12332
  <xsl:if test="$process = 'true'">
12130
12333
  <fo:block xsl:use-attribute-sets="dl-name-style">
12131
12334
 
12335
+ <xsl:call-template name="refine_dl-name-style"/>
12336
+
12132
12337
  <xsl:apply-templates/>
12133
12338
  </fo:block>
12134
12339
  </xsl:if>
@@ -12317,6 +12522,8 @@
12317
12522
  <xsl:param name="split_keep-within-line"/>
12318
12523
 
12319
12524
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
12525
+ <xsl:call-template name="refine_dt-row-style"/>
12526
+
12320
12527
  <xsl:call-template name="insert_dt_cell">
12321
12528
  <xsl:with-param name="key_iso" select="$key_iso"/>
12322
12529
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -12534,15 +12741,22 @@
12534
12741
  <xsl:attribute-set name="appendix-style">
12535
12742
  </xsl:attribute-set>
12536
12743
 
12744
+ <xsl:template name="refine_appendix-style">
12745
+ </xsl:template>
12746
+
12537
12747
  <xsl:attribute-set name="appendix-example-style">
12538
12748
  </xsl:attribute-set>
12539
12749
 
12750
+ <xsl:template name="refine_appendix-example-style">
12751
+ </xsl:template>
12752
+
12540
12753
  <!-- ======================== -->
12541
12754
  <!-- Appendix processing -->
12542
12755
  <!-- ======================== -->
12543
12756
  <xsl:template match="mn:appendix">
12544
12757
  <xsl:call-template name="setNamedDestination"/>
12545
12758
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
12759
+ <xsl:call-template name="refine_appendix-style"/>
12546
12760
  <xsl:apply-templates select="mn:fmt-title"/>
12547
12761
  </fo:block>
12548
12762
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -12561,13 +12775,26 @@
12561
12775
  <xsl:template match="mn:appendix//mn:example" priority="2">
12562
12776
  <xsl:call-template name="setNamedDestination"/>
12563
12777
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
12778
+ <xsl:call-template name="refine_appendix-example-style"/>
12564
12779
  <xsl:apply-templates select="mn:fmt-name"/>
12565
12780
  </fo:block>
12566
12781
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
12567
12782
  </xsl:template>
12568
12783
 
12569
12784
  <xsl:attribute-set name="xref-style">
12570
- </xsl:attribute-set>
12785
+ </xsl:attribute-set> <!-- xref-style -->
12786
+
12787
+ <xsl:template name="refine_xref-style">
12788
+ <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])">
12789
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
12790
+ </xsl:if>
12791
+ <xsl:if test="not($vertical_layout = 'true')">
12792
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
12793
+ </xsl:if>
12794
+ <xsl:if test="parent::mn:add">
12795
+ <xsl:call-template name="append_add-style"/>
12796
+ </xsl:if>
12797
+ </xsl:template> <!-- refine_xref-style -->
12571
12798
 
12572
12799
  <xsl:template match="mn:fmt-xref">
12573
12800
  <xsl:call-template name="insert_basic_link">
@@ -12576,15 +12803,8 @@
12576
12803
  <xsl:call-template name="getAltText"/>
12577
12804
  </xsl:variable>
12578
12805
  <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>
12806
+ <xsl:call-template name="refine_xref-style"/>
12807
+
12588
12808
  <xsl:apply-templates/>
12589
12809
  </fo:basic-link>
12590
12810
  </xsl:with-param>
@@ -12693,16 +12913,16 @@
12693
12913
  <xsl:attribute-set name="note-style">
12694
12914
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
12695
12915
  <xsl:attribute name="space-before">2pt</xsl:attribute>
12696
- </xsl:attribute-set>
12916
+ </xsl:attribute-set> <!-- note-style -->
12697
12917
 
12698
12918
  <xsl:template name="refine_note-style">
12699
- </xsl:template>
12919
+ </xsl:template> <!-- refine_note-style -->
12700
12920
 
12701
12921
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
12702
12922
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
12703
12923
 
12704
12924
  <xsl:attribute-set name="note-name-style">
12705
- </xsl:attribute-set>
12925
+ </xsl:attribute-set> <!-- note-name-style -->
12706
12926
 
12707
12927
  <xsl:template name="refine_note-name-style">
12708
12928
  <xsl:if test="not($vertical_layout = 'true')">
@@ -12722,19 +12942,22 @@
12722
12942
  </xsl:template> <!-- refine_table-note-name-style -->
12723
12943
 
12724
12944
  <xsl:attribute-set name="note-p-style">
12725
- </xsl:attribute-set>
12945
+ </xsl:attribute-set> <!-- note-p-style -->
12946
+
12947
+ <xsl:template name="refine_note-p-style">
12948
+ </xsl:template>
12726
12949
 
12727
12950
  <xsl:attribute-set name="termnote-style">
12728
12951
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
12729
12952
  <xsl:attribute name="space-before">4pt</xsl:attribute>
12730
12953
  <xsl:attribute name="space-after">4pt</xsl:attribute>
12731
- </xsl:attribute-set>
12954
+ </xsl:attribute-set> <!-- termnote-style -->
12732
12955
 
12733
12956
  <xsl:template name="refine_termnote-style">
12734
12957
  </xsl:template> <!-- refine_termnote-style -->
12735
12958
 
12736
12959
  <xsl:attribute-set name="termnote-name-style">
12737
- </xsl:attribute-set>
12960
+ </xsl:attribute-set> <!-- termnote-name-style -->
12738
12961
 
12739
12962
  <xsl:template name="refine_termnote-name-style">
12740
12963
  <xsl:if test="not($vertical_layout = 'true')">
@@ -12745,6 +12968,9 @@
12745
12968
  <xsl:attribute-set name="termnote-p-style">
12746
12969
  </xsl:attribute-set>
12747
12970
 
12971
+ <xsl:template name="refine_termnote-p-style">
12972
+ </xsl:template>
12973
+
12748
12974
  <!-- ====== -->
12749
12975
  <!-- note -->
12750
12976
  <!-- termnote -->
@@ -12797,11 +13023,13 @@
12797
13023
  <xsl:choose>
12798
13024
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
12799
13025
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
13026
+ <xsl:call-template name="refine_note-p-style"/>
12800
13027
  <xsl:apply-templates/>
12801
13028
  </fo:inline>
12802
13029
  </xsl:when>
12803
13030
  <xsl:otherwise>
12804
13031
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
13032
+ <xsl:call-template name="refine_note-p-style"/>
12805
13033
  <xsl:apply-templates/>
12806
13034
  </fo:block>
12807
13035
  </xsl:otherwise>
@@ -12893,11 +13121,13 @@
12893
13121
  <xsl:choose>
12894
13122
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
12895
13123
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
13124
+ <xsl:call-template name="refine_termnote-p-style"/>
12896
13125
  <xsl:apply-templates/>
12897
13126
  </fo:inline>
12898
13127
  </xsl:when>
12899
13128
  <xsl:otherwise>
12900
13129
  <fo:block xsl:use-attribute-sets="termnote-p-style">
13130
+ <xsl:call-template name="refine_termnote-p-style"/>
12901
13131
  <xsl:apply-templates/>
12902
13132
  </fo:block>
12903
13133
  </xsl:otherwise>
@@ -12912,7 +13142,7 @@
12912
13142
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
12913
13143
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
12914
13144
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
12915
- </xsl:attribute-set>
13145
+ </xsl:attribute-set> <!-- quote-style -->
12916
13146
 
12917
13147
  <xsl:template name="refine_quote-style">
12918
13148
  <xsl:if test="ancestor::mn:li">
@@ -12924,6 +13154,9 @@
12924
13154
  <xsl:attribute name="text-align">right</xsl:attribute>
12925
13155
  </xsl:attribute-set>
12926
13156
 
13157
+ <xsl:template name="refine_quote-source-style">
13158
+ </xsl:template>
13159
+
12927
13160
  <!-- ====== -->
12928
13161
  <!-- quote -->
12929
13162
  <!-- source -->
@@ -12952,6 +13185,7 @@
12952
13185
  </fo:block-container>
12953
13186
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
12954
13187
  <fo:block xsl:use-attribute-sets="quote-source-style">
13188
+ <xsl:call-template name="refine_quote-source-style"/>
12955
13189
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
12956
13190
  <xsl:apply-templates select="mn:author"/>
12957
13191
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -13081,13 +13315,22 @@
13081
13315
  <xsl:attribute-set name="figure-style">
13082
13316
  </xsl:attribute-set>
13083
13317
 
13318
+ <xsl:template name="refine_figure-style">
13319
+ </xsl:template>
13320
+
13321
+ <xsl:attribute-set name="figure-number-style">
13322
+ </xsl:attribute-set>
13323
+
13324
+ <xsl:template name="refine_figure-number-style">
13325
+ </xsl:template>
13326
+
13084
13327
  <xsl:attribute-set name="figure-name-style">
13085
13328
  <xsl:attribute name="role">Caption</xsl:attribute>
13086
13329
  <xsl:attribute name="text-align">center</xsl:attribute>
13087
13330
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
13088
13331
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13089
13332
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
13090
- </xsl:attribute-set>
13333
+ </xsl:attribute-set> <!-- figure-name-style -->
13091
13334
 
13092
13335
  <xsl:template name="refine_figure-name-style">
13093
13336
  <xsl:if test="ancestor::mn:figure">
@@ -13102,7 +13345,7 @@
13102
13345
  <xsl:attribute-set name="image-style">
13103
13346
  <xsl:attribute name="role">SKIP</xsl:attribute>
13104
13347
  <xsl:attribute name="text-align">center</xsl:attribute>
13105
- </xsl:attribute-set>
13348
+ </xsl:attribute-set> <!-- image-style -->
13106
13349
 
13107
13350
  <xsl:template name="refine_image-style">
13108
13351
  <xsl:if test="$vertical_layout = 'true'">
@@ -13114,14 +13357,51 @@
13114
13357
  <xsl:attribute name="width">100%</xsl:attribute>
13115
13358
  <xsl:attribute name="content-height">100%</xsl:attribute>
13116
13359
  <xsl:attribute name="scaling">uniform</xsl:attribute>
13117
- </xsl:attribute-set>
13360
+ </xsl:attribute-set> <!-- image-graphic-style -->
13361
+
13362
+ <xsl:template name="refine_image-graphic-style">
13363
+ </xsl:template>
13118
13364
 
13119
13365
  <xsl:attribute-set name="figure-source-style">
13120
13366
  </xsl:attribute-set>
13121
13367
 
13368
+ <xsl:template name="refine_figure-source-style">
13369
+ </xsl:template>
13370
+
13122
13371
  <xsl:attribute-set name="figure-pseudocode-p-style">
13123
13372
  </xsl:attribute-set>
13124
13373
 
13374
+ <xsl:template name="refine_figure-pseudocode-p-style">
13375
+ </xsl:template>
13376
+
13377
+ <xsl:attribute-set name="figure-fn-number-style">
13378
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
13379
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
13380
+
13381
+ <xsl:template name="refine_figure-fn-number-style">
13382
+ </xsl:template>
13383
+
13384
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
13385
+ <xsl:attribute name="font-size">80%</xsl:attribute>
13386
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
13387
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
13388
+
13389
+ <xsl:template name="refine_figure-fmt-fn-label-style">
13390
+ </xsl:template>
13391
+
13392
+ <xsl:attribute-set name="figure-fn-body-style">
13393
+ <xsl:attribute name="text-align">justify</xsl:attribute>
13394
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13395
+ </xsl:attribute-set>
13396
+
13397
+ <xsl:template name="refine_figure-fn-body-style">
13398
+ <xsl:variable name="key_iso">
13399
+ </xsl:variable>
13400
+ <xsl:if test="normalize-space($key_iso) = 'true'">
13401
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
13402
+ </xsl:if>
13403
+ </xsl:template>
13404
+
13125
13405
  <!-- ============================ -->
13126
13406
  <!-- figure's footnotes rendering -->
13127
13407
  <!-- ============================ -->
@@ -13234,9 +13514,8 @@
13234
13514
  </fo:table-cell>
13235
13515
  <fo:table-cell>
13236
13516
  <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>
13517
+ <xsl:call-template name="refine_figure-fn-body-style"/>
13518
+
13240
13519
  <!-- <xsl:copy-of select="./node()"/> -->
13241
13520
  <xsl:apply-templates/>
13242
13521
  </fo:block>
@@ -13254,6 +13533,7 @@
13254
13533
  <xsl:param name="process">false</xsl:param>
13255
13534
  <xsl:if test="$process = 'true'">
13256
13535
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
13536
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13257
13537
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
13258
13538
 
13259
13539
  <!-- tab is padding-right -->
@@ -13291,6 +13571,7 @@
13291
13571
  <xsl:attribute name="font-size">10pt</xsl:attribute>
13292
13572
  </xsl:if>
13293
13573
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
13574
+ <xsl:call-template name="refine_figure-fn-number-style"/>
13294
13575
  <!-- <xsl:value-of select="@reference"/> -->
13295
13576
  <xsl:apply-templates/>
13296
13577
  </fo:inline>
@@ -13341,6 +13622,8 @@
13341
13622
 
13342
13623
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
13343
13624
 
13625
+ <xsl:call-template name="refine_figure-style"/>
13626
+
13344
13627
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
13345
13628
  <xsl:call-template name="setIDforNamedDestination"/>
13346
13629
  </xsl:for-each>
@@ -13395,6 +13678,7 @@
13395
13678
 
13396
13679
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
13397
13680
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
13681
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
13398
13682
  <xsl:apply-templates/>
13399
13683
  </fo:block>
13400
13684
  </xsl:template>
@@ -13524,6 +13808,8 @@
13524
13808
  </xsl:variable>
13525
13809
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
13526
13810
 
13811
+ <xsl:call-template name="refine_image-graphic-style"/>
13812
+
13527
13813
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
13528
13814
  <xsl:variable name="scale">
13529
13815
  <xsl:call-template name="getImageScale">
@@ -14231,6 +14517,9 @@
14231
14517
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
14232
14518
  </xsl:attribute-set> <!-- formula-style -->
14233
14519
 
14520
+ <xsl:template name="refine_formula-style">
14521
+ </xsl:template>
14522
+
14234
14523
  <xsl:attribute-set name="formula-stem-block-style">
14235
14524
  <xsl:attribute name="text-align">center</xsl:attribute>
14236
14525
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -14299,6 +14588,8 @@
14299
14588
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
14300
14589
  <fo:block xsl:use-attribute-sets="formula-style">
14301
14590
 
14591
+ <xsl:call-template name="refine_formula-style"/>
14592
+
14302
14593
  <fo:table table-layout="fixed" width="100%">
14303
14594
  <fo:table-column column-width="95%"/>
14304
14595
  <fo:table-column column-width="5%"/>
@@ -14718,6 +15009,9 @@
14718
15009
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
14719
15010
  </xsl:attribute-set> <!-- list-name-style -->
14720
15011
 
15012
+ <xsl:template name="refine_list-name-style">
15013
+ </xsl:template>
15014
+
14721
15015
  <xsl:attribute-set name="list-item-style">
14722
15016
  </xsl:attribute-set>
14723
15017
 
@@ -15045,6 +15339,7 @@
15045
15339
  <xsl:param name="process">false</xsl:param>
15046
15340
  <xsl:if test="$process = 'true'">
15047
15341
  <fo:block xsl:use-attribute-sets="list-name-style">
15342
+ <xsl:call-template name="refine_list-name-style"/>
15048
15343
  <xsl:apply-templates/>
15049
15344
  </fo:block>
15050
15345
  </xsl:if>
@@ -15105,38 +15400,67 @@
15105
15400
  <!-- END Lists processing -->
15106
15401
  <!-- ===================================== -->
15107
15402
 
15403
+ <xsl:attribute-set name="footnote-separator-leader-style">
15404
+ </xsl:attribute-set>
15405
+
15406
+ <xsl:template name="refine_footnote-separator-leader-style">
15407
+ </xsl:template>
15408
+
15409
+ <xsl:attribute-set name="fn-container-body-style">
15410
+ <xsl:attribute name="text-indent">0</xsl:attribute>
15411
+ <xsl:attribute name="start-indent">0</xsl:attribute>
15412
+ </xsl:attribute-set>
15413
+
15414
+ <xsl:template name="refine_fn-container-body-style">
15415
+ </xsl:template>
15416
+
15108
15417
  <xsl:attribute-set name="fn-reference-style">
15109
15418
  <xsl:attribute name="font-size">80%</xsl:attribute>
15110
15419
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15111
15420
  <xsl:attribute name="font-size">67%</xsl:attribute>
15112
15421
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15113
15422
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15114
-
15115
- </xsl:attribute-set>
15423
+ </xsl:attribute-set> <!-- fn-reference-style -->
15116
15424
 
15117
15425
  <xsl:template name="refine_fn-reference-style">
15118
15426
  <xsl:if test="not($vertical_layout = 'true')">
15119
15427
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15120
15428
  </xsl:if>
15429
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
15430
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
15121
15431
  </xsl:template> <!-- refine_fn-reference-style -->
15122
15432
 
15123
15433
  <xsl:attribute-set name="fn-style">
15124
15434
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15125
15435
  </xsl:attribute-set>
15126
15436
 
15437
+ <xsl:template name="refine_fn-style">
15438
+ </xsl:template>
15439
+
15127
15440
  <xsl:attribute-set name="fn-num-style">
15128
15441
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
15129
15442
  <xsl:attribute name="font-size">67%</xsl:attribute>
15130
15443
  <xsl:attribute name="font-weight">bold</xsl:attribute>
15131
15444
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15132
- </xsl:attribute-set>
15445
+ </xsl:attribute-set> <!-- fn-num-style -->
15446
+
15447
+ <xsl:template name="refine_fn-num-style">
15448
+ <xsl:if test="not($vertical_layout = 'true')">
15449
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15450
+ </xsl:if>
15451
+ <xsl:if test="$vertical_layout = 'true'">
15452
+ <xsl:attribute name="vertical-align">baseline</xsl:attribute>
15453
+ <xsl:attribute name="font-size">80%</xsl:attribute>
15454
+ <xsl:attribute name="baseline-shift">20%</xsl:attribute>
15455
+ </xsl:if>
15456
+ </xsl:template>
15133
15457
 
15134
15458
  <xsl:attribute-set name="fn-body-style">
15135
15459
  <xsl:attribute name="font-weight">normal</xsl:attribute>
15136
15460
  <xsl:attribute name="font-style">normal</xsl:attribute>
15137
15461
  <xsl:attribute name="text-indent">0</xsl:attribute>
15138
15462
  <xsl:attribute name="start-indent">0</xsl:attribute>
15139
- </xsl:attribute-set>
15463
+ </xsl:attribute-set> <!-- fn-body-style" -->
15140
15464
 
15141
15465
  <xsl:template name="refine_fn-body-style">
15142
15466
  <xsl:if test="not($vertical_layout = 'true')">
@@ -15219,21 +15543,12 @@
15219
15543
  <xsl:choose>
15220
15544
  <xsl:when test="ancestor::mn:bibitem">
15221
15545
  <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>
15546
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
15225
15547
  </fn_styles>
15226
15548
  </xsl:when>
15227
15549
  <xsl:otherwise>
15228
15550
  <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>
15551
+ <xsl:call-template name="refine_fn-num-style"/>
15237
15552
  </fn_styles>
15238
15553
  </xsl:otherwise>
15239
15554
  </xsl:choose>
@@ -15243,9 +15558,12 @@
15243
15558
  <xsl:copy-of select="."/>
15244
15559
  </xsl:for-each>
15245
15560
 
15246
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
15561
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
15562
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
15247
15563
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
15248
- </xsl:if>
15564
+ </xsl:if> -->
15565
+
15566
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
15249
15567
 
15250
15568
  <xsl:call-template name="insert_basic_link">
15251
15569
  <xsl:with-param name="element">
@@ -15279,10 +15597,12 @@
15279
15597
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
15280
15598
 
15281
15599
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
15600
+ <xsl:call-template name="refine_fn-style"/>
15282
15601
  <xsl:copy-of select="$footnote_inline"/>
15283
15602
  <fo:footnote-body role="Note">
15284
15603
 
15285
15604
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
15605
+ <xsl:call-template name="refine_fn-container-body-style"/>
15286
15606
 
15287
15607
  <xsl:variable name="fn_block">
15288
15608
  <xsl:call-template name="refine_fn-body-style"/>
@@ -15417,17 +15737,30 @@
15417
15737
  <xsl:attribute-set name="admonition-style">
15418
15738
  </xsl:attribute-set> <!-- admonition-style -->
15419
15739
 
15740
+ <xsl:template name="refine_admonition-style">
15741
+ </xsl:template>
15742
+
15420
15743
  <xsl:attribute-set name="admonition-container-style">
15421
15744
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
15422
15745
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
15423
15746
  </xsl:attribute-set> <!-- admonition-container-style -->
15424
15747
 
15748
+ <xsl:template name="refine_admonition-container-style">
15749
+ </xsl:template>
15750
+
15425
15751
  <xsl:attribute-set name="admonition-name-style">
15426
15752
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
15427
15753
  </xsl:attribute-set> <!-- admonition-name-style -->
15428
15754
 
15755
+ <xsl:template name="refine_admonition-name-style">
15756
+ </xsl:template>
15757
+
15429
15758
  <xsl:attribute-set name="admonition-p-style">
15430
15759
  </xsl:attribute-set> <!-- admonition-p-style -->
15760
+
15761
+ <xsl:template name="refine_admonition-p-style">
15762
+ </xsl:template>
15763
+
15431
15764
  <!-- end admonition -->
15432
15765
 
15433
15766
  <!-- ================ -->
@@ -15437,8 +15770,12 @@
15437
15770
  <xsl:call-template name="setNamedDestination"/>
15438
15771
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
15439
15772
 
15773
+ <xsl:call-template name="refine_admonition-style"/>
15774
+
15440
15775
  <xsl:call-template name="setBlockSpanAll"/>
15441
15776
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
15777
+
15778
+ <xsl:call-template name="refine_admonition-container-style"/>
15442
15779
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
15443
15780
  <fo:block>
15444
15781
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -15494,6 +15831,7 @@
15494
15831
 
15495
15832
  <xsl:template match="mn:admonition/mn:p">
15496
15833
  <fo:block xsl:use-attribute-sets="admonition-p-style">
15834
+ <xsl:call-template name="refine_admonition-p-style"/>
15497
15835
 
15498
15836
  <xsl:apply-templates/>
15499
15837
  </fo:block>
@@ -15503,6 +15841,13 @@
15503
15841
  <!-- END Admonition -->
15504
15842
  <!-- ================ -->
15505
15843
 
15844
+ <xsl:attribute-set name="references-non-normative-title-style">
15845
+ </xsl:attribute-set>
15846
+
15847
+ <xsl:template name="refine_references-non-normative-title-style">
15848
+
15849
+ </xsl:template>
15850
+
15506
15851
  <!-- bibitem in Normative References (references/@normative="true") -->
15507
15852
  <xsl:attribute-set name="bibitem-normative-style">
15508
15853
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -15510,32 +15855,53 @@
15510
15855
  <xsl:attribute name="text-indent">-6mm</xsl:attribute>
15511
15856
  </xsl:attribute-set> <!-- bibitem-normative-style -->
15512
15857
 
15858
+ <xsl:template name="refine_bibitem-normative-style">
15859
+ </xsl:template>
15860
+
15513
15861
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
15514
15862
  <xsl:attribute-set name="bibitem-normative-list-style">
15515
15863
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
15516
15864
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15517
15865
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
15518
15866
 
15867
+ <xsl:template name="refine_bibitem-normative-list-style">
15868
+ </xsl:template>
15869
+
15519
15870
  <xsl:attribute-set name="bibitem-non-normative-style">
15520
15871
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
15521
15872
 
15873
+ <xsl:template name="refine_bibitem-non-normative-style">
15874
+ </xsl:template>
15875
+
15522
15876
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
15523
15877
  <xsl:attribute-set name="bibitem-non-normative-list-style">
15524
15878
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
15525
15879
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15526
15880
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
15527
15881
 
15882
+ <xsl:template name="refine_bibitem-non-normative-list-style">
15883
+ </xsl:template>
15884
+
15528
15885
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
15529
15886
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15530
15887
  </xsl:attribute-set>
15531
15888
 
15889
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
15890
+ </xsl:template>
15891
+
15532
15892
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
15533
15893
  <xsl:attribute-set name="bibitem-normative-list-body-style">
15534
15894
  </xsl:attribute-set>
15535
15895
 
15896
+ <xsl:template name="refine_bibitem-normative-list-body-style">
15897
+ </xsl:template>
15898
+
15536
15899
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
15537
15900
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
15538
15901
 
15902
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
15903
+ </xsl:template>
15904
+
15539
15905
  <!-- footnote reference number for bibitem, in the text -->
15540
15906
  <xsl:attribute-set name="bibitem-note-fn-style">
15541
15907
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -15545,6 +15911,12 @@
15545
15911
  <xsl:attribute name="vertical-align">super</xsl:attribute>
15546
15912
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
15547
15913
 
15914
+ <xsl:template name="refine_bibitem-note-fn-style">
15915
+ <xsl:if test="not($vertical_layout = 'true')">
15916
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
15917
+ </xsl:if>
15918
+ </xsl:template>
15919
+
15548
15920
  <!-- footnote number on the page bottom -->
15549
15921
  <xsl:attribute-set name="bibitem-note-fn-number-style">
15550
15922
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -15560,6 +15932,9 @@
15560
15932
  <xsl:attribute-set name="references-non-normative-style">
15561
15933
  </xsl:attribute-set> <!-- references-non-normative-style -->
15562
15934
 
15935
+ <xsl:template name="refine_references-non-normative-style">
15936
+ </xsl:template>
15937
+
15563
15938
  <!-- ======================= -->
15564
15939
  <!-- Bibliography rendering -->
15565
15940
  <!-- ======================= -->
@@ -15611,6 +15986,7 @@
15611
15986
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
15612
15987
 
15613
15988
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
15989
+ <xsl:call-template name="refine_references-non-normative-style"/>
15614
15990
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
15615
15991
  <!-- render footnotes after references -->
15616
15992
  <xsl:apply-templates select=".//mn:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
@@ -15630,6 +16006,7 @@
15630
16006
  <fo:block-container margin-left="6mm" role="SKIP">
15631
16007
  <fo:block-container margin-left="0mm" role="SKIP">
15632
16008
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16009
+ <xsl:call-template name="refine_bibitem-normative-style"/>
15633
16010
  <xsl:call-template name="processBibitem"/>
15634
16011
  </fo:block>
15635
16012
  </fo:block-container>
@@ -15638,15 +16015,17 @@
15638
16015
  </xsl:template> <!-- bibitem -->
15639
16016
 
15640
16017
  <!-- 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">
16018
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
15642
16019
  <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
16020
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
15644
16021
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
15645
16022
  <xsl:call-template name="setNamedDestination"/>
15646
16023
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
16024
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
16025
+
15647
16026
  <fo:list-item>
15648
16027
  <fo:list-item-label end-indent="label-end()">
15649
- <fo:block role="SKIP">
16028
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
15650
16029
  <fo:inline role="SKIP">
15651
16030
  <xsl:apply-templates select="mn:biblio-tag">
15652
16031
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -15656,6 +16035,7 @@
15656
16035
  </fo:list-item-label>
15657
16036
  <fo:list-item-body start-indent="body-start()">
15658
16037
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16038
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
15659
16039
  <xsl:call-template name="processBibitem">
15660
16040
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
15661
16041
  </xsl:call-template>
@@ -15666,12 +16046,17 @@
15666
16046
 
15667
16047
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
15668
16048
 
16049
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
16050
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
16051
+
15669
16052
  <xsl:template name="insertListItem_Bibitem">
15670
16053
  <xsl:choose>
15671
16054
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
15672
16055
  <xsl:otherwise>
15673
16056
  <xsl:call-template name="setNamedDestination"/>
15674
16057
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
16058
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
16059
+
15675
16060
  <fo:list-item-label end-indent="label-end()">
15676
16061
  <fo:block role="SKIP">
15677
16062
  <fo:inline role="SKIP">
@@ -15682,16 +16067,18 @@
15682
16067
  </fo:block>
15683
16068
  </fo:list-item-label>
15684
16069
  <fo:list-item-body start-indent="body-start()">
15685
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
16070
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
16071
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
15686
16072
  <xsl:call-template name="processBibitem">
15687
16073
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
15688
16074
  </xsl:call-template>
15689
16075
  </fo:block>
16076
+ <xsl:call-template name="processBibitemFollowingNotes"/>
15690
16077
  </fo:list-item-body>
15691
16078
  </fo:list-item>
15692
16079
  </xsl:otherwise>
15693
16080
  </xsl:choose>
15694
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
16081
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
15695
16082
  <xsl:with-param name="skip">false</xsl:with-param>
15696
16083
  </xsl:apply-templates>
15697
16084
  </xsl:template>
@@ -15710,24 +16097,16 @@
15710
16097
  </xsl:apply-templates>
15711
16098
  </fo:inline>
15712
16099
  <xsl:apply-templates select="mn:formattedref"/>
16100
+ <xsl:call-template name="processBibitemFollowingNotes"/>
15713
16101
 
15714
- <xsl:call-template name="processBibliographyNote"/>
15715
16102
  </xsl:template> <!-- processBibitem (bibitem) -->
15716
16103
 
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> -->
16104
+ <xsl:template name="processBibitemFollowingNotes">
16105
+ <!-- current context is bibitem element -->
16106
+ <xsl:variable name="bibitem_id" select="@id"/>
16107
+ <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
16108
  <xsl:call-template name="note"/>
15730
- </xsl:if>
16109
+ </xsl:for-each>
15731
16110
  </xsl:template>
15732
16111
 
15733
16112
  <xsl:template match="mn:title" mode="title">
@@ -15927,11 +16306,17 @@
15927
16306
  <!-- Index section styles -->
15928
16307
  <xsl:attribute-set name="indexsect-title-style">
15929
16308
  <xsl:attribute name="role">H1</xsl:attribute>
15930
- </xsl:attribute-set>
16309
+ </xsl:attribute-set> <!-- indexsect-title-style -->
16310
+
16311
+ <xsl:template name="refine_indexsect-title-style">
16312
+ </xsl:template>
15931
16313
 
15932
16314
  <xsl:attribute-set name="indexsect-clause-title-style">
15933
16315
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
15934
- </xsl:attribute-set>
16316
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
16317
+
16318
+ <xsl:template name="refine_indexsect-clause-title-style">
16319
+ </xsl:template>
15935
16320
  <!-- End Index section styles -->
15936
16321
 
15937
16322
  <!-- =================== -->
@@ -16125,6 +16510,7 @@
16125
16510
 
16126
16511
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
16127
16512
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
16513
+ <xsl:call-template name="refine_indexsect-title-style"/>
16128
16514
  <!-- Index -->
16129
16515
  <xsl:apply-templates/>
16130
16516
  </fo:block>
@@ -16133,6 +16519,7 @@
16133
16519
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
16134
16520
  <!-- Letter A, B, C, ... -->
16135
16521
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
16522
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
16136
16523
  <xsl:apply-templates/>
16137
16524
  </fo:block>
16138
16525
  </xsl:template>
@@ -16357,9 +16744,15 @@
16357
16744
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
16358
16745
  </xsl:attribute-set> <!-- END: toc-leader-style -->
16359
16746
 
16747
+ <xsl:template name="refine_toc-leader-style">
16748
+ </xsl:template>
16749
+
16360
16750
  <xsl:attribute-set name="toc-pagenumber-style">
16361
16751
  </xsl:attribute-set>
16362
16752
 
16753
+ <xsl:template name="refine_toc-pagenumber-style">
16754
+ </xsl:template>
16755
+
16363
16756
  <!-- List of Figures, Tables -->
16364
16757
  <xsl:attribute-set name="toc-listof-title-style">
16365
16758
  </xsl:attribute-set>
@@ -16370,10 +16763,16 @@
16370
16763
  <xsl:attribute-set name="toc-listof-item-block-style">
16371
16764
  </xsl:attribute-set>
16372
16765
 
16766
+ <xsl:template name="refine_toc-listof-item-block-style">
16767
+ </xsl:template>
16768
+
16373
16769
  <xsl:attribute-set name="toc-listof-item-style">
16374
16770
  <xsl:attribute name="role">TOCI</xsl:attribute>
16375
16771
  </xsl:attribute-set>
16376
16772
 
16773
+ <xsl:template name="refine_toc-listof-item-style">
16774
+ </xsl:template>
16775
+
16377
16776
  <xsl:template name="processPrefaceSectionsDefault_Contents">
16378
16777
  <xsl:variable name="nodes_preface_">
16379
16778
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -17480,23 +17879,55 @@
17480
17879
  <!-- Ruby text (CJK languages) rendering -->
17481
17880
  <!-- ===================================== -->
17482
17881
  <!-- ===================================== -->
17882
+
17883
+ <xsl:attribute-set name="ruby-style">
17884
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
17885
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
17886
+ </xsl:attribute-set>
17887
+
17888
+ <xsl:template name="refine_ruby-style">
17889
+ <xsl:if test="not(ancestor::mn:ruby)">
17890
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
17891
+ </xsl:if>
17892
+ <xsl:variable name="rt_text" select="mn:rt"/>
17893
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
17894
+ <!-- Example: width="2em" -->
17895
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
17896
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
17897
+ <xsl:variable name="text_width">
17898
+ <xsl:choose>
17899
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
17900
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
17901
+ </xsl:choose>
17902
+ </xsl:variable>
17903
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
17904
+ </xsl:template> <!-- refine_ruby-style -->
17905
+
17906
+ <xsl:attribute-set name="rb-style">
17907
+ <xsl:attribute name="line-height">1em</xsl:attribute>
17908
+ <xsl:attribute name="text-align">center</xsl:attribute>
17909
+ </xsl:attribute-set>
17910
+
17911
+ <xsl:template name="refine_rb-style">
17912
+ </xsl:template>
17913
+
17914
+ <xsl:attribute-set name="rt-style">
17915
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
17916
+ <xsl:attribute name="text-align">center</xsl:attribute>
17917
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
17918
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
17919
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
17920
+ </xsl:attribute-set>
17921
+
17922
+ <xsl:template name="refine_rt-style">
17923
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
17924
+ <xsl:attribute name="space-before">0em</xsl:attribute>
17925
+ </xsl:if>
17926
+ </xsl:template>
17927
+
17483
17928
  <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>
17929
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
17930
+ <xsl:call-template name="refine_ruby-style"/>
17500
17931
 
17501
17932
  <xsl:choose>
17502
17933
  <xsl:when test="ancestor::mn:ruby">
@@ -17514,17 +17945,14 @@
17514
17945
  </xsl:template>
17515
17946
 
17516
17947
  <xsl:template match="mn:rb">
17517
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
17948
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
17518
17949
  </xsl:template>
17519
17950
 
17520
17951
  <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>
17952
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
17953
+ <xsl:call-template name="refine_rt-style"/>
17525
17954
  <xsl:apply-templates/>
17526
17955
  </fo:block>
17527
-
17528
17956
  </xsl:template>
17529
17957
 
17530
17958
  <!-- ===================================== -->
@@ -17533,6 +17961,18 @@
17533
17961
  <!-- ===================================== -->
17534
17962
  <!-- ===================================== -->
17535
17963
 
17964
+ <xsl:attribute-set name="annex-title-style">
17965
+ </xsl:attribute-set>
17966
+
17967
+ <xsl:template name="refine_annex-title-style">
17968
+ </xsl:template>
17969
+
17970
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
17971
+ </xsl:attribute-set>
17972
+
17973
+ <xsl:template name="refine_p-zzSTDTitle1-style">
17974
+ </xsl:template>
17975
+
17536
17976
  <xsl:template name="processPrefaceSectionsDefault">
17537
17977
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
17538
17978
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -17871,10 +18311,17 @@
17871
18311
  </xsl:choose>
17872
18312
  </xsl:template>
17873
18313
 
18314
+ <xsl:attribute-set name="clause-style">
18315
+
18316
+ </xsl:attribute-set>
18317
+
18318
+ <xsl:template name="refine_clause-style">
18319
+ </xsl:template>
18320
+
17874
18321
  <!-- main sections -->
17875
18322
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
17876
18323
  <xsl:call-template name="setNamedDestination"/>
17877
- <fo:block>
18324
+ <fo:block role="Sect">
17878
18325
  <xsl:call-template name="setId"/>
17879
18326
 
17880
18327
  <xsl:call-template name="sections_element_style"/>
@@ -17998,6 +18445,10 @@
17998
18445
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
17999
18446
  </xsl:template>
18000
18447
 
18448
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
18449
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
18450
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
18451
+
18001
18452
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
18002
18453
  <xsl:template name="insert_basic_link">
18003
18454
  <xsl:param name="element"/>