metanorma-jis 0.6.2 → 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.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/jis.international-standard.xsl +699 -205
- data/lib/isodoc/jis/presentation_xml_convert.rb +4 -2
- data/lib/metanorma/jis/biblio-standoc.rng +0 -49
- data/lib/metanorma/jis/biblio.rng +11 -1
- data/lib/metanorma/jis/front.rb +17 -6
- data/lib/metanorma/jis/isodoc.rng +24 -1
- data/lib/metanorma/jis/relaton-jis.rng +0 -42
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
@@ -7251,42 +7251,86 @@
|
|
7251
7251
|
<xsl:attribute-set name="copyright-statement-style">
|
7252
7252
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
7253
7253
|
|
7254
|
+
<xsl:template name="refine_copyright-statement-style">
|
7255
|
+
</xsl:template>
|
7256
|
+
|
7254
7257
|
<xsl:attribute-set name="copyright-statement-title-style">
|
7255
7258
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
7256
7259
|
|
7260
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
7261
|
+
</xsl:template>
|
7262
|
+
|
7257
7263
|
<xsl:attribute-set name="copyright-statement-p-style">
|
7258
7264
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
7259
7265
|
|
7260
|
-
|
7266
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
7267
|
+
|
7268
|
+
</xsl:template>
|
7269
|
+
|
7270
|
+
<xsl:attribute-set name="license-statement-style">
|
7261
7271
|
</xsl:attribute-set> <!-- license-statement-style -->
|
7262
7272
|
|
7273
|
+
<xsl:template name="refine_license-statement-style">
|
7274
|
+
</xsl:template>
|
7275
|
+
|
7263
7276
|
<xsl:attribute-set name="license-statement-title-style">
|
7264
7277
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7265
7278
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
7266
7279
|
|
7280
|
+
<xsl:template name="refine_license-statement-title-style">
|
7281
|
+
</xsl:template>
|
7282
|
+
|
7267
7283
|
<xsl:attribute-set name="license-statement-p-style">
|
7268
7284
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
7269
7285
|
|
7286
|
+
<xsl:template name="refine_license-statement-p-style">
|
7287
|
+
|
7288
|
+
</xsl:template>
|
7289
|
+
|
7270
7290
|
<xsl:attribute-set name="legal-statement-style">
|
7271
7291
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
7272
7292
|
|
7293
|
+
<xsl:template name="refine_legal-statement-style">
|
7294
|
+
</xsl:template>
|
7295
|
+
|
7273
7296
|
<xsl:attribute-set name="legal-statement-title-style">
|
7274
7297
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7275
7298
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
7276
7299
|
|
7300
|
+
<xsl:template name="refine_legal-statement-title-style">
|
7301
|
+
</xsl:template>
|
7302
|
+
|
7277
7303
|
<xsl:attribute-set name="legal-statement-p-style">
|
7278
7304
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
7279
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
|
+
|
7280
7314
|
<xsl:attribute-set name="feedback-statement-style">
|
7281
7315
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
7282
7316
|
|
7317
|
+
<xsl:template name="refine_feedback-statement-style">
|
7318
|
+
</xsl:template>
|
7319
|
+
|
7283
7320
|
<xsl:attribute-set name="feedback-statement-title-style">
|
7284
7321
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7285
7322
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
7286
7323
|
|
7324
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
7325
|
+
|
7326
|
+
</xsl:template>
|
7327
|
+
|
7287
7328
|
<xsl:attribute-set name="feedback-statement-p-style">
|
7288
7329
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
7289
7330
|
|
7331
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
7332
|
+
</xsl:template>
|
7333
|
+
|
7290
7334
|
<!-- End boilerplate sections styles -->
|
7291
7335
|
|
7292
7336
|
<!-- ================================= -->
|
@@ -7294,6 +7338,8 @@
|
|
7294
7338
|
<!-- ================================= -->
|
7295
7339
|
<xsl:template match="mn:copyright-statement">
|
7296
7340
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
7341
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
7342
|
+
|
7297
7343
|
<xsl:apply-templates/>
|
7298
7344
|
</fo:block>
|
7299
7345
|
</xsl:template> <!-- copyright-statement -->
|
@@ -7310,6 +7356,7 @@
|
|
7310
7356
|
|
7311
7357
|
<xsl:template match="mn:license-statement">
|
7312
7358
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
7359
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
7313
7360
|
<xsl:apply-templates/>
|
7314
7361
|
</fo:block>
|
7315
7362
|
</xsl:template> <!-- license-statement -->
|
@@ -7327,6 +7374,7 @@
|
|
7327
7374
|
<xsl:template match="mn:legal-statement">
|
7328
7375
|
<xsl:param name="isLegacy">false</xsl:param>
|
7329
7376
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
7377
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
7330
7378
|
<xsl:apply-templates/>
|
7331
7379
|
</fo:block>
|
7332
7380
|
</xsl:template> <!-- legal-statement -->
|
@@ -7494,6 +7542,27 @@
|
|
7494
7542
|
<xsl:attribute-set name="sourcecode-container-style">
|
7495
7543
|
</xsl:attribute-set>
|
7496
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
|
+
|
7497
7566
|
<xsl:attribute-set name="sourcecode-style">
|
7498
7567
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
7499
7568
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -7511,6 +7580,9 @@
|
|
7511
7580
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
7512
7581
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
7513
7582
|
|
7583
|
+
<xsl:template name="refine_sourcecode-name-style">
|
7584
|
+
</xsl:template>
|
7585
|
+
|
7514
7586
|
<xsl:template name="add-zero-spaces-equal">
|
7515
7587
|
<xsl:param name="text" select="."/>
|
7516
7588
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -7598,24 +7670,8 @@
|
|
7598
7670
|
<xsl:otherwise>
|
7599
7671
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
7600
7672
|
|
7601
|
-
<xsl:
|
7602
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7603
|
-
</xsl:if>
|
7604
|
-
|
7605
|
-
<xsl:if test="ancestor::mn:example">
|
7606
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
7607
|
-
</xsl:if>
|
7608
|
-
|
7609
|
-
<xsl:copy-of select="@id"/>
|
7673
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
7610
7674
|
|
7611
|
-
<xsl:if test="parent::mn:note">
|
7612
|
-
<xsl:attribute name="margin-left">
|
7613
|
-
<xsl:choose>
|
7614
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
7615
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
7616
|
-
</xsl:choose>
|
7617
|
-
</xsl:attribute>
|
7618
|
-
</xsl:if>
|
7619
7675
|
<fo:block-container margin-left="0mm" role="SKIP">
|
7620
7676
|
|
7621
7677
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -7942,6 +7998,7 @@
|
|
7942
7998
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
7943
7999
|
<xsl:if test="normalize-space() != ''">
|
7944
8000
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
8001
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
7945
8002
|
<xsl:apply-templates/>
|
7946
8003
|
</fo:block>
|
7947
8004
|
</xsl:if>
|
@@ -7988,11 +8045,30 @@
|
|
7988
8045
|
<xsl:attribute-set name="pre-style">
|
7989
8046
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
7990
8047
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
7991
|
-
</xsl:attribute-set>
|
8048
|
+
</xsl:attribute-set> <!-- pre-style -->
|
8049
|
+
|
8050
|
+
<xsl:template name="refine_pre-style">
|
8051
|
+
</xsl:template>
|
7992
8052
|
|
7993
8053
|
<xsl:attribute-set name="tt-style">
|
7994
8054
|
</xsl:attribute-set>
|
7995
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
|
+
|
7996
8072
|
<xsl:variable name="color-added-text">
|
7997
8073
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
7998
8074
|
</xsl:variable>
|
@@ -8005,9 +8081,14 @@
|
|
8005
8081
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
8006
8082
|
</xsl:attribute-set>
|
8007
8083
|
|
8084
|
+
<xsl:template name="refine_add-style">
|
8085
|
+
</xsl:template>
|
8086
|
+
|
8008
8087
|
<xsl:variable name="add-style">
|
8009
|
-
|
8010
|
-
|
8088
|
+
<add-style xsl:use-attribute-sets="add-style">
|
8089
|
+
<xsl:call-template name="refine_add-style"/>
|
8090
|
+
</add-style>
|
8091
|
+
</xsl:variable>
|
8011
8092
|
<xsl:template name="append_add-style">
|
8012
8093
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
8013
8094
|
</xsl:template>
|
@@ -8020,24 +8101,80 @@
|
|
8020
8101
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
8021
8102
|
</xsl:attribute-set>
|
8022
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
|
+
|
8023
8164
|
<xsl:template match="mn:br">
|
8024
8165
|
<xsl:value-of select="$linebreak"/>
|
8025
8166
|
</xsl:template>
|
8026
8167
|
|
8027
|
-
|
8028
|
-
<fo:inline
|
8029
|
-
<xsl:call-template name="
|
8168
|
+
<xsl:template match="mn:em">
|
8169
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
8170
|
+
<xsl:call-template name="refine_em_style"/>
|
8030
8171
|
<xsl:apply-templates/>
|
8031
8172
|
</fo:inline>
|
8032
8173
|
</xsl:template>
|
8033
8174
|
|
8034
|
-
<xsl:template name="refine_italic_style">
|
8035
|
-
</xsl:template>
|
8036
|
-
|
8037
8175
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
8038
8176
|
<xsl:param name="split_keep-within-line"/>
|
8039
|
-
<fo:inline
|
8040
|
-
|
8177
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
8041
8178
|
<xsl:call-template name="refine_strong_style"/>
|
8042
8179
|
|
8043
8180
|
<xsl:apply-templates>
|
@@ -8046,47 +8183,27 @@
|
|
8046
8183
|
</fo:inline>
|
8047
8184
|
</xsl:template>
|
8048
8185
|
|
8049
|
-
<xsl:template name="refine_strong_style">
|
8050
|
-
<xsl:if test="not($vertical_layout = 'true')">
|
8051
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
8052
|
-
</xsl:if>
|
8053
|
-
<xsl:if test="ancestor::*['preferred']">
|
8054
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8055
|
-
</xsl:if>
|
8056
|
-
</xsl:template>
|
8057
|
-
|
8058
8186
|
<xsl:template match="*[local-name()='padding']">
|
8059
8187
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
8060
8188
|
</xsl:template>
|
8061
8189
|
|
8062
8190
|
<xsl:template match="mn:sup">
|
8063
|
-
<fo:inline
|
8191
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
8192
|
+
<xsl:call-template name="refine_sup-style"/>
|
8064
8193
|
<xsl:apply-templates/>
|
8065
8194
|
</fo:inline>
|
8066
8195
|
</xsl:template>
|
8067
8196
|
|
8068
8197
|
<xsl:template match="mn:sub">
|
8069
|
-
<fo:inline
|
8198
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
8199
|
+
<xsl:call-template name="refine_sub-style"/>
|
8070
8200
|
<xsl:apply-templates/>
|
8071
8201
|
</fo:inline>
|
8072
8202
|
</xsl:template>
|
8073
8203
|
|
8074
8204
|
<xsl:template match="mn:tt">
|
8075
8205
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
8076
|
-
|
8077
|
-
<xsl:variable name="_font-size"> <!-- inherit -->
|
8078
|
-
</xsl:variable>
|
8079
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8080
|
-
<xsl:if test="$font-size != ''">
|
8081
|
-
<xsl:attribute name="font-size">
|
8082
|
-
<xsl:choose>
|
8083
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8084
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8085
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8086
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8087
|
-
</xsl:choose>
|
8088
|
-
</xsl:attribute>
|
8089
|
-
</xsl:if>
|
8206
|
+
<xsl:call-template name="refine_tt-style"/>
|
8090
8207
|
<xsl:apply-templates/>
|
8091
8208
|
</fo:inline>
|
8092
8209
|
</xsl:template> <!-- tt -->
|
@@ -8105,7 +8222,8 @@
|
|
8105
8222
|
</xsl:template>
|
8106
8223
|
|
8107
8224
|
<xsl:template match="mn:underline">
|
8108
|
-
<fo:inline
|
8225
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
8226
|
+
<xsl:call-template name="refine_underline-style"/>
|
8109
8227
|
<xsl:apply-templates/>
|
8110
8228
|
</fo:inline>
|
8111
8229
|
</xsl:template>
|
@@ -8263,6 +8381,7 @@
|
|
8263
8381
|
|
8264
8382
|
<xsl:template match="mn:del">
|
8265
8383
|
<fo:inline xsl:use-attribute-sets="del-style">
|
8384
|
+
<xsl:call-template name="refine_del-style"/>
|
8266
8385
|
<xsl:apply-templates/>
|
8267
8386
|
</fo:inline>
|
8268
8387
|
</xsl:template>
|
@@ -8272,7 +8391,8 @@
|
|
8272
8391
|
|
8273
8392
|
<!-- highlight text -->
|
8274
8393
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
8275
|
-
<fo:inline
|
8394
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
8395
|
+
<xsl:call-template name="refine_hi-style"/>
|
8276
8396
|
<xsl:apply-templates/>
|
8277
8397
|
</fo:inline>
|
8278
8398
|
</xsl:template>
|
@@ -8358,7 +8478,8 @@
|
|
8358
8478
|
</xsl:template>
|
8359
8479
|
|
8360
8480
|
<xsl:template match="mn:strike">
|
8361
|
-
<fo:inline
|
8481
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
8482
|
+
<xsl:call-template name="refine_strike-style"/>
|
8362
8483
|
<xsl:apply-templates/>
|
8363
8484
|
</fo:inline>
|
8364
8485
|
</xsl:template>
|
@@ -8386,7 +8507,7 @@
|
|
8386
8507
|
</xsl:otherwise>
|
8387
8508
|
</xsl:choose>
|
8388
8509
|
</xsl:variable>
|
8389
|
-
<xsl:if test="$key = 'font-family' or
|
8510
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
8390
8511
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8391
8512
|
</xsl:if>
|
8392
8513
|
<xsl:if test="$key = 'text-indent'">
|
@@ -8446,6 +8567,7 @@
|
|
8446
8567
|
|
8447
8568
|
<xsl:template match="mn:pre" name="pre">
|
8448
8569
|
<fo:block xsl:use-attribute-sets="pre-style">
|
8570
|
+
<xsl:call-template name="refine_pre-style"/>
|
8449
8571
|
<xsl:copy-of select="@id"/>
|
8450
8572
|
<xsl:choose>
|
8451
8573
|
|
@@ -8476,22 +8598,40 @@
|
|
8476
8598
|
<xsl:attribute-set name="permission-style">
|
8477
8599
|
</xsl:attribute-set>
|
8478
8600
|
|
8601
|
+
<xsl:template name="refine_permission-style">
|
8602
|
+
</xsl:template>
|
8603
|
+
|
8479
8604
|
<xsl:attribute-set name="permission-name-style">
|
8480
8605
|
</xsl:attribute-set>
|
8481
8606
|
|
8607
|
+
<xsl:template name="refine_permission-name-style">
|
8608
|
+
</xsl:template>
|
8609
|
+
|
8482
8610
|
<xsl:attribute-set name="permission-label-style">
|
8483
8611
|
</xsl:attribute-set>
|
8484
8612
|
|
8613
|
+
<xsl:template name="refine_permission-label-style">
|
8614
|
+
</xsl:template>
|
8615
|
+
|
8485
8616
|
<xsl:attribute-set name="requirement-style">
|
8486
8617
|
</xsl:attribute-set>
|
8487
8618
|
|
8619
|
+
<xsl:template name="refine_requirement-style">
|
8620
|
+
</xsl:template>
|
8621
|
+
|
8488
8622
|
<xsl:attribute-set name="requirement-name-style">
|
8489
8623
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
8490
8624
|
</xsl:attribute-set>
|
8491
8625
|
|
8626
|
+
<xsl:template name="refine_requirement-name-style">
|
8627
|
+
</xsl:template>
|
8628
|
+
|
8492
8629
|
<xsl:attribute-set name="requirement-label-style">
|
8493
8630
|
</xsl:attribute-set>
|
8494
8631
|
|
8632
|
+
<xsl:template name="refine_requirement-label-style">
|
8633
|
+
</xsl:template>
|
8634
|
+
|
8495
8635
|
<xsl:attribute-set name="subject-style">
|
8496
8636
|
</xsl:attribute-set>
|
8497
8637
|
|
@@ -8519,18 +8659,28 @@
|
|
8519
8659
|
<xsl:attribute-set name="recommendation-style">
|
8520
8660
|
</xsl:attribute-set>
|
8521
8661
|
|
8662
|
+
<xsl:template name="refine_recommendation-style">
|
8663
|
+
</xsl:template>
|
8664
|
+
|
8522
8665
|
<xsl:attribute-set name="recommendation-name-style">
|
8523
8666
|
</xsl:attribute-set>
|
8524
8667
|
|
8668
|
+
<xsl:template name="refine_recommendation-name-style">
|
8669
|
+
</xsl:template>
|
8670
|
+
|
8525
8671
|
<xsl:attribute-set name="recommendation-label-style">
|
8526
8672
|
</xsl:attribute-set>
|
8527
8673
|
|
8674
|
+
<xsl:template name="refine_recommendation-label-style">
|
8675
|
+
</xsl:template>
|
8676
|
+
|
8528
8677
|
<!-- ========== -->
|
8529
8678
|
<!-- permission -->
|
8530
8679
|
<!-- ========== -->
|
8531
8680
|
<xsl:template match="mn:permission">
|
8532
8681
|
<xsl:call-template name="setNamedDestination"/>
|
8533
8682
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
8683
|
+
<xsl:call-template name="refine_permission-style"/>
|
8534
8684
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8535
8685
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8536
8686
|
</fo:block>
|
@@ -8539,6 +8689,7 @@
|
|
8539
8689
|
<xsl:template match="mn:permission/mn:fmt-name">
|
8540
8690
|
<xsl:if test="normalize-space() != ''">
|
8541
8691
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
8692
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
8542
8693
|
<xsl:apply-templates/>
|
8543
8694
|
</fo:block>
|
8544
8695
|
</xsl:if>
|
@@ -8546,6 +8697,7 @@
|
|
8546
8697
|
|
8547
8698
|
<xsl:template match="mn:permission/mn:label">
|
8548
8699
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
8700
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
8549
8701
|
<xsl:apply-templates/>
|
8550
8702
|
</fo:block>
|
8551
8703
|
</xsl:template>
|
@@ -8558,6 +8710,7 @@
|
|
8558
8710
|
<xsl:template match="mn:requirement">
|
8559
8711
|
<xsl:call-template name="setNamedDestination"/>
|
8560
8712
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
8713
|
+
<xsl:call-template name="refine_requirement-style"/>
|
8561
8714
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8562
8715
|
<xsl:apply-templates select="mn:label"/>
|
8563
8716
|
<xsl:apply-templates select="@obligation"/>
|
@@ -8570,6 +8723,7 @@
|
|
8570
8723
|
<xsl:if test="normalize-space() != ''">
|
8571
8724
|
|
8572
8725
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
8726
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
8573
8727
|
<xsl:apply-templates/>
|
8574
8728
|
</fo:block>
|
8575
8729
|
</xsl:if>
|
@@ -8577,6 +8731,7 @@
|
|
8577
8731
|
|
8578
8732
|
<xsl:template match="mn:requirement/mn:label">
|
8579
8733
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
8734
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
8580
8735
|
<xsl:apply-templates/>
|
8581
8736
|
</fo:block>
|
8582
8737
|
</xsl:template>
|
@@ -8602,6 +8757,7 @@
|
|
8602
8757
|
<xsl:template match="mn:recommendation">
|
8603
8758
|
<xsl:call-template name="setNamedDestination"/>
|
8604
8759
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
8760
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
8605
8761
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8606
8762
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8607
8763
|
</fo:block>
|
@@ -8611,6 +8767,7 @@
|
|
8611
8767
|
<xsl:if test="normalize-space() != ''">
|
8612
8768
|
|
8613
8769
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
8770
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
8614
8771
|
<xsl:apply-templates/>
|
8615
8772
|
</fo:block>
|
8616
8773
|
</xsl:if>
|
@@ -8618,6 +8775,7 @@
|
|
8618
8775
|
|
8619
8776
|
<xsl:template match="mn:recommendation/mn:label">
|
8620
8777
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
8778
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
8621
8779
|
<xsl:apply-templates/>
|
8622
8780
|
</fo:block>
|
8623
8781
|
</xsl:template>
|
@@ -8799,38 +8957,75 @@
|
|
8799
8957
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
8800
8958
|
</xsl:attribute-set> <!-- term-style -->
|
8801
8959
|
|
8960
|
+
<xsl:template name="refine_term-style">
|
8961
|
+
</xsl:template>
|
8962
|
+
|
8802
8963
|
<xsl:attribute-set name="term-name-style">
|
8803
8964
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
8804
8965
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8805
8966
|
<xsl:attribute name="space-after">2pt</xsl:attribute>
|
8806
8967
|
</xsl:attribute-set> <!-- term-name-style -->
|
8807
8968
|
|
8808
|
-
|
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">
|
8809
8976
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
8810
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
|
+
|
8811
8985
|
<xsl:attribute-set name="preferred-term-style">
|
8812
8986
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
8813
8987
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8814
8988
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
8815
8989
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
8816
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
|
+
|
8817
8997
|
<xsl:attribute-set name="domain-style">
|
8818
8998
|
</xsl:attribute-set> <!-- domain-style -->
|
8819
8999
|
|
9000
|
+
<xsl:template name="refine_domain-style">
|
9001
|
+
</xsl:template>
|
9002
|
+
|
8820
9003
|
<xsl:attribute-set name="admitted-style">
|
8821
9004
|
</xsl:attribute-set> <!-- admitted-style -->
|
8822
9005
|
|
9006
|
+
<xsl:template name="refine_admitted-style">
|
9007
|
+
</xsl:template>
|
9008
|
+
|
8823
9009
|
<xsl:attribute-set name="deprecates-style">
|
8824
9010
|
</xsl:attribute-set> <!-- deprecates-style -->
|
8825
9011
|
|
9012
|
+
<xsl:template name="refine_deprecates-style">
|
9013
|
+
</xsl:template>
|
9014
|
+
|
8826
9015
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
8827
9016
|
</xsl:attribute-set>
|
8828
9017
|
|
9018
|
+
<xsl:template name="refine_related-block-style">
|
9019
|
+
</xsl:template>
|
9020
|
+
|
8829
9021
|
<xsl:attribute-set name="definition-style">
|
8830
9022
|
<xsl:attribute name="space-before">2pt</xsl:attribute>
|
8831
9023
|
<xsl:attribute name="space-after">2pt</xsl:attribute>
|
8832
9024
|
</xsl:attribute-set> <!-- definition-style -->
|
8833
9025
|
|
9026
|
+
<xsl:template name="refine_definition-style">
|
9027
|
+
</xsl:template>
|
9028
|
+
|
8834
9029
|
<xsl:attribute-set name="termsource-style">
|
8835
9030
|
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
8836
9031
|
</xsl:attribute-set> <!-- termsource-style -->
|
@@ -8841,9 +9036,15 @@
|
|
8841
9036
|
<xsl:attribute-set name="termsource-text-style">
|
8842
9037
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
8843
9038
|
|
9039
|
+
<xsl:template name="refine_termsource-text-style">
|
9040
|
+
</xsl:template>
|
9041
|
+
|
8844
9042
|
<xsl:attribute-set name="origin-style">
|
8845
9043
|
</xsl:attribute-set> <!-- origin-style -->
|
8846
9044
|
|
9045
|
+
<xsl:template name="refine_origin-style">
|
9046
|
+
</xsl:template>
|
9047
|
+
|
8847
9048
|
<!-- ====== -->
|
8848
9049
|
<!-- term -->
|
8849
9050
|
<!-- ====== -->
|
@@ -8859,9 +9060,8 @@
|
|
8859
9060
|
<xsl:template match="mn:term">
|
8860
9061
|
<xsl:call-template name="setNamedDestination"/>
|
8861
9062
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
9063
|
+
<xsl:call-template name="refine_term-style"/>
|
8862
9064
|
|
8863
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
8864
|
-
</xsl:if>
|
8865
9065
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8866
9066
|
</fo:block>
|
8867
9067
|
</xsl:template>
|
@@ -8937,6 +9137,7 @@
|
|
8937
9137
|
<!-- text SOURCE: -->
|
8938
9138
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
8939
9139
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
9140
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
8940
9141
|
<xsl:value-of select="."/>
|
8941
9142
|
</fo:inline>
|
8942
9143
|
</xsl:template>
|
@@ -8949,6 +9150,7 @@
|
|
8949
9150
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
8950
9151
|
</xsl:if>
|
8951
9152
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
9153
|
+
<xsl:call-template name="refine_origin-style"/>
|
8952
9154
|
<xsl:apply-templates/>
|
8953
9155
|
</fo:inline>
|
8954
9156
|
</fo:basic-link>
|
@@ -8997,17 +9199,13 @@
|
|
8997
9199
|
<xsl:call-template name="getLevelTermName"/>
|
8998
9200
|
</xsl:variable>
|
8999
9201
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
9000
|
-
|
9001
|
-
|
9002
|
-
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
9003
|
-
</xsl:if>
|
9202
|
+
|
9203
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
9004
9204
|
|
9005
9205
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
9006
9206
|
|
9007
9207
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
9008
|
-
<xsl:
|
9009
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
9010
|
-
</xsl:if>
|
9208
|
+
<xsl:call-template name="refine_term-name-style"/>
|
9011
9209
|
|
9012
9210
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
9013
9211
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -9018,7 +9216,7 @@
|
|
9018
9216
|
</xsl:if>
|
9019
9217
|
|
9020
9218
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
9021
|
-
<xsl:call-template name="
|
9219
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
9022
9220
|
<xsl:if test="$vertical_layout = 'true'">
|
9023
9221
|
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
9024
9222
|
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
@@ -9047,22 +9245,18 @@
|
|
9047
9245
|
|
9048
9246
|
<xsl:template match="mn:fmt-admitted">
|
9049
9247
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
9248
|
+
<xsl:call-template name="refine_admitted-style"/>
|
9050
9249
|
<xsl:apply-templates/>
|
9051
9250
|
</fo:block>
|
9052
9251
|
</xsl:template>
|
9053
9252
|
|
9054
9253
|
<xsl:template match="mn:fmt-deprecates">
|
9055
9254
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
9255
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
9056
9256
|
<xsl:apply-templates/>
|
9057
9257
|
</fo:block>
|
9058
9258
|
</xsl:template>
|
9059
9259
|
|
9060
|
-
<xsl:template name="setStyle_preferred">
|
9061
|
-
<xsl:if test="mn:strong">
|
9062
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9063
|
-
</xsl:if>
|
9064
|
-
</xsl:template>
|
9065
|
-
|
9066
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. -->
|
9067
9261
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
9068
9262
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -9072,6 +9266,7 @@
|
|
9072
9266
|
|
9073
9267
|
<xsl:template match="mn:fmt-related">
|
9074
9268
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
9269
|
+
<xsl:call-template name="refine_related-block-style"/>
|
9075
9270
|
<xsl:apply-templates/>
|
9076
9271
|
</fo:block>
|
9077
9272
|
</xsl:template>
|
@@ -9086,6 +9281,7 @@
|
|
9086
9281
|
<!-- ========== -->
|
9087
9282
|
<xsl:template match="mn:fmt-definition">
|
9088
9283
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
9284
|
+
<xsl:call-template name="refine_definition-style"/>
|
9089
9285
|
<xsl:apply-templates/>
|
9090
9286
|
</fo:block>
|
9091
9287
|
</xsl:template>
|
@@ -9136,6 +9332,9 @@
|
|
9136
9332
|
<xsl:attribute-set name="example-body-style">
|
9137
9333
|
</xsl:attribute-set> <!-- example-body-style -->
|
9138
9334
|
|
9335
|
+
<xsl:template name="refine_example-body-style">
|
9336
|
+
</xsl:template>
|
9337
|
+
|
9139
9338
|
<xsl:attribute-set name="example-name-style">
|
9140
9339
|
</xsl:attribute-set> <!-- example-name-style -->
|
9141
9340
|
|
@@ -9188,6 +9387,8 @@
|
|
9188
9387
|
<xsl:when test="contains($element, 'block')">
|
9189
9388
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
9190
9389
|
|
9390
|
+
<xsl:call-template name="refine_example-p-style"/>
|
9391
|
+
|
9191
9392
|
<xsl:apply-templates/>
|
9192
9393
|
</fo:block>
|
9193
9394
|
</xsl:when>
|
@@ -9515,6 +9716,9 @@
|
|
9515
9716
|
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
9516
9717
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
9517
9718
|
|
9719
|
+
<xsl:template name="refine_table-fn-number-style">
|
9720
|
+
</xsl:template>
|
9721
|
+
|
9518
9722
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
9519
9723
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9520
9724
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -9528,30 +9732,12 @@
|
|
9528
9732
|
</xsl:if>
|
9529
9733
|
</xsl:template>
|
9530
9734
|
|
9531
|
-
<xsl:attribute-set name="fn-container-body-style">
|
9532
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
9533
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
9534
|
-
</xsl:attribute-set>
|
9535
|
-
|
9536
9735
|
<xsl:attribute-set name="table-fn-body-style">
|
9537
9736
|
</xsl:attribute-set>
|
9538
9737
|
|
9539
|
-
<xsl:
|
9540
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
9541
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
9542
|
-
|
9543
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
9544
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9545
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
9546
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
9547
|
-
|
9548
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
9738
|
+
<xsl:template name="refine_table-fn-body-style">
|
9549
9739
|
</xsl:template>
|
9550
9740
|
|
9551
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
9552
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9553
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9554
|
-
</xsl:attribute-set>
|
9555
9741
|
<!-- ========================== -->
|
9556
9742
|
<!-- END Table styles -->
|
9557
9743
|
<!-- ========================== -->
|
@@ -10778,6 +10964,7 @@
|
|
10778
10964
|
</fo:block>
|
10779
10965
|
</fo:list-item-label>
|
10780
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"/>
|
10781
10968
|
<fo:block>
|
10782
10969
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10783
10970
|
</fo:block>
|
@@ -10856,6 +11043,7 @@
|
|
10856
11043
|
</fo:block>
|
10857
11044
|
</fo:list-item-label>
|
10858
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"/>
|
10859
11047
|
<fo:block>
|
10860
11048
|
<!-- <xsl:copy-of select="./node()"/> -->
|
10861
11049
|
<xsl:apply-templates/>
|
@@ -10877,6 +11065,7 @@
|
|
10877
11065
|
<xsl:param name="process">false</xsl:param>
|
10878
11066
|
<xsl:if test="$process = 'true'">
|
10879
11067
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
11068
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
10880
11069
|
|
10881
11070
|
<!-- tab is padding-right -->
|
10882
11071
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -11749,9 +11938,18 @@
|
|
11749
11938
|
<xsl:attribute-set name="dl-block-style">
|
11750
11939
|
</xsl:attribute-set>
|
11751
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
|
+
|
11752
11947
|
<xsl:attribute-set name="dt-row-style">
|
11753
11948
|
</xsl:attribute-set>
|
11754
11949
|
|
11950
|
+
<xsl:template name="refine_dt-row-style">
|
11951
|
+
</xsl:template>
|
11952
|
+
|
11755
11953
|
<xsl:attribute-set name="dt-cell-style">
|
11756
11954
|
</xsl:attribute-set>
|
11757
11955
|
|
@@ -11771,6 +11969,9 @@
|
|
11771
11969
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11772
11970
|
</xsl:attribute-set> <!-- dl-name-style -->
|
11773
11971
|
|
11972
|
+
<xsl:template name="refine_dl-name-style">
|
11973
|
+
</xsl:template>
|
11974
|
+
|
11774
11975
|
<xsl:attribute-set name="dd-cell-style">
|
11775
11976
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
11776
11977
|
</xsl:attribute-set>
|
@@ -11809,9 +12010,7 @@
|
|
11809
12010
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
11810
12011
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
11811
12012
|
|
11812
|
-
<xsl:
|
11813
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
11814
|
-
</xsl:if>
|
12013
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
11815
12014
|
|
11816
12015
|
<xsl:call-template name="setBlockSpanAll"/>
|
11817
12016
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -12113,6 +12312,8 @@
|
|
12113
12312
|
<xsl:if test="$process = 'true'">
|
12114
12313
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
12115
12314
|
|
12315
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
12316
|
+
|
12116
12317
|
<xsl:apply-templates/>
|
12117
12318
|
</fo:block>
|
12118
12319
|
</xsl:if>
|
@@ -12301,6 +12502,8 @@
|
|
12301
12502
|
<xsl:param name="split_keep-within-line"/>
|
12302
12503
|
|
12303
12504
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
12505
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
12506
|
+
|
12304
12507
|
<xsl:call-template name="insert_dt_cell">
|
12305
12508
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
12306
12509
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -12518,15 +12721,22 @@
|
|
12518
12721
|
<xsl:attribute-set name="appendix-style">
|
12519
12722
|
</xsl:attribute-set>
|
12520
12723
|
|
12724
|
+
<xsl:template name="refine_appendix-style">
|
12725
|
+
</xsl:template>
|
12726
|
+
|
12521
12727
|
<xsl:attribute-set name="appendix-example-style">
|
12522
12728
|
</xsl:attribute-set>
|
12523
12729
|
|
12730
|
+
<xsl:template name="refine_appendix-example-style">
|
12731
|
+
</xsl:template>
|
12732
|
+
|
12524
12733
|
<!-- ======================== -->
|
12525
12734
|
<!-- Appendix processing -->
|
12526
12735
|
<!-- ======================== -->
|
12527
12736
|
<xsl:template match="mn:appendix">
|
12528
12737
|
<xsl:call-template name="setNamedDestination"/>
|
12529
12738
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
12739
|
+
<xsl:call-template name="refine_appendix-style"/>
|
12530
12740
|
<xsl:apply-templates select="mn:fmt-title"/>
|
12531
12741
|
</fo:block>
|
12532
12742
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -12545,13 +12755,26 @@
|
|
12545
12755
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
12546
12756
|
<xsl:call-template name="setNamedDestination"/>
|
12547
12757
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
12758
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
12548
12759
|
<xsl:apply-templates select="mn:fmt-name"/>
|
12549
12760
|
</fo:block>
|
12550
12761
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
12551
12762
|
</xsl:template>
|
12552
12763
|
|
12553
12764
|
<xsl:attribute-set name="xref-style">
|
12554
|
-
</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()) < 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 -->
|
12555
12778
|
|
12556
12779
|
<xsl:template match="mn:fmt-xref">
|
12557
12780
|
<xsl:call-template name="insert_basic_link">
|
@@ -12560,15 +12783,8 @@
|
|
12560
12783
|
<xsl:call-template name="getAltText"/>
|
12561
12784
|
</xsl:variable>
|
12562
12785
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
12563
|
-
<xsl:
|
12564
|
-
|
12565
|
-
</xsl:if>
|
12566
|
-
<xsl:if test="not($vertical_layout = 'true')">
|
12567
|
-
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
12568
|
-
</xsl:if>
|
12569
|
-
<xsl:if test="parent::mn:add">
|
12570
|
-
<xsl:call-template name="append_add-style"/>
|
12571
|
-
</xsl:if>
|
12786
|
+
<xsl:call-template name="refine_xref-style"/>
|
12787
|
+
|
12572
12788
|
<xsl:apply-templates/>
|
12573
12789
|
</fo:basic-link>
|
12574
12790
|
</xsl:with-param>
|
@@ -12677,16 +12893,16 @@
|
|
12677
12893
|
<xsl:attribute-set name="note-style">
|
12678
12894
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
12679
12895
|
<xsl:attribute name="space-before">2pt</xsl:attribute>
|
12680
|
-
</xsl:attribute-set>
|
12896
|
+
</xsl:attribute-set> <!-- note-style -->
|
12681
12897
|
|
12682
12898
|
<xsl:template name="refine_note-style">
|
12683
|
-
</xsl:template>
|
12899
|
+
</xsl:template> <!-- refine_note-style -->
|
12684
12900
|
|
12685
12901
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
12686
12902
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
12687
12903
|
|
12688
12904
|
<xsl:attribute-set name="note-name-style">
|
12689
|
-
</xsl:attribute-set>
|
12905
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
12690
12906
|
|
12691
12907
|
<xsl:template name="refine_note-name-style">
|
12692
12908
|
<xsl:if test="not($vertical_layout = 'true')">
|
@@ -12706,19 +12922,22 @@
|
|
12706
12922
|
</xsl:template> <!-- refine_table-note-name-style -->
|
12707
12923
|
|
12708
12924
|
<xsl:attribute-set name="note-p-style">
|
12709
|
-
</xsl:attribute-set>
|
12925
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
12926
|
+
|
12927
|
+
<xsl:template name="refine_note-p-style">
|
12928
|
+
</xsl:template>
|
12710
12929
|
|
12711
12930
|
<xsl:attribute-set name="termnote-style">
|
12712
12931
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
12713
12932
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
12714
12933
|
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
12715
|
-
</xsl:attribute-set>
|
12934
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
12716
12935
|
|
12717
12936
|
<xsl:template name="refine_termnote-style">
|
12718
12937
|
</xsl:template> <!-- refine_termnote-style -->
|
12719
12938
|
|
12720
12939
|
<xsl:attribute-set name="termnote-name-style">
|
12721
|
-
</xsl:attribute-set>
|
12940
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
12722
12941
|
|
12723
12942
|
<xsl:template name="refine_termnote-name-style">
|
12724
12943
|
<xsl:if test="not($vertical_layout = 'true')">
|
@@ -12729,6 +12948,9 @@
|
|
12729
12948
|
<xsl:attribute-set name="termnote-p-style">
|
12730
12949
|
</xsl:attribute-set>
|
12731
12950
|
|
12951
|
+
<xsl:template name="refine_termnote-p-style">
|
12952
|
+
</xsl:template>
|
12953
|
+
|
12732
12954
|
<!-- ====== -->
|
12733
12955
|
<!-- note -->
|
12734
12956
|
<!-- termnote -->
|
@@ -12781,11 +13003,13 @@
|
|
12781
13003
|
<xsl:choose>
|
12782
13004
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
12783
13005
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
13006
|
+
<xsl:call-template name="refine_note-p-style"/>
|
12784
13007
|
<xsl:apply-templates/>
|
12785
13008
|
</fo:inline>
|
12786
13009
|
</xsl:when>
|
12787
13010
|
<xsl:otherwise>
|
12788
13011
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
13012
|
+
<xsl:call-template name="refine_note-p-style"/>
|
12789
13013
|
<xsl:apply-templates/>
|
12790
13014
|
</fo:block>
|
12791
13015
|
</xsl:otherwise>
|
@@ -12877,11 +13101,13 @@
|
|
12877
13101
|
<xsl:choose>
|
12878
13102
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
12879
13103
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
13104
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
12880
13105
|
<xsl:apply-templates/>
|
12881
13106
|
</fo:inline>
|
12882
13107
|
</xsl:when>
|
12883
13108
|
<xsl:otherwise>
|
12884
13109
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
13110
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
12885
13111
|
<xsl:apply-templates/>
|
12886
13112
|
</fo:block>
|
12887
13113
|
</xsl:otherwise>
|
@@ -12896,7 +13122,7 @@
|
|
12896
13122
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
12897
13123
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
12898
13124
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
12899
|
-
</xsl:attribute-set>
|
13125
|
+
</xsl:attribute-set> <!-- quote-style -->
|
12900
13126
|
|
12901
13127
|
<xsl:template name="refine_quote-style">
|
12902
13128
|
<xsl:if test="ancestor::mn:li">
|
@@ -12908,6 +13134,9 @@
|
|
12908
13134
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
12909
13135
|
</xsl:attribute-set>
|
12910
13136
|
|
13137
|
+
<xsl:template name="refine_quote-source-style">
|
13138
|
+
</xsl:template>
|
13139
|
+
|
12911
13140
|
<!-- ====== -->
|
12912
13141
|
<!-- quote -->
|
12913
13142
|
<!-- source -->
|
@@ -12936,6 +13165,7 @@
|
|
12936
13165
|
</fo:block-container>
|
12937
13166
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
12938
13167
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
13168
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
12939
13169
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
12940
13170
|
<xsl:apply-templates select="mn:author"/>
|
12941
13171
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -13065,13 +13295,16 @@
|
|
13065
13295
|
<xsl:attribute-set name="figure-style">
|
13066
13296
|
</xsl:attribute-set>
|
13067
13297
|
|
13298
|
+
<xsl:template name="refine_figure-style">
|
13299
|
+
</xsl:template>
|
13300
|
+
|
13068
13301
|
<xsl:attribute-set name="figure-name-style">
|
13069
13302
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
13070
13303
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
13071
13304
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
13072
13305
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13073
13306
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
13074
|
-
</xsl:attribute-set>
|
13307
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
13075
13308
|
|
13076
13309
|
<xsl:template name="refine_figure-name-style">
|
13077
13310
|
<xsl:if test="ancestor::mn:figure">
|
@@ -13086,7 +13319,7 @@
|
|
13086
13319
|
<xsl:attribute-set name="image-style">
|
13087
13320
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
13088
13321
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
13089
|
-
</xsl:attribute-set>
|
13322
|
+
</xsl:attribute-set> <!-- image-style -->
|
13090
13323
|
|
13091
13324
|
<xsl:template name="refine_image-style">
|
13092
13325
|
<xsl:if test="$vertical_layout = 'true'">
|
@@ -13098,14 +13331,51 @@
|
|
13098
13331
|
<xsl:attribute name="width">100%</xsl:attribute>
|
13099
13332
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
13100
13333
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
13101
|
-
</xsl:attribute-set>
|
13334
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
13335
|
+
|
13336
|
+
<xsl:template name="refine_image-graphic-style">
|
13337
|
+
</xsl:template>
|
13102
13338
|
|
13103
13339
|
<xsl:attribute-set name="figure-source-style">
|
13104
13340
|
</xsl:attribute-set>
|
13105
13341
|
|
13342
|
+
<xsl:template name="refine_figure-source-style">
|
13343
|
+
</xsl:template>
|
13344
|
+
|
13106
13345
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
13107
13346
|
</xsl:attribute-set>
|
13108
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
|
+
|
13109
13379
|
<!-- ============================ -->
|
13110
13380
|
<!-- figure's footnotes rendering -->
|
13111
13381
|
<!-- ============================ -->
|
@@ -13218,9 +13488,8 @@
|
|
13218
13488
|
</fo:table-cell>
|
13219
13489
|
<fo:table-cell>
|
13220
13490
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
13221
|
-
<xsl:
|
13222
|
-
|
13223
|
-
</xsl:if>
|
13491
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
13492
|
+
|
13224
13493
|
<!-- <xsl:copy-of select="./node()"/> -->
|
13225
13494
|
<xsl:apply-templates/>
|
13226
13495
|
</fo:block>
|
@@ -13238,6 +13507,7 @@
|
|
13238
13507
|
<xsl:param name="process">false</xsl:param>
|
13239
13508
|
<xsl:if test="$process = 'true'">
|
13240
13509
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
13510
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
13241
13511
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
13242
13512
|
|
13243
13513
|
<!-- tab is padding-right -->
|
@@ -13275,6 +13545,7 @@
|
|
13275
13545
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
13276
13546
|
</xsl:if>
|
13277
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"/>
|
13278
13549
|
<!-- <xsl:value-of select="@reference"/> -->
|
13279
13550
|
<xsl:apply-templates/>
|
13280
13551
|
</fo:inline>
|
@@ -13325,6 +13596,8 @@
|
|
13325
13596
|
|
13326
13597
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
13327
13598
|
|
13599
|
+
<xsl:call-template name="refine_figure-style"/>
|
13600
|
+
|
13328
13601
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
13329
13602
|
<xsl:call-template name="setIDforNamedDestination"/>
|
13330
13603
|
</xsl:for-each>
|
@@ -13379,6 +13652,7 @@
|
|
13379
13652
|
|
13380
13653
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
13381
13654
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
13655
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
13382
13656
|
<xsl:apply-templates/>
|
13383
13657
|
</fo:block>
|
13384
13658
|
</xsl:template>
|
@@ -13508,6 +13782,8 @@
|
|
13508
13782
|
</xsl:variable>
|
13509
13783
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
13510
13784
|
|
13785
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
13786
|
+
|
13511
13787
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
13512
13788
|
<xsl:variable name="scale">
|
13513
13789
|
<xsl:call-template name="getImageScale">
|
@@ -14215,6 +14491,9 @@
|
|
14215
14491
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
14216
14492
|
</xsl:attribute-set> <!-- formula-style -->
|
14217
14493
|
|
14494
|
+
<xsl:template name="refine_formula-style">
|
14495
|
+
</xsl:template>
|
14496
|
+
|
14218
14497
|
<xsl:attribute-set name="formula-stem-block-style">
|
14219
14498
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
14220
14499
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
@@ -14283,6 +14562,8 @@
|
|
14283
14562
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
14284
14563
|
<fo:block xsl:use-attribute-sets="formula-style">
|
14285
14564
|
|
14565
|
+
<xsl:call-template name="refine_formula-style"/>
|
14566
|
+
|
14286
14567
|
<fo:table table-layout="fixed" width="100%">
|
14287
14568
|
<fo:table-column column-width="95%"/>
|
14288
14569
|
<fo:table-column column-width="5%"/>
|
@@ -14702,6 +14983,9 @@
|
|
14702
14983
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
14703
14984
|
</xsl:attribute-set> <!-- list-name-style -->
|
14704
14985
|
|
14986
|
+
<xsl:template name="refine_list-name-style">
|
14987
|
+
</xsl:template>
|
14988
|
+
|
14705
14989
|
<xsl:attribute-set name="list-item-style">
|
14706
14990
|
</xsl:attribute-set>
|
14707
14991
|
|
@@ -15029,6 +15313,7 @@
|
|
15029
15313
|
<xsl:param name="process">false</xsl:param>
|
15030
15314
|
<xsl:if test="$process = 'true'">
|
15031
15315
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
15316
|
+
<xsl:call-template name="refine_list-name-style"/>
|
15032
15317
|
<xsl:apply-templates/>
|
15033
15318
|
</fo:block>
|
15034
15319
|
</xsl:if>
|
@@ -15089,38 +15374,67 @@
|
|
15089
15374
|
<!-- END Lists processing -->
|
15090
15375
|
<!-- ===================================== -->
|
15091
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
|
+
|
15092
15391
|
<xsl:attribute-set name="fn-reference-style">
|
15093
15392
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
15094
15393
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15095
15394
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
15096
15395
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15097
15396
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
15098
|
-
|
15099
|
-
</xsl:attribute-set>
|
15397
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
15100
15398
|
|
15101
15399
|
<xsl:template name="refine_fn-reference-style">
|
15102
15400
|
<xsl:if test="not($vertical_layout = 'true')">
|
15103
15401
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15104
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>
|
15105
15405
|
</xsl:template> <!-- refine_fn-reference-style -->
|
15106
15406
|
|
15107
15407
|
<xsl:attribute-set name="fn-style">
|
15108
15408
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15109
15409
|
</xsl:attribute-set>
|
15110
15410
|
|
15411
|
+
<xsl:template name="refine_fn-style">
|
15412
|
+
</xsl:template>
|
15413
|
+
|
15111
15414
|
<xsl:attribute-set name="fn-num-style">
|
15112
15415
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15113
15416
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
15114
15417
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15115
15418
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
15116
|
-
</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>
|
15117
15431
|
|
15118
15432
|
<xsl:attribute-set name="fn-body-style">
|
15119
15433
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
15120
15434
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
15121
15435
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
15122
15436
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
15123
|
-
</xsl:attribute-set>
|
15437
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
15124
15438
|
|
15125
15439
|
<xsl:template name="refine_fn-body-style">
|
15126
15440
|
<xsl:if test="not($vertical_layout = 'true')">
|
@@ -15203,21 +15517,12 @@
|
|
15203
15517
|
<xsl:choose>
|
15204
15518
|
<xsl:when test="ancestor::mn:bibitem">
|
15205
15519
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
15206
|
-
<xsl:
|
15207
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15208
|
-
</xsl:if>
|
15520
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
15209
15521
|
</fn_styles>
|
15210
15522
|
</xsl:when>
|
15211
15523
|
<xsl:otherwise>
|
15212
15524
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
15213
|
-
<xsl:
|
15214
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15215
|
-
</xsl:if>
|
15216
|
-
<xsl:if test="$vertical_layout = 'true'">
|
15217
|
-
<xsl:attribute name="vertical-align">baseline</xsl:attribute>
|
15218
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
15219
|
-
<xsl:attribute name="baseline-shift">20%</xsl:attribute>
|
15220
|
-
</xsl:if>
|
15525
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
15221
15526
|
</fn_styles>
|
15222
15527
|
</xsl:otherwise>
|
15223
15528
|
</xsl:choose>
|
@@ -15227,9 +15532,12 @@
|
|
15227
15532
|
<xsl:copy-of select="."/>
|
15228
15533
|
</xsl:for-each>
|
15229
15534
|
|
15230
|
-
|
15535
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
15536
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
15231
15537
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
15232
|
-
</xsl:if>
|
15538
|
+
</xsl:if> -->
|
15539
|
+
|
15540
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
15233
15541
|
|
15234
15542
|
<xsl:call-template name="insert_basic_link">
|
15235
15543
|
<xsl:with-param name="element">
|
@@ -15263,10 +15571,12 @@
|
|
15263
15571
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
15264
15572
|
|
15265
15573
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
15574
|
+
<xsl:call-template name="refine_fn-style"/>
|
15266
15575
|
<xsl:copy-of select="$footnote_inline"/>
|
15267
15576
|
<fo:footnote-body role="Note">
|
15268
15577
|
|
15269
15578
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
15579
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
15270
15580
|
|
15271
15581
|
<xsl:variable name="fn_block">
|
15272
15582
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -15401,17 +15711,30 @@
|
|
15401
15711
|
<xsl:attribute-set name="admonition-style">
|
15402
15712
|
</xsl:attribute-set> <!-- admonition-style -->
|
15403
15713
|
|
15714
|
+
<xsl:template name="refine_admonition-style">
|
15715
|
+
</xsl:template>
|
15716
|
+
|
15404
15717
|
<xsl:attribute-set name="admonition-container-style">
|
15405
15718
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
15406
15719
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
15407
15720
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
15408
15721
|
|
15722
|
+
<xsl:template name="refine_admonition-container-style">
|
15723
|
+
</xsl:template>
|
15724
|
+
|
15409
15725
|
<xsl:attribute-set name="admonition-name-style">
|
15410
15726
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
15411
15727
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
15412
15728
|
|
15729
|
+
<xsl:template name="refine_admonition-name-style">
|
15730
|
+
</xsl:template>
|
15731
|
+
|
15413
15732
|
<xsl:attribute-set name="admonition-p-style">
|
15414
15733
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
15734
|
+
|
15735
|
+
<xsl:template name="refine_admonition-p-style">
|
15736
|
+
</xsl:template>
|
15737
|
+
|
15415
15738
|
<!-- end admonition -->
|
15416
15739
|
|
15417
15740
|
<!-- ================ -->
|
@@ -15421,8 +15744,12 @@
|
|
15421
15744
|
<xsl:call-template name="setNamedDestination"/>
|
15422
15745
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
15423
15746
|
|
15747
|
+
<xsl:call-template name="refine_admonition-style"/>
|
15748
|
+
|
15424
15749
|
<xsl:call-template name="setBlockSpanAll"/>
|
15425
15750
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
15751
|
+
|
15752
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
15426
15753
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
15427
15754
|
<fo:block>
|
15428
15755
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -15478,6 +15805,7 @@
|
|
15478
15805
|
|
15479
15806
|
<xsl:template match="mn:admonition/mn:p">
|
15480
15807
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
15808
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
15481
15809
|
|
15482
15810
|
<xsl:apply-templates/>
|
15483
15811
|
</fo:block>
|
@@ -15487,6 +15815,13 @@
|
|
15487
15815
|
<!-- END Admonition -->
|
15488
15816
|
<!-- ================ -->
|
15489
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
|
+
|
15490
15825
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
15491
15826
|
<xsl:attribute-set name="bibitem-normative-style">
|
15492
15827
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -15494,32 +15829,53 @@
|
|
15494
15829
|
<xsl:attribute name="text-indent">-6mm</xsl:attribute>
|
15495
15830
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
15496
15831
|
|
15832
|
+
<xsl:template name="refine_bibitem-normative-style">
|
15833
|
+
</xsl:template>
|
15834
|
+
|
15497
15835
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
15498
15836
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
15499
15837
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
15500
15838
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
15501
15839
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
15502
15840
|
|
15841
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
15842
|
+
</xsl:template>
|
15843
|
+
|
15503
15844
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
15504
15845
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
15505
15846
|
|
15847
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
15848
|
+
</xsl:template>
|
15849
|
+
|
15506
15850
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
15507
15851
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
15508
15852
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
15509
15853
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
15510
15854
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
15511
15855
|
|
15856
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
15857
|
+
</xsl:template>
|
15858
|
+
|
15512
15859
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
15513
15860
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
15514
15861
|
</xsl:attribute-set>
|
15515
15862
|
|
15863
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
15864
|
+
</xsl:template>
|
15865
|
+
|
15516
15866
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
15517
15867
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
15518
15868
|
</xsl:attribute-set>
|
15519
15869
|
|
15870
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
15871
|
+
</xsl:template>
|
15872
|
+
|
15520
15873
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
15521
15874
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
15522
15875
|
|
15876
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
15877
|
+
</xsl:template>
|
15878
|
+
|
15523
15879
|
<!-- footnote reference number for bibitem, in the text -->
|
15524
15880
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
15525
15881
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -15529,6 +15885,12 @@
|
|
15529
15885
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
15530
15886
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
15531
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
|
+
|
15532
15894
|
<!-- footnote number on the page bottom -->
|
15533
15895
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
15534
15896
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -15544,6 +15906,9 @@
|
|
15544
15906
|
<xsl:attribute-set name="references-non-normative-style">
|
15545
15907
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
15546
15908
|
|
15909
|
+
<xsl:template name="refine_references-non-normative-style">
|
15910
|
+
</xsl:template>
|
15911
|
+
|
15547
15912
|
<!-- ======================= -->
|
15548
15913
|
<!-- Bibliography rendering -->
|
15549
15914
|
<!-- ======================= -->
|
@@ -15595,6 +15960,7 @@
|
|
15595
15960
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
15596
15961
|
|
15597
15962
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
15963
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
15598
15964
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
15599
15965
|
<!-- render footnotes after references -->
|
15600
15966
|
<xsl:apply-templates select=".//mn:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
|
@@ -15614,6 +15980,7 @@
|
|
15614
15980
|
<fo:block-container margin-left="6mm" role="SKIP">
|
15615
15981
|
<fo:block-container margin-left="0mm" role="SKIP">
|
15616
15982
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
15983
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
15617
15984
|
<xsl:call-template name="processBibitem"/>
|
15618
15985
|
</fo:block>
|
15619
15986
|
</fo:block-container>
|
@@ -15622,12 +15989,14 @@
|
|
15622
15989
|
</xsl:template> <!-- bibitem -->
|
15623
15990
|
|
15624
15991
|
<!-- Bibliography (non-normative references) -->
|
15625
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
15992
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
15626
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
|
15627
15994
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
15628
15995
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
15629
15996
|
<xsl:call-template name="setNamedDestination"/>
|
15630
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
|
+
|
15631
16000
|
<fo:list-item>
|
15632
16001
|
<fo:list-item-label end-indent="label-end()">
|
15633
16002
|
<fo:block role="SKIP">
|
@@ -15640,6 +16009,7 @@
|
|
15640
16009
|
</fo:list-item-label>
|
15641
16010
|
<fo:list-item-body start-indent="body-start()">
|
15642
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"/>
|
15643
16013
|
<xsl:call-template name="processBibitem">
|
15644
16014
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
15645
16015
|
</xsl:call-template>
|
@@ -15650,12 +16020,17 @@
|
|
15650
16020
|
|
15651
16021
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
15652
16022
|
|
16023
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
16024
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
16025
|
+
|
15653
16026
|
<xsl:template name="insertListItem_Bibitem">
|
15654
16027
|
<xsl:choose>
|
15655
16028
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
15656
16029
|
<xsl:otherwise>
|
15657
16030
|
<xsl:call-template name="setNamedDestination"/>
|
15658
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
|
+
|
15659
16034
|
<fo:list-item-label end-indent="label-end()">
|
15660
16035
|
<fo:block role="SKIP">
|
15661
16036
|
<fo:inline role="SKIP">
|
@@ -15666,16 +16041,18 @@
|
|
15666
16041
|
</fo:block>
|
15667
16042
|
</fo:list-item-label>
|
15668
16043
|
<fo:list-item-body start-indent="body-start()">
|
15669
|
-
<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"/>
|
15670
16046
|
<xsl:call-template name="processBibitem">
|
15671
16047
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
15672
16048
|
</xsl:call-template>
|
15673
16049
|
</fo:block>
|
16050
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
15674
16051
|
</fo:list-item-body>
|
15675
16052
|
</fo:list-item>
|
15676
16053
|
</xsl:otherwise>
|
15677
16054
|
</xsl:choose>
|
15678
|
-
<xsl:apply-templates select="following-sibling::*[
|
16055
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
15679
16056
|
<xsl:with-param name="skip">false</xsl:with-param>
|
15680
16057
|
</xsl:apply-templates>
|
15681
16058
|
</xsl:template>
|
@@ -15694,24 +16071,16 @@
|
|
15694
16071
|
</xsl:apply-templates>
|
15695
16072
|
</fo:inline>
|
15696
16073
|
<xsl:apply-templates select="mn:formattedref"/>
|
16074
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
15697
16075
|
|
15698
|
-
<xsl:call-template name="processBibliographyNote"/>
|
15699
16076
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
15700
16077
|
|
15701
|
-
<xsl:template name="
|
15702
|
-
|
15703
|
-
|
15704
|
-
|
15705
|
-
<xsl:copy> <!-- skip @id -->
|
15706
|
-
<xsl:copy-of select="node()"/>
|
15707
|
-
</xsl:copy>
|
15708
|
-
</xsl:element>
|
15709
|
-
</xsl:variable>
|
15710
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
15711
|
-
<xsl:call-template name="note"/>
|
15712
|
-
</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]]">
|
15713
16082
|
<xsl:call-template name="note"/>
|
15714
|
-
</xsl:
|
16083
|
+
</xsl:for-each>
|
15715
16084
|
</xsl:template>
|
15716
16085
|
|
15717
16086
|
<xsl:template match="mn:title" mode="title">
|
@@ -15911,11 +16280,17 @@
|
|
15911
16280
|
<!-- Index section styles -->
|
15912
16281
|
<xsl:attribute-set name="indexsect-title-style">
|
15913
16282
|
<xsl:attribute name="role">H1</xsl:attribute>
|
15914
|
-
</xsl:attribute-set>
|
16283
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
16284
|
+
|
16285
|
+
<xsl:template name="refine_indexsect-title-style">
|
16286
|
+
</xsl:template>
|
15915
16287
|
|
15916
16288
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
15917
16289
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
15918
|
-
</xsl:attribute-set>
|
16290
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
16291
|
+
|
16292
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
16293
|
+
</xsl:template>
|
15919
16294
|
<!-- End Index section styles -->
|
15920
16295
|
|
15921
16296
|
<!-- =================== -->
|
@@ -16109,6 +16484,7 @@
|
|
16109
16484
|
|
16110
16485
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
16111
16486
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
16487
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
16112
16488
|
<!-- Index -->
|
16113
16489
|
<xsl:apply-templates/>
|
16114
16490
|
</fo:block>
|
@@ -16117,6 +16493,7 @@
|
|
16117
16493
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
16118
16494
|
<!-- Letter A, B, C, ... -->
|
16119
16495
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
16496
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
16120
16497
|
<xsl:apply-templates/>
|
16121
16498
|
</fo:block>
|
16122
16499
|
</xsl:template>
|
@@ -16159,13 +16536,31 @@
|
|
16159
16536
|
<!-- skip here, see the template 'fmt-review-start' -->
|
16160
16537
|
</xsl:when>
|
16161
16538
|
<xsl:otherwise>
|
16162
|
-
|
16163
|
-
|
16164
|
-
|
16165
|
-
|
16539
|
+
<xsl:choose>
|
16540
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
16541
|
+
<fo:block font-size="1pt" line-height="0.1">
|
16542
|
+
<xsl:call-template name="fo_inline_bookmark">
|
16543
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
16544
|
+
</xsl:call-template>
|
16545
|
+
</fo:block>
|
16546
|
+
</xsl:when>
|
16547
|
+
<xsl:otherwise>
|
16548
|
+
<xsl:call-template name="fo_inline_bookmark">
|
16549
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
16550
|
+
</xsl:call-template>
|
16551
|
+
</xsl:otherwise>
|
16552
|
+
</xsl:choose>
|
16166
16553
|
</xsl:otherwise>
|
16167
16554
|
</xsl:choose>
|
16168
16555
|
</xsl:template>
|
16556
|
+
|
16557
|
+
<xsl:template name="fo_inline_bookmark">
|
16558
|
+
<xsl:param name="bookmark_id"/>
|
16559
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
16560
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
16561
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
16562
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
16563
|
+
</xsl:template>
|
16169
16564
|
<!-- =================== -->
|
16170
16565
|
<!-- End of Index processing -->
|
16171
16566
|
<!-- =================== -->
|
@@ -16323,9 +16718,15 @@
|
|
16323
16718
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
16324
16719
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
16325
16720
|
|
16721
|
+
<xsl:template name="refine_toc-leader-style">
|
16722
|
+
</xsl:template>
|
16723
|
+
|
16326
16724
|
<xsl:attribute-set name="toc-pagenumber-style">
|
16327
16725
|
</xsl:attribute-set>
|
16328
16726
|
|
16727
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
16728
|
+
</xsl:template>
|
16729
|
+
|
16329
16730
|
<!-- List of Figures, Tables -->
|
16330
16731
|
<xsl:attribute-set name="toc-listof-title-style">
|
16331
16732
|
</xsl:attribute-set>
|
@@ -16336,10 +16737,16 @@
|
|
16336
16737
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
16337
16738
|
</xsl:attribute-set>
|
16338
16739
|
|
16740
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
16741
|
+
</xsl:template>
|
16742
|
+
|
16339
16743
|
<xsl:attribute-set name="toc-listof-item-style">
|
16340
16744
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
16341
16745
|
</xsl:attribute-set>
|
16342
16746
|
|
16747
|
+
<xsl:template name="refine_toc-listof-item-style">
|
16748
|
+
</xsl:template>
|
16749
|
+
|
16343
16750
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
16344
16751
|
<xsl:variable name="nodes_preface_">
|
16345
16752
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -17446,23 +17853,55 @@
|
|
17446
17853
|
<!-- Ruby text (CJK languages) rendering -->
|
17447
17854
|
<!-- ===================================== -->
|
17448
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 >= $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
|
+
|
17449
17902
|
<xsl:template match="mn:ruby">
|
17450
|
-
<fo:inline-container
|
17451
|
-
<xsl:
|
17452
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
17453
|
-
</xsl:if>
|
17454
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
17455
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
17456
|
-
<!-- Example: width="2em" -->
|
17457
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
17458
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
17459
|
-
<xsl:variable name="text_width">
|
17460
|
-
<xsl:choose>
|
17461
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
17462
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
17463
|
-
</xsl:choose>
|
17464
|
-
</xsl:variable>
|
17465
|
-
<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"/>
|
17466
17905
|
|
17467
17906
|
<xsl:choose>
|
17468
17907
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -17480,17 +17919,14 @@
|
|
17480
17919
|
</xsl:template>
|
17481
17920
|
|
17482
17921
|
<xsl:template match="mn:rb">
|
17483
|
-
<fo:block
|
17922
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
17484
17923
|
</xsl:template>
|
17485
17924
|
|
17486
17925
|
<xsl:template match="mn:rt">
|
17487
|
-
<fo:block
|
17488
|
-
<xsl:
|
17489
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
17490
|
-
</xsl:if>
|
17926
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
17927
|
+
<xsl:call-template name="refine_rt-style"/>
|
17491
17928
|
<xsl:apply-templates/>
|
17492
17929
|
</fo:block>
|
17493
|
-
|
17494
17930
|
</xsl:template>
|
17495
17931
|
|
17496
17932
|
<!-- ===================================== -->
|
@@ -17499,6 +17935,18 @@
|
|
17499
17935
|
<!-- ===================================== -->
|
17500
17936
|
<!-- ===================================== -->
|
17501
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
|
+
|
17502
17950
|
<xsl:template name="processPrefaceSectionsDefault">
|
17503
17951
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
17504
17952
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -18054,11 +18502,35 @@
|
|
18054
18502
|
|
18055
18503
|
<xsl:template match="mn:svgmap"/>
|
18056
18504
|
|
18505
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
18506
|
+
|
18057
18507
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
18058
18508
|
<xsl:template match="*[local-name() = 'lang_none']">
|
18059
18509
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
18060
18510
|
</xsl:template>
|
18061
18511
|
|
18512
|
+
<xsl:template name="addTagElementT">
|
18513
|
+
<xsl:variable name="title_">
|
18514
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
18515
|
+
</xsl:variable>
|
18516
|
+
<xsl:variable name="title__">
|
18517
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
18518
|
+
<xsl:choose>
|
18519
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
18520
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
18521
|
+
</xsl:choose>
|
18522
|
+
</xsl:for-each>
|
18523
|
+
</xsl:variable>
|
18524
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
18525
|
+
<xsl:if test="$title != ''">
|
18526
|
+
<xsl:attribute name="fox:title">
|
18527
|
+
<xsl:if test="ancestor::mn:sections">
|
18528
|
+
<xsl:text>Section </xsl:text>
|
18529
|
+
</xsl:if>
|
18530
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
18531
|
+
</xsl:if>
|
18532
|
+
</xsl:template>
|
18533
|
+
|
18062
18534
|
<xsl:template name="replaceChar">
|
18063
18535
|
<xsl:param name="text"/>
|
18064
18536
|
<xsl:param name="replace"/>
|
@@ -18849,6 +19321,13 @@
|
|
18849
19321
|
<xsl:with-param name="default" select="$text_align_default"/>
|
18850
19322
|
</xsl:call-template>
|
18851
19323
|
<xsl:call-template name="setKeepAttributes"/>
|
19324
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
19325
|
+
<xsl:variable name="styles">
|
19326
|
+
<xsl:apply-templates select="*[1]"/>
|
19327
|
+
</xsl:variable>
|
19328
|
+
<!-- move attribute line-height from inline to block -->
|
19329
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
19330
|
+
</xsl:if>
|
18852
19331
|
</xsl:template>
|
18853
19332
|
|
18854
19333
|
<xsl:template name="setKeepAttributes">
|
@@ -18874,34 +19353,41 @@
|
|
18874
19353
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
18875
19354
|
<fo:block>
|
18876
19355
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
18877
|
-
|
18878
|
-
|
18879
|
-
|
18880
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
18881
|
-
<xsl:call-template name="getSVG"/>
|
18882
|
-
</fo:instream-foreign-object>
|
18883
|
-
</xsl:when>
|
18884
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
18885
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
18886
|
-
</xsl:when>
|
18887
|
-
<xsl:otherwise> <!-- bitmap image -->
|
18888
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
18889
|
-
<xsl:if test="$coverimage_src != ''">
|
18890
|
-
<xsl:variable name="coverpage">
|
18891
|
-
<xsl:call-template name="getImageURL">
|
18892
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
18893
|
-
</xsl:call-template>
|
18894
|
-
</xsl:variable>
|
18895
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
18896
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
18897
|
-
</xsl:if>
|
18898
|
-
</xsl:otherwise>
|
18899
|
-
</xsl:choose>
|
19356
|
+
|
19357
|
+
<xsl:call-template name="insertPageImage"/>
|
19358
|
+
|
18900
19359
|
</xsl:for-each>
|
18901
19360
|
</fo:block>
|
18902
19361
|
</fo:block-container>
|
18903
19362
|
</xsl:template>
|
18904
19363
|
|
19364
|
+
<xsl:template name="insertPageImage">
|
19365
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
19366
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
19367
|
+
<xsl:choose>
|
19368
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
19369
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
19370
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
19371
|
+
<xsl:call-template name="getSVG"/>
|
19372
|
+
</fo:instream-foreign-object>
|
19373
|
+
</xsl:when>
|
19374
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
19375
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
19376
|
+
</xsl:when>
|
19377
|
+
<xsl:otherwise> <!-- bitmap image -->
|
19378
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
19379
|
+
<xsl:if test="$coverimage_src != ''">
|
19380
|
+
<xsl:variable name="coverpage">
|
19381
|
+
<xsl:call-template name="getImageURL">
|
19382
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
19383
|
+
</xsl:call-template>
|
19384
|
+
</xsl:variable>
|
19385
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
19386
|
+
</xsl:if>
|
19387
|
+
</xsl:otherwise>
|
19388
|
+
</xsl:choose>
|
19389
|
+
</xsl:template>
|
19390
|
+
|
18905
19391
|
<xsl:template name="getImageURL">
|
18906
19392
|
<xsl:param name="src"/>
|
18907
19393
|
<xsl:choose>
|
@@ -19329,6 +19815,14 @@
|
|
19329
19815
|
</xsl:attribute>
|
19330
19816
|
</xsl:template>
|
19331
19817
|
|
19818
|
+
<xsl:template name="getCharByCodePoint">
|
19819
|
+
<xsl:param name="codepoint"/>
|
19820
|
+
<xsl:param name="radix">16</xsl:param>
|
19821
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
19822
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
19823
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
19824
|
+
</xsl:template>
|
19825
|
+
|
19332
19826
|
<xsl:template name="substring-after-last">
|
19333
19827
|
<xsl:param name="value"/>
|
19334
19828
|
<xsl:param name="delimiter"/>
|