metanorma-ogc 2.5.4 → 2.5.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.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +50 -7
- data/lib/isodoc/ogc/ogc.best-practice.xsl +50 -7
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +50 -7
- data/lib/isodoc/ogc/ogc.community-practice.xsl +50 -7
- data/lib/isodoc/ogc/ogc.community-standard.xsl +50 -7
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +50 -7
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +50 -7
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +50 -7
- data/lib/isodoc/ogc/ogc.other.xsl +50 -7
- data/lib/isodoc/ogc/ogc.policy.xsl +50 -7
- data/lib/isodoc/ogc/ogc.reference-model.xsl +50 -7
- data/lib/isodoc/ogc/ogc.release-notes.xsl +50 -7
- data/lib/isodoc/ogc/ogc.standard.xsl +50 -7
- data/lib/isodoc/ogc/ogc.test-suite.xsl +50 -7
- data/lib/isodoc/ogc/ogc.user-guide.xsl +50 -7
- data/lib/isodoc/ogc/ogc.white-paper.xsl +50 -7
- data/lib/metanorma/ogc/biblio.rng +24 -8
- data/lib/metanorma/ogc/front.rb +1 -1
- data/lib/metanorma/ogc/isodoc.rng +67 -55
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35eb5d112459eeed0144cd0540f405b6d0747de419d8480cde65847345378228
|
|
4
|
+
data.tar.gz: c0fc6b930e03b9602a1608abb8341af9f9dc36fb0f59c45fe72341a441564a0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa414b2a8de42c48ec54c897536126b37f83f025fec56726692bce77a4a2699ec7510ef4c55876d885ec14bcc59af350e758d0dc1ab63b5a58b76c629937904c
|
|
7
|
+
data.tar.gz: 370285842b061ab348ddc3b6d8316e57179e6c3107ca08229881f83e9f223c83b1c144a38749df6150236c182b7e4058d845f4c176580030b569ee21d97caff8
|
|
@@ -1813,6 +1813,7 @@
|
|
|
1813
1813
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
|
1814
1814
|
<xsl:variable name="hair_space"> </xsl:variable>
|
|
1815
1815
|
<xsl:variable name="en_dash">–</xsl:variable>
|
|
1816
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
|
1816
1817
|
|
|
1817
1818
|
<xsl:template name="getTitle">
|
|
1818
1819
|
<xsl:param name="name"/>
|
|
@@ -2193,6 +2194,10 @@
|
|
|
2193
2194
|
|
|
2194
2195
|
</xsl:attribute-set> <!-- example-name-style -->
|
|
2195
2196
|
|
|
2197
|
+
<xsl:template name="refine_example-name-style">
|
|
2198
|
+
|
|
2199
|
+
</xsl:template>
|
|
2200
|
+
|
|
2196
2201
|
<xsl:attribute-set name="example-p-style">
|
|
2197
2202
|
|
|
2198
2203
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
|
@@ -2209,6 +2214,10 @@
|
|
|
2209
2214
|
|
|
2210
2215
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
|
2211
2216
|
|
|
2217
|
+
<xsl:template name="refine_termexample-name-style">
|
|
2218
|
+
|
|
2219
|
+
</xsl:template>
|
|
2220
|
+
|
|
2212
2221
|
<!-- ========================== -->
|
|
2213
2222
|
<!-- Table styles -->
|
|
2214
2223
|
<!-- ========================== -->
|
|
@@ -2398,6 +2407,10 @@
|
|
|
2398
2407
|
|
|
2399
2408
|
</xsl:attribute-set> <!-- table-fn-style -->
|
|
2400
2409
|
|
|
2410
|
+
<xsl:template name="refine_table-fn-style">
|
|
2411
|
+
|
|
2412
|
+
</xsl:template>
|
|
2413
|
+
|
|
2401
2414
|
<xsl:attribute-set name="table-fn-number-style">
|
|
2402
2415
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
2403
2416
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
|
@@ -2406,6 +2419,10 @@
|
|
|
2406
2419
|
|
|
2407
2420
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
|
2408
2421
|
|
|
2422
|
+
<xsl:template name="refine_table-fn-number-style">
|
|
2423
|
+
|
|
2424
|
+
</xsl:template>
|
|
2425
|
+
|
|
2409
2426
|
<xsl:attribute-set name="fn-container-body-style">
|
|
2410
2427
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
|
2411
2428
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
|
@@ -4840,8 +4857,9 @@
|
|
|
4840
4857
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
4841
4858
|
|
|
4842
4859
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
|
4843
|
-
|
|
4860
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
|
4844
4861
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
|
4862
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
|
4845
4863
|
|
|
4846
4864
|
<xsl:value-of select="@reference"/>
|
|
4847
4865
|
|
|
@@ -6002,11 +6020,16 @@
|
|
|
6002
6020
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
6003
6021
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
|
6004
6022
|
<xsl:variable name="text" select="."/>
|
|
6005
|
-
<
|
|
6023
|
+
<xsl:variable name="ratio_">
|
|
6024
|
+
0.75
|
|
6025
|
+
</xsl:variable>
|
|
6026
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
|
6027
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
|
6006
6028
|
<xsl:if test="string-length($text) > 0">
|
|
6007
6029
|
<xsl:variable name="smallCapsText">
|
|
6008
6030
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6009
6031
|
<xsl:with-param name="text" select="$text"/>
|
|
6032
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6010
6033
|
</xsl:call-template>
|
|
6011
6034
|
</xsl:variable>
|
|
6012
6035
|
<!-- merge neighboring fo:inline -->
|
|
@@ -6043,12 +6066,13 @@
|
|
|
6043
6066
|
|
|
6044
6067
|
<xsl:template name="recursiveSmallCaps">
|
|
6045
6068
|
<xsl:param name="text"/>
|
|
6069
|
+
<xsl:param name="ratio"/>
|
|
6046
6070
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
|
6047
6071
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
|
6048
6072
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
|
6049
6073
|
<xsl:choose>
|
|
6050
6074
|
<xsl:when test="$char=$upperCase">
|
|
6051
|
-
<fo:inline font-size="{100 div
|
|
6075
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
|
6052
6076
|
<xsl:value-of select="$upperCase"/>
|
|
6053
6077
|
</fo:inline>
|
|
6054
6078
|
</xsl:when>
|
|
@@ -6059,6 +6083,7 @@
|
|
|
6059
6083
|
<xsl:if test="string-length($text) > 1">
|
|
6060
6084
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6061
6085
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
|
6086
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6062
6087
|
</xsl:call-template>
|
|
6063
6088
|
</xsl:if>
|
|
6064
6089
|
</xsl:template>
|
|
@@ -6095,6 +6120,9 @@
|
|
|
6095
6120
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
|
6096
6121
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
|
6097
6122
|
</xsl:if>
|
|
6123
|
+
<xsl:if test="$key = 'text-indent'">
|
|
6124
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
|
6125
|
+
</xsl:if>
|
|
6098
6126
|
</xsl:for-each>
|
|
6099
6127
|
</xsl:variable>
|
|
6100
6128
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7501,6 +7529,11 @@
|
|
|
7501
7529
|
</xsl:call-template>
|
|
7502
7530
|
</xsl:template>
|
|
7503
7531
|
|
|
7532
|
+
<!-- command between two xref points to non-standard bibitem -->
|
|
7533
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
|
7534
|
+
<xsl:value-of select="."/>
|
|
7535
|
+
</xsl:template>
|
|
7536
|
+
|
|
7504
7537
|
<!-- ====== -->
|
|
7505
7538
|
<!-- formula -->
|
|
7506
7539
|
<!-- ====== -->
|
|
@@ -8206,6 +8239,8 @@
|
|
|
8206
8239
|
</xsl:attribute>
|
|
8207
8240
|
</xsl:template>
|
|
8208
8241
|
|
|
8242
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
|
8243
|
+
|
|
8209
8244
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
|
8210
8245
|
<xsl:copy>
|
|
8211
8246
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
|
@@ -8224,7 +8259,8 @@
|
|
|
8224
8259
|
|
|
8225
8260
|
<xsl:attribute name="width">
|
|
8226
8261
|
<xsl:choose>
|
|
8227
|
-
|
|
8262
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8263
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8228
8264
|
<xsl:when test="$width != ''">
|
|
8229
8265
|
<xsl:value-of select="round($width)"/>
|
|
8230
8266
|
</xsl:when>
|
|
@@ -8233,7 +8269,8 @@
|
|
|
8233
8269
|
</xsl:attribute>
|
|
8234
8270
|
<xsl:attribute name="height">
|
|
8235
8271
|
<xsl:choose>
|
|
8236
|
-
|
|
8272
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8273
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8237
8274
|
<xsl:when test="$height != ''">
|
|
8238
8275
|
<xsl:value-of select="round($height)"/>
|
|
8239
8276
|
</xsl:when>
|
|
@@ -8250,7 +8287,7 @@
|
|
|
8250
8287
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
|
8251
8288
|
<xsl:attribute name="width">
|
|
8252
8289
|
<xsl:choose>
|
|
8253
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
|
8290
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8254
8291
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8255
8292
|
</xsl:choose>
|
|
8256
8293
|
</xsl:attribute>
|
|
@@ -8261,7 +8298,7 @@
|
|
|
8261
8298
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
|
8262
8299
|
<xsl:attribute name="height">
|
|
8263
8300
|
<xsl:choose>
|
|
8264
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
|
8301
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8265
8302
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8266
8303
|
</xsl:choose>
|
|
8267
8304
|
</xsl:attribute>
|
|
@@ -9775,6 +9812,7 @@
|
|
|
9775
9812
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
|
9776
9813
|
<xsl:if test="normalize-space() != ''">
|
|
9777
9814
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
|
9815
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
|
9778
9816
|
<xsl:apply-templates/>
|
|
9779
9817
|
</fo:inline>
|
|
9780
9818
|
</xsl:if>
|
|
@@ -9925,6 +9963,7 @@
|
|
|
9925
9963
|
</xsl:when>
|
|
9926
9964
|
<xsl:otherwise>
|
|
9927
9965
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
|
9966
|
+
<xsl:call-template name="refine_example-name-style"/>
|
|
9928
9967
|
<xsl:apply-templates/>:
|
|
9929
9968
|
</fo:inline>
|
|
9930
9969
|
</xsl:otherwise>
|
|
@@ -11128,6 +11167,7 @@
|
|
|
11128
11167
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
|
11129
11168
|
|
|
11130
11169
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
|
11170
|
+
|
|
11131
11171
|
<xsl:call-template name="processBibitem"/>
|
|
11132
11172
|
</fo:block>
|
|
11133
11173
|
|
|
@@ -11169,6 +11209,7 @@
|
|
|
11169
11209
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
|
11170
11210
|
<xsl:otherwise>
|
|
11171
11211
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
|
11212
|
+
|
|
11172
11213
|
<fo:list-item-label end-indent="label-end()">
|
|
11173
11214
|
<fo:block role="SKIP">
|
|
11174
11215
|
<fo:inline role="SKIP">
|
|
@@ -12934,4 +12975,6 @@
|
|
|
12934
12975
|
</xsl:if>
|
|
12935
12976
|
</xsl:template>
|
|
12936
12977
|
|
|
12978
|
+
<!-- update -->
|
|
12979
|
+
|
|
12937
12980
|
</xsl:stylesheet>
|
|
@@ -1813,6 +1813,7 @@
|
|
|
1813
1813
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
|
1814
1814
|
<xsl:variable name="hair_space"> </xsl:variable>
|
|
1815
1815
|
<xsl:variable name="en_dash">–</xsl:variable>
|
|
1816
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
|
1816
1817
|
|
|
1817
1818
|
<xsl:template name="getTitle">
|
|
1818
1819
|
<xsl:param name="name"/>
|
|
@@ -2193,6 +2194,10 @@
|
|
|
2193
2194
|
|
|
2194
2195
|
</xsl:attribute-set> <!-- example-name-style -->
|
|
2195
2196
|
|
|
2197
|
+
<xsl:template name="refine_example-name-style">
|
|
2198
|
+
|
|
2199
|
+
</xsl:template>
|
|
2200
|
+
|
|
2196
2201
|
<xsl:attribute-set name="example-p-style">
|
|
2197
2202
|
|
|
2198
2203
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
|
@@ -2209,6 +2214,10 @@
|
|
|
2209
2214
|
|
|
2210
2215
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
|
2211
2216
|
|
|
2217
|
+
<xsl:template name="refine_termexample-name-style">
|
|
2218
|
+
|
|
2219
|
+
</xsl:template>
|
|
2220
|
+
|
|
2212
2221
|
<!-- ========================== -->
|
|
2213
2222
|
<!-- Table styles -->
|
|
2214
2223
|
<!-- ========================== -->
|
|
@@ -2398,6 +2407,10 @@
|
|
|
2398
2407
|
|
|
2399
2408
|
</xsl:attribute-set> <!-- table-fn-style -->
|
|
2400
2409
|
|
|
2410
|
+
<xsl:template name="refine_table-fn-style">
|
|
2411
|
+
|
|
2412
|
+
</xsl:template>
|
|
2413
|
+
|
|
2401
2414
|
<xsl:attribute-set name="table-fn-number-style">
|
|
2402
2415
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
2403
2416
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
|
@@ -2406,6 +2419,10 @@
|
|
|
2406
2419
|
|
|
2407
2420
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
|
2408
2421
|
|
|
2422
|
+
<xsl:template name="refine_table-fn-number-style">
|
|
2423
|
+
|
|
2424
|
+
</xsl:template>
|
|
2425
|
+
|
|
2409
2426
|
<xsl:attribute-set name="fn-container-body-style">
|
|
2410
2427
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
|
2411
2428
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
|
@@ -4840,8 +4857,9 @@
|
|
|
4840
4857
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
4841
4858
|
|
|
4842
4859
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
|
4843
|
-
|
|
4860
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
|
4844
4861
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
|
4862
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
|
4845
4863
|
|
|
4846
4864
|
<xsl:value-of select="@reference"/>
|
|
4847
4865
|
|
|
@@ -6002,11 +6020,16 @@
|
|
|
6002
6020
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
6003
6021
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
|
6004
6022
|
<xsl:variable name="text" select="."/>
|
|
6005
|
-
<
|
|
6023
|
+
<xsl:variable name="ratio_">
|
|
6024
|
+
0.75
|
|
6025
|
+
</xsl:variable>
|
|
6026
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
|
6027
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
|
6006
6028
|
<xsl:if test="string-length($text) > 0">
|
|
6007
6029
|
<xsl:variable name="smallCapsText">
|
|
6008
6030
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6009
6031
|
<xsl:with-param name="text" select="$text"/>
|
|
6032
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6010
6033
|
</xsl:call-template>
|
|
6011
6034
|
</xsl:variable>
|
|
6012
6035
|
<!-- merge neighboring fo:inline -->
|
|
@@ -6043,12 +6066,13 @@
|
|
|
6043
6066
|
|
|
6044
6067
|
<xsl:template name="recursiveSmallCaps">
|
|
6045
6068
|
<xsl:param name="text"/>
|
|
6069
|
+
<xsl:param name="ratio"/>
|
|
6046
6070
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
|
6047
6071
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
|
6048
6072
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
|
6049
6073
|
<xsl:choose>
|
|
6050
6074
|
<xsl:when test="$char=$upperCase">
|
|
6051
|
-
<fo:inline font-size="{100 div
|
|
6075
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
|
6052
6076
|
<xsl:value-of select="$upperCase"/>
|
|
6053
6077
|
</fo:inline>
|
|
6054
6078
|
</xsl:when>
|
|
@@ -6059,6 +6083,7 @@
|
|
|
6059
6083
|
<xsl:if test="string-length($text) > 1">
|
|
6060
6084
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6061
6085
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
|
6086
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6062
6087
|
</xsl:call-template>
|
|
6063
6088
|
</xsl:if>
|
|
6064
6089
|
</xsl:template>
|
|
@@ -6095,6 +6120,9 @@
|
|
|
6095
6120
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
|
6096
6121
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
|
6097
6122
|
</xsl:if>
|
|
6123
|
+
<xsl:if test="$key = 'text-indent'">
|
|
6124
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
|
6125
|
+
</xsl:if>
|
|
6098
6126
|
</xsl:for-each>
|
|
6099
6127
|
</xsl:variable>
|
|
6100
6128
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7501,6 +7529,11 @@
|
|
|
7501
7529
|
</xsl:call-template>
|
|
7502
7530
|
</xsl:template>
|
|
7503
7531
|
|
|
7532
|
+
<!-- command between two xref points to non-standard bibitem -->
|
|
7533
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
|
7534
|
+
<xsl:value-of select="."/>
|
|
7535
|
+
</xsl:template>
|
|
7536
|
+
|
|
7504
7537
|
<!-- ====== -->
|
|
7505
7538
|
<!-- formula -->
|
|
7506
7539
|
<!-- ====== -->
|
|
@@ -8206,6 +8239,8 @@
|
|
|
8206
8239
|
</xsl:attribute>
|
|
8207
8240
|
</xsl:template>
|
|
8208
8241
|
|
|
8242
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
|
8243
|
+
|
|
8209
8244
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
|
8210
8245
|
<xsl:copy>
|
|
8211
8246
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
|
@@ -8224,7 +8259,8 @@
|
|
|
8224
8259
|
|
|
8225
8260
|
<xsl:attribute name="width">
|
|
8226
8261
|
<xsl:choose>
|
|
8227
|
-
|
|
8262
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8263
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8228
8264
|
<xsl:when test="$width != ''">
|
|
8229
8265
|
<xsl:value-of select="round($width)"/>
|
|
8230
8266
|
</xsl:when>
|
|
@@ -8233,7 +8269,8 @@
|
|
|
8233
8269
|
</xsl:attribute>
|
|
8234
8270
|
<xsl:attribute name="height">
|
|
8235
8271
|
<xsl:choose>
|
|
8236
|
-
|
|
8272
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8273
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8237
8274
|
<xsl:when test="$height != ''">
|
|
8238
8275
|
<xsl:value-of select="round($height)"/>
|
|
8239
8276
|
</xsl:when>
|
|
@@ -8250,7 +8287,7 @@
|
|
|
8250
8287
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
|
8251
8288
|
<xsl:attribute name="width">
|
|
8252
8289
|
<xsl:choose>
|
|
8253
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
|
8290
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8254
8291
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8255
8292
|
</xsl:choose>
|
|
8256
8293
|
</xsl:attribute>
|
|
@@ -8261,7 +8298,7 @@
|
|
|
8261
8298
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
|
8262
8299
|
<xsl:attribute name="height">
|
|
8263
8300
|
<xsl:choose>
|
|
8264
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
|
8301
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8265
8302
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8266
8303
|
</xsl:choose>
|
|
8267
8304
|
</xsl:attribute>
|
|
@@ -9775,6 +9812,7 @@
|
|
|
9775
9812
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
|
9776
9813
|
<xsl:if test="normalize-space() != ''">
|
|
9777
9814
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
|
9815
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
|
9778
9816
|
<xsl:apply-templates/>
|
|
9779
9817
|
</fo:inline>
|
|
9780
9818
|
</xsl:if>
|
|
@@ -9925,6 +9963,7 @@
|
|
|
9925
9963
|
</xsl:when>
|
|
9926
9964
|
<xsl:otherwise>
|
|
9927
9965
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
|
9966
|
+
<xsl:call-template name="refine_example-name-style"/>
|
|
9928
9967
|
<xsl:apply-templates/>:
|
|
9929
9968
|
</fo:inline>
|
|
9930
9969
|
</xsl:otherwise>
|
|
@@ -11128,6 +11167,7 @@
|
|
|
11128
11167
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
|
11129
11168
|
|
|
11130
11169
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
|
11170
|
+
|
|
11131
11171
|
<xsl:call-template name="processBibitem"/>
|
|
11132
11172
|
</fo:block>
|
|
11133
11173
|
|
|
@@ -11169,6 +11209,7 @@
|
|
|
11169
11209
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
|
11170
11210
|
<xsl:otherwise>
|
|
11171
11211
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
|
11212
|
+
|
|
11172
11213
|
<fo:list-item-label end-indent="label-end()">
|
|
11173
11214
|
<fo:block role="SKIP">
|
|
11174
11215
|
<fo:inline role="SKIP">
|
|
@@ -12934,4 +12975,6 @@
|
|
|
12934
12975
|
</xsl:if>
|
|
12935
12976
|
</xsl:template>
|
|
12936
12977
|
|
|
12978
|
+
<!-- update -->
|
|
12979
|
+
|
|
12937
12980
|
</xsl:stylesheet>
|
|
@@ -1813,6 +1813,7 @@
|
|
|
1813
1813
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
|
1814
1814
|
<xsl:variable name="hair_space"> </xsl:variable>
|
|
1815
1815
|
<xsl:variable name="en_dash">–</xsl:variable>
|
|
1816
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
|
1816
1817
|
|
|
1817
1818
|
<xsl:template name="getTitle">
|
|
1818
1819
|
<xsl:param name="name"/>
|
|
@@ -2193,6 +2194,10 @@
|
|
|
2193
2194
|
|
|
2194
2195
|
</xsl:attribute-set> <!-- example-name-style -->
|
|
2195
2196
|
|
|
2197
|
+
<xsl:template name="refine_example-name-style">
|
|
2198
|
+
|
|
2199
|
+
</xsl:template>
|
|
2200
|
+
|
|
2196
2201
|
<xsl:attribute-set name="example-p-style">
|
|
2197
2202
|
|
|
2198
2203
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
|
@@ -2209,6 +2214,10 @@
|
|
|
2209
2214
|
|
|
2210
2215
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
|
2211
2216
|
|
|
2217
|
+
<xsl:template name="refine_termexample-name-style">
|
|
2218
|
+
|
|
2219
|
+
</xsl:template>
|
|
2220
|
+
|
|
2212
2221
|
<!-- ========================== -->
|
|
2213
2222
|
<!-- Table styles -->
|
|
2214
2223
|
<!-- ========================== -->
|
|
@@ -2398,6 +2407,10 @@
|
|
|
2398
2407
|
|
|
2399
2408
|
</xsl:attribute-set> <!-- table-fn-style -->
|
|
2400
2409
|
|
|
2410
|
+
<xsl:template name="refine_table-fn-style">
|
|
2411
|
+
|
|
2412
|
+
</xsl:template>
|
|
2413
|
+
|
|
2401
2414
|
<xsl:attribute-set name="table-fn-number-style">
|
|
2402
2415
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
2403
2416
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
|
@@ -2406,6 +2419,10 @@
|
|
|
2406
2419
|
|
|
2407
2420
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
|
2408
2421
|
|
|
2422
|
+
<xsl:template name="refine_table-fn-number-style">
|
|
2423
|
+
|
|
2424
|
+
</xsl:template>
|
|
2425
|
+
|
|
2409
2426
|
<xsl:attribute-set name="fn-container-body-style">
|
|
2410
2427
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
|
2411
2428
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
|
@@ -4840,8 +4857,9 @@
|
|
|
4840
4857
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
4841
4858
|
|
|
4842
4859
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
|
4843
|
-
|
|
4860
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
|
4844
4861
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
|
4862
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
|
4845
4863
|
|
|
4846
4864
|
<xsl:value-of select="@reference"/>
|
|
4847
4865
|
|
|
@@ -6002,11 +6020,16 @@
|
|
|
6002
6020
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
6003
6021
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
|
6004
6022
|
<xsl:variable name="text" select="."/>
|
|
6005
|
-
<
|
|
6023
|
+
<xsl:variable name="ratio_">
|
|
6024
|
+
0.75
|
|
6025
|
+
</xsl:variable>
|
|
6026
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
|
6027
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
|
6006
6028
|
<xsl:if test="string-length($text) > 0">
|
|
6007
6029
|
<xsl:variable name="smallCapsText">
|
|
6008
6030
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6009
6031
|
<xsl:with-param name="text" select="$text"/>
|
|
6032
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6010
6033
|
</xsl:call-template>
|
|
6011
6034
|
</xsl:variable>
|
|
6012
6035
|
<!-- merge neighboring fo:inline -->
|
|
@@ -6043,12 +6066,13 @@
|
|
|
6043
6066
|
|
|
6044
6067
|
<xsl:template name="recursiveSmallCaps">
|
|
6045
6068
|
<xsl:param name="text"/>
|
|
6069
|
+
<xsl:param name="ratio"/>
|
|
6046
6070
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
|
6047
6071
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
|
6048
6072
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
|
6049
6073
|
<xsl:choose>
|
|
6050
6074
|
<xsl:when test="$char=$upperCase">
|
|
6051
|
-
<fo:inline font-size="{100 div
|
|
6075
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
|
6052
6076
|
<xsl:value-of select="$upperCase"/>
|
|
6053
6077
|
</fo:inline>
|
|
6054
6078
|
</xsl:when>
|
|
@@ -6059,6 +6083,7 @@
|
|
|
6059
6083
|
<xsl:if test="string-length($text) > 1">
|
|
6060
6084
|
<xsl:call-template name="recursiveSmallCaps">
|
|
6061
6085
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
|
6086
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
|
6062
6087
|
</xsl:call-template>
|
|
6063
6088
|
</xsl:if>
|
|
6064
6089
|
</xsl:template>
|
|
@@ -6095,6 +6120,9 @@
|
|
|
6095
6120
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
|
6096
6121
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
|
6097
6122
|
</xsl:if>
|
|
6123
|
+
<xsl:if test="$key = 'text-indent'">
|
|
6124
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
|
6125
|
+
</xsl:if>
|
|
6098
6126
|
</xsl:for-each>
|
|
6099
6127
|
</xsl:variable>
|
|
6100
6128
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7501,6 +7529,11 @@
|
|
|
7501
7529
|
</xsl:call-template>
|
|
7502
7530
|
</xsl:template>
|
|
7503
7531
|
|
|
7532
|
+
<!-- command between two xref points to non-standard bibitem -->
|
|
7533
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
|
7534
|
+
<xsl:value-of select="."/>
|
|
7535
|
+
</xsl:template>
|
|
7536
|
+
|
|
7504
7537
|
<!-- ====== -->
|
|
7505
7538
|
<!-- formula -->
|
|
7506
7539
|
<!-- ====== -->
|
|
@@ -8206,6 +8239,8 @@
|
|
|
8206
8239
|
</xsl:attribute>
|
|
8207
8240
|
</xsl:template>
|
|
8208
8241
|
|
|
8242
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
|
8243
|
+
|
|
8209
8244
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
|
8210
8245
|
<xsl:copy>
|
|
8211
8246
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
|
@@ -8224,7 +8259,8 @@
|
|
|
8224
8259
|
|
|
8225
8260
|
<xsl:attribute name="width">
|
|
8226
8261
|
<xsl:choose>
|
|
8227
|
-
|
|
8262
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8263
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8228
8264
|
<xsl:when test="$width != ''">
|
|
8229
8265
|
<xsl:value-of select="round($width)"/>
|
|
8230
8266
|
</xsl:when>
|
|
@@ -8233,7 +8269,8 @@
|
|
|
8233
8269
|
</xsl:attribute>
|
|
8234
8270
|
<xsl:attribute name="height">
|
|
8235
8271
|
<xsl:choose>
|
|
8236
|
-
|
|
8272
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
|
8273
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8237
8274
|
<xsl:when test="$height != ''">
|
|
8238
8275
|
<xsl:value-of select="round($height)"/>
|
|
8239
8276
|
</xsl:when>
|
|
@@ -8250,7 +8287,7 @@
|
|
|
8250
8287
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
|
8251
8288
|
<xsl:attribute name="width">
|
|
8252
8289
|
<xsl:choose>
|
|
8253
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
|
8290
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
|
8254
8291
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8255
8292
|
</xsl:choose>
|
|
8256
8293
|
</xsl:attribute>
|
|
@@ -8261,7 +8298,7 @@
|
|
|
8261
8298
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
|
8262
8299
|
<xsl:attribute name="height">
|
|
8263
8300
|
<xsl:choose>
|
|
8264
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
|
8301
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
|
8265
8302
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
8266
8303
|
</xsl:choose>
|
|
8267
8304
|
</xsl:attribute>
|
|
@@ -9775,6 +9812,7 @@
|
|
|
9775
9812
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
|
9776
9813
|
<xsl:if test="normalize-space() != ''">
|
|
9777
9814
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
|
9815
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
|
9778
9816
|
<xsl:apply-templates/>
|
|
9779
9817
|
</fo:inline>
|
|
9780
9818
|
</xsl:if>
|
|
@@ -9925,6 +9963,7 @@
|
|
|
9925
9963
|
</xsl:when>
|
|
9926
9964
|
<xsl:otherwise>
|
|
9927
9965
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
|
9966
|
+
<xsl:call-template name="refine_example-name-style"/>
|
|
9928
9967
|
<xsl:apply-templates/>:
|
|
9929
9968
|
</fo:inline>
|
|
9930
9969
|
</xsl:otherwise>
|
|
@@ -11128,6 +11167,7 @@
|
|
|
11128
11167
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
|
11129
11168
|
|
|
11130
11169
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
|
11170
|
+
|
|
11131
11171
|
<xsl:call-template name="processBibitem"/>
|
|
11132
11172
|
</fo:block>
|
|
11133
11173
|
|
|
@@ -11169,6 +11209,7 @@
|
|
|
11169
11209
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
|
11170
11210
|
<xsl:otherwise>
|
|
11171
11211
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
|
11212
|
+
|
|
11172
11213
|
<fo:list-item-label end-indent="label-end()">
|
|
11173
11214
|
<fo:block role="SKIP">
|
|
11174
11215
|
<fo:inline role="SKIP">
|
|
@@ -12934,4 +12975,6 @@
|
|
|
12934
12975
|
</xsl:if>
|
|
12935
12976
|
</xsl:template>
|
|
12936
12977
|
|
|
12978
|
+
<!-- update -->
|
|
12979
|
+
|
|
12937
12980
|
</xsl:stylesheet>
|