metanorma-ogc 2.5.3 → 2.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +111 -10
- data/lib/isodoc/ogc/ogc.best-practice.xsl +111 -10
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +111 -10
- data/lib/isodoc/ogc/ogc.community-practice.xsl +111 -10
- data/lib/isodoc/ogc/ogc.community-standard.xsl +111 -10
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +111 -10
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +111 -10
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +111 -10
- data/lib/isodoc/ogc/ogc.other.xsl +111 -10
- data/lib/isodoc/ogc/ogc.policy.xsl +111 -10
- data/lib/isodoc/ogc/ogc.reference-model.xsl +111 -10
- data/lib/isodoc/ogc/ogc.release-notes.xsl +111 -10
- data/lib/isodoc/ogc/ogc.standard.xsl +111 -10
- data/lib/isodoc/ogc/ogc.test-suite.xsl +111 -10
- data/lib/isodoc/ogc/ogc.user-guide.xsl +111 -10
- data/lib/isodoc/ogc/ogc.white-paper.xsl +111 -10
- 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
- data/lib/relaton/render/date.rb +6 -3
- data/lib/relaton/render/fields.rb +0 -2
- data/lib/relaton/render/general.rb +3 -5
- metadata +2 -2
@@ -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
|
|
@@ -6000,12 +6018,18 @@
|
|
6000
6018
|
</xsl:template>
|
6001
6019
|
|
6002
6020
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
6003
|
-
<xsl:variable name="text" select="normalize-space(.)"/>
|
6004
|
-
<
|
6021
|
+
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
6022
|
+
<xsl:variable name="text" select="."/>
|
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">
|
6005
6028
|
<xsl:if test="string-length($text) > 0">
|
6006
6029
|
<xsl:variable name="smallCapsText">
|
6007
6030
|
<xsl:call-template name="recursiveSmallCaps">
|
6008
6031
|
<xsl:with-param name="text" select="$text"/>
|
6032
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
6009
6033
|
</xsl:call-template>
|
6010
6034
|
</xsl:variable>
|
6011
6035
|
<!-- merge neighboring fo:inline -->
|
@@ -6042,12 +6066,13 @@
|
|
6042
6066
|
|
6043
6067
|
<xsl:template name="recursiveSmallCaps">
|
6044
6068
|
<xsl:param name="text"/>
|
6069
|
+
<xsl:param name="ratio"/>
|
6045
6070
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
6046
6071
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
6047
6072
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
6048
6073
|
<xsl:choose>
|
6049
6074
|
<xsl:when test="$char=$upperCase">
|
6050
|
-
<fo:inline font-size="{100 div
|
6075
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
6051
6076
|
<xsl:value-of select="$upperCase"/>
|
6052
6077
|
</fo:inline>
|
6053
6078
|
</xsl:when>
|
@@ -6058,6 +6083,7 @@
|
|
6058
6083
|
<xsl:if test="string-length($text) > 1">
|
6059
6084
|
<xsl:call-template name="recursiveSmallCaps">
|
6060
6085
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
6086
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
6061
6087
|
</xsl:call-template>
|
6062
6088
|
</xsl:if>
|
6063
6089
|
</xsl:template>
|
@@ -6094,6 +6120,9 @@
|
|
6094
6120
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
6095
6121
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6096
6122
|
</xsl:if>
|
6123
|
+
<xsl:if test="$key = 'text-indent'">
|
6124
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
6125
|
+
</xsl:if>
|
6097
6126
|
</xsl:for-each>
|
6098
6127
|
</xsl:variable>
|
6099
6128
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -7500,6 +7529,11 @@
|
|
7500
7529
|
</xsl:call-template>
|
7501
7530
|
</xsl:template>
|
7502
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
|
+
|
7503
7537
|
<!-- ====== -->
|
7504
7538
|
<!-- formula -->
|
7505
7539
|
<!-- ====== -->
|
@@ -8143,16 +8177,44 @@
|
|
8143
8177
|
</xsl:choose>
|
8144
8178
|
|
8145
8179
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8146
|
-
<xsl:variable name="
|
8147
|
-
<xsl:variable name="
|
8180
|
+
<xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
|
8181
|
+
<xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
|
8182
|
+
<xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
|
8183
|
+
<xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
|
8184
|
+
|
8185
|
+
<!-- Example: -->
|
8148
8186
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
8149
8187
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
8150
8188
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
8151
|
-
|
8189
|
+
|
8190
|
+
<xsl:variable name="scale_x">
|
8191
|
+
<xsl:choose>
|
8192
|
+
<xsl:when test="$svg_width > $width_effective_px">
|
8193
|
+
<xsl:value-of select="$width_effective_px div $svg_width"/>
|
8194
|
+
</xsl:when>
|
8195
|
+
<xsl:otherwise>1</xsl:otherwise>
|
8196
|
+
</xsl:choose>
|
8197
|
+
</xsl:variable>
|
8198
|
+
<xsl:variable name="scale_y">
|
8199
|
+
<xsl:choose>
|
8200
|
+
<xsl:when test="$svg_height * $scale_x > $height_effective_px">
|
8201
|
+
<xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
|
8202
|
+
</xsl:when>
|
8203
|
+
<xsl:otherwise>1</xsl:otherwise>
|
8204
|
+
</xsl:choose>
|
8205
|
+
</xsl:variable>
|
8206
|
+
|
8207
|
+
<!-- for images with big height -->
|
8208
|
+
<!-- <xsl:if test="$svg_height > ($svg_width * 1.4)">
|
8152
8209
|
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
8153
8210
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
8154
|
-
</xsl:if>
|
8211
|
+
</xsl:if> -->
|
8155
8212
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8213
|
+
|
8214
|
+
<xsl:if test="$scale_y != 1">
|
8215
|
+
<xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
|
8216
|
+
</xsl:if>
|
8217
|
+
|
8156
8218
|
<xsl:copy-of select="$svg_content"/>
|
8157
8219
|
</fo:instream-foreign-object>
|
8158
8220
|
<!-- </fo:block> -->
|
@@ -8177,6 +8239,8 @@
|
|
8177
8239
|
</xsl:attribute>
|
8178
8240
|
</xsl:template>
|
8179
8241
|
|
8242
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
8243
|
+
|
8180
8244
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
8181
8245
|
<xsl:copy>
|
8182
8246
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -8190,8 +8254,13 @@
|
|
8190
8254
|
<xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
|
8191
8255
|
<xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
|
8192
8256
|
|
8257
|
+
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
|
8258
|
+
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
|
8259
|
+
|
8193
8260
|
<xsl:attribute name="width">
|
8194
8261
|
<xsl:choose>
|
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>
|
8195
8264
|
<xsl:when test="$width != ''">
|
8196
8265
|
<xsl:value-of select="round($width)"/>
|
8197
8266
|
</xsl:when>
|
@@ -8200,6 +8269,8 @@
|
|
8200
8269
|
</xsl:attribute>
|
8201
8270
|
<xsl:attribute name="height">
|
8202
8271
|
<xsl:choose>
|
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>
|
8203
8274
|
<xsl:when test="$height != ''">
|
8204
8275
|
<xsl:value-of select="round($height)"/>
|
8205
8276
|
</xsl:when>
|
@@ -8211,6 +8282,28 @@
|
|
8211
8282
|
</xsl:copy>
|
8212
8283
|
</xsl:template>
|
8213
8284
|
|
8285
|
+
<xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
|
8286
|
+
<!-- image[@width]/svg -->
|
8287
|
+
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
8288
|
+
<xsl:attribute name="width">
|
8289
|
+
<xsl:choose>
|
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>
|
8291
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
8292
|
+
</xsl:choose>
|
8293
|
+
</xsl:attribute>
|
8294
|
+
</xsl:template>
|
8295
|
+
|
8296
|
+
<xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
|
8297
|
+
<!-- image[@height]/svg -->
|
8298
|
+
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
8299
|
+
<xsl:attribute name="height">
|
8300
|
+
<xsl:choose>
|
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>
|
8302
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
8303
|
+
</xsl:choose>
|
8304
|
+
</xsl:attribute>
|
8305
|
+
</xsl:template>
|
8306
|
+
|
8214
8307
|
<!-- regex for 'display: inline-block;' -->
|
8215
8308
|
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
8216
8309
|
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
@@ -9719,6 +9812,7 @@
|
|
9719
9812
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
9720
9813
|
<xsl:if test="normalize-space() != ''">
|
9721
9814
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9815
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
9722
9816
|
<xsl:apply-templates/>
|
9723
9817
|
</fo:inline>
|
9724
9818
|
</xsl:if>
|
@@ -9869,6 +9963,7 @@
|
|
9869
9963
|
</xsl:when>
|
9870
9964
|
<xsl:otherwise>
|
9871
9965
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9966
|
+
<xsl:call-template name="refine_example-name-style"/>
|
9872
9967
|
<xsl:apply-templates/>:
|
9873
9968
|
</fo:inline>
|
9874
9969
|
</xsl:otherwise>
|
@@ -10331,7 +10426,9 @@
|
|
10331
10426
|
</xsl:template> <!-- sections_element_style -->
|
10332
10427
|
|
10333
10428
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
10334
|
-
|
10429
|
+
|
10430
|
+
<fo:block break-after="page"/>
|
10431
|
+
|
10335
10432
|
<fo:block>
|
10336
10433
|
<xsl:call-template name="setId"/>
|
10337
10434
|
<xsl:apply-templates/>
|
@@ -10398,7 +10495,7 @@
|
|
10398
10495
|
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10399
10496
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10400
10497
|
</xsl:when>
|
10401
|
-
<xsl:when test="not(
|
10498
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10402
10499
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10403
10500
|
</xsl:when>
|
10404
10501
|
</xsl:choose>
|
@@ -11070,6 +11167,7 @@
|
|
11070
11167
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11071
11168
|
|
11072
11169
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
11170
|
+
|
11073
11171
|
<xsl:call-template name="processBibitem"/>
|
11074
11172
|
</fo:block>
|
11075
11173
|
|
@@ -11111,6 +11209,7 @@
|
|
11111
11209
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11112
11210
|
<xsl:otherwise>
|
11113
11211
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11212
|
+
|
11114
11213
|
<fo:list-item-label end-indent="label-end()">
|
11115
11214
|
<fo:block role="SKIP">
|
11116
11215
|
<fo:inline role="SKIP">
|
@@ -12876,4 +12975,6 @@
|
|
12876
12975
|
</xsl:if>
|
12877
12976
|
</xsl:template>
|
12878
12977
|
|
12978
|
+
<!-- update -->
|
12979
|
+
|
12879
12980
|
</xsl:stylesheet>
|
@@ -889,6 +889,7 @@
|
|
889
889
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
890
890
|
<xsl:variable name="hair_space"> </xsl:variable>
|
891
891
|
<xsl:variable name="en_dash">–</xsl:variable>
|
892
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
892
893
|
|
893
894
|
<xsl:template name="getTitle">
|
894
895
|
<xsl:param name="name"/>
|
@@ -1267,6 +1268,10 @@
|
|
1267
1268
|
|
1268
1269
|
</xsl:attribute-set> <!-- example-name-style -->
|
1269
1270
|
|
1271
|
+
<xsl:template name="refine_example-name-style">
|
1272
|
+
|
1273
|
+
</xsl:template>
|
1274
|
+
|
1270
1275
|
<xsl:attribute-set name="example-p-style">
|
1271
1276
|
|
1272
1277
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
@@ -1283,6 +1288,10 @@
|
|
1283
1288
|
|
1284
1289
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
1285
1290
|
|
1291
|
+
<xsl:template name="refine_termexample-name-style">
|
1292
|
+
|
1293
|
+
</xsl:template>
|
1294
|
+
|
1286
1295
|
<!-- ========================== -->
|
1287
1296
|
<!-- Table styles -->
|
1288
1297
|
<!-- ========================== -->
|
@@ -1453,6 +1462,10 @@
|
|
1453
1462
|
|
1454
1463
|
</xsl:attribute-set> <!-- table-fn-style -->
|
1455
1464
|
|
1465
|
+
<xsl:template name="refine_table-fn-style">
|
1466
|
+
|
1467
|
+
</xsl:template>
|
1468
|
+
|
1456
1469
|
<xsl:attribute-set name="table-fn-number-style">
|
1457
1470
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1458
1471
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -1461,6 +1474,10 @@
|
|
1461
1474
|
|
1462
1475
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
1463
1476
|
|
1477
|
+
<xsl:template name="refine_table-fn-number-style">
|
1478
|
+
|
1479
|
+
</xsl:template>
|
1480
|
+
|
1464
1481
|
<xsl:attribute-set name="fn-container-body-style">
|
1465
1482
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1466
1483
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -3884,8 +3901,9 @@
|
|
3884
3901
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
3885
3902
|
|
3886
3903
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
3887
|
-
|
3904
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
3888
3905
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
3906
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
3889
3907
|
|
3890
3908
|
<xsl:value-of select="@reference"/>
|
3891
3909
|
|
@@ -5037,12 +5055,18 @@
|
|
5037
5055
|
</xsl:template>
|
5038
5056
|
|
5039
5057
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
5040
|
-
<xsl:variable name="text" select="normalize-space(.)"/>
|
5041
|
-
<
|
5058
|
+
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
5059
|
+
<xsl:variable name="text" select="."/>
|
5060
|
+
<xsl:variable name="ratio_">
|
5061
|
+
0.75
|
5062
|
+
</xsl:variable>
|
5063
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
5064
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
5042
5065
|
<xsl:if test="string-length($text) > 0">
|
5043
5066
|
<xsl:variable name="smallCapsText">
|
5044
5067
|
<xsl:call-template name="recursiveSmallCaps">
|
5045
5068
|
<xsl:with-param name="text" select="$text"/>
|
5069
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
5046
5070
|
</xsl:call-template>
|
5047
5071
|
</xsl:variable>
|
5048
5072
|
<!-- merge neighboring fo:inline -->
|
@@ -5079,12 +5103,13 @@
|
|
5079
5103
|
|
5080
5104
|
<xsl:template name="recursiveSmallCaps">
|
5081
5105
|
<xsl:param name="text"/>
|
5106
|
+
<xsl:param name="ratio"/>
|
5082
5107
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
5083
5108
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
5084
5109
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
5085
5110
|
<xsl:choose>
|
5086
5111
|
<xsl:when test="$char=$upperCase">
|
5087
|
-
<fo:inline font-size="{100 div
|
5112
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
5088
5113
|
<xsl:value-of select="$upperCase"/>
|
5089
5114
|
</fo:inline>
|
5090
5115
|
</xsl:when>
|
@@ -5095,6 +5120,7 @@
|
|
5095
5120
|
<xsl:if test="string-length($text) > 1">
|
5096
5121
|
<xsl:call-template name="recursiveSmallCaps">
|
5097
5122
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
5123
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
5098
5124
|
</xsl:call-template>
|
5099
5125
|
</xsl:if>
|
5100
5126
|
</xsl:template>
|
@@ -5131,6 +5157,9 @@
|
|
5131
5157
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
5132
5158
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5133
5159
|
</xsl:if>
|
5160
|
+
<xsl:if test="$key = 'text-indent'">
|
5161
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
5162
|
+
</xsl:if>
|
5134
5163
|
</xsl:for-each>
|
5135
5164
|
</xsl:variable>
|
5136
5165
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -6533,6 +6562,11 @@
|
|
6533
6562
|
</xsl:call-template>
|
6534
6563
|
</xsl:template>
|
6535
6564
|
|
6565
|
+
<!-- command between two xref points to non-standard bibitem -->
|
6566
|
+
<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']]]">
|
6567
|
+
<xsl:value-of select="."/>
|
6568
|
+
</xsl:template>
|
6569
|
+
|
6536
6570
|
<!-- ====== -->
|
6537
6571
|
<!-- formula -->
|
6538
6572
|
<!-- ====== -->
|
@@ -7174,16 +7208,44 @@
|
|
7174
7208
|
</xsl:choose>
|
7175
7209
|
|
7176
7210
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7177
|
-
<xsl:variable name="
|
7178
|
-
<xsl:variable name="
|
7211
|
+
<xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
|
7212
|
+
<xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
|
7213
|
+
<xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
|
7214
|
+
<xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
|
7215
|
+
|
7216
|
+
<!-- Example: -->
|
7179
7217
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
7180
7218
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
7181
7219
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
7182
|
-
|
7220
|
+
|
7221
|
+
<xsl:variable name="scale_x">
|
7222
|
+
<xsl:choose>
|
7223
|
+
<xsl:when test="$svg_width > $width_effective_px">
|
7224
|
+
<xsl:value-of select="$width_effective_px div $svg_width"/>
|
7225
|
+
</xsl:when>
|
7226
|
+
<xsl:otherwise>1</xsl:otherwise>
|
7227
|
+
</xsl:choose>
|
7228
|
+
</xsl:variable>
|
7229
|
+
<xsl:variable name="scale_y">
|
7230
|
+
<xsl:choose>
|
7231
|
+
<xsl:when test="$svg_height * $scale_x > $height_effective_px">
|
7232
|
+
<xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
|
7233
|
+
</xsl:when>
|
7234
|
+
<xsl:otherwise>1</xsl:otherwise>
|
7235
|
+
</xsl:choose>
|
7236
|
+
</xsl:variable>
|
7237
|
+
|
7238
|
+
<!-- for images with big height -->
|
7239
|
+
<!-- <xsl:if test="$svg_height > ($svg_width * 1.4)">
|
7183
7240
|
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
7184
7241
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
7185
|
-
</xsl:if>
|
7242
|
+
</xsl:if> -->
|
7186
7243
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7244
|
+
|
7245
|
+
<xsl:if test="$scale_y != 1">
|
7246
|
+
<xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
|
7247
|
+
</xsl:if>
|
7248
|
+
|
7187
7249
|
<xsl:copy-of select="$svg_content"/>
|
7188
7250
|
</fo:instream-foreign-object>
|
7189
7251
|
<!-- </fo:block> -->
|
@@ -7208,6 +7270,8 @@
|
|
7208
7270
|
</xsl:attribute>
|
7209
7271
|
</xsl:template>
|
7210
7272
|
|
7273
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
7274
|
+
|
7211
7275
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
7212
7276
|
<xsl:copy>
|
7213
7277
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -7221,8 +7285,13 @@
|
|
7221
7285
|
<xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
|
7222
7286
|
<xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
|
7223
7287
|
|
7288
|
+
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
|
7289
|
+
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
|
7290
|
+
|
7224
7291
|
<xsl:attribute name="width">
|
7225
7292
|
<xsl:choose>
|
7293
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
7294
|
+
<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>
|
7226
7295
|
<xsl:when test="$width != ''">
|
7227
7296
|
<xsl:value-of select="round($width)"/>
|
7228
7297
|
</xsl:when>
|
@@ -7231,6 +7300,8 @@
|
|
7231
7300
|
</xsl:attribute>
|
7232
7301
|
<xsl:attribute name="height">
|
7233
7302
|
<xsl:choose>
|
7303
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
7304
|
+
<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>
|
7234
7305
|
<xsl:when test="$height != ''">
|
7235
7306
|
<xsl:value-of select="round($height)"/>
|
7236
7307
|
</xsl:when>
|
@@ -7242,6 +7313,28 @@
|
|
7242
7313
|
</xsl:copy>
|
7243
7314
|
</xsl:template>
|
7244
7315
|
|
7316
|
+
<xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
|
7317
|
+
<!-- image[@width]/svg -->
|
7318
|
+
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
7319
|
+
<xsl:attribute name="width">
|
7320
|
+
<xsl:choose>
|
7321
|
+
<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>
|
7322
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
7323
|
+
</xsl:choose>
|
7324
|
+
</xsl:attribute>
|
7325
|
+
</xsl:template>
|
7326
|
+
|
7327
|
+
<xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
|
7328
|
+
<!-- image[@height]/svg -->
|
7329
|
+
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
7330
|
+
<xsl:attribute name="height">
|
7331
|
+
<xsl:choose>
|
7332
|
+
<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>
|
7333
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
7334
|
+
</xsl:choose>
|
7335
|
+
</xsl:attribute>
|
7336
|
+
</xsl:template>
|
7337
|
+
|
7245
7338
|
<!-- regex for 'display: inline-block;' -->
|
7246
7339
|
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
7247
7340
|
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
@@ -8719,6 +8812,7 @@
|
|
8719
8812
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
8720
8813
|
<xsl:if test="normalize-space() != ''">
|
8721
8814
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
8815
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
8722
8816
|
<xsl:apply-templates/>
|
8723
8817
|
</fo:inline>
|
8724
8818
|
</xsl:if>
|
@@ -8869,6 +8963,7 @@
|
|
8869
8963
|
</xsl:when>
|
8870
8964
|
<xsl:otherwise>
|
8871
8965
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
8966
|
+
<xsl:call-template name="refine_example-name-style"/>
|
8872
8967
|
<xsl:apply-templates/>
|
8873
8968
|
</fo:inline>
|
8874
8969
|
</xsl:otherwise>
|
@@ -9343,7 +9438,9 @@
|
|
9343
9438
|
</xsl:template> <!-- sections_element_style -->
|
9344
9439
|
|
9345
9440
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
9346
|
-
|
9441
|
+
|
9442
|
+
<fo:block break-after="page"/>
|
9443
|
+
|
9347
9444
|
<fo:block>
|
9348
9445
|
<xsl:call-template name="setId"/>
|
9349
9446
|
<xsl:apply-templates/>
|
@@ -9410,7 +9507,7 @@
|
|
9410
9507
|
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9411
9508
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9412
9509
|
</xsl:when>
|
9413
|
-
<xsl:when test="not(
|
9510
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9414
9511
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9415
9512
|
</xsl:when>
|
9416
9513
|
</xsl:choose>
|
@@ -10082,6 +10179,7 @@
|
|
10082
10179
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
10083
10180
|
|
10084
10181
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
10182
|
+
|
10085
10183
|
<xsl:call-template name="processBibitem"/>
|
10086
10184
|
</fo:block>
|
10087
10185
|
|
@@ -10123,6 +10221,7 @@
|
|
10123
10221
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
10124
10222
|
<xsl:otherwise>
|
10125
10223
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
10224
|
+
|
10126
10225
|
<fo:list-item-label end-indent="label-end()">
|
10127
10226
|
<fo:block role="SKIP">
|
10128
10227
|
<fo:inline role="SKIP">
|
@@ -11888,4 +11987,6 @@
|
|
11888
11987
|
</xsl:if>
|
11889
11988
|
</xsl:template>
|
11890
11989
|
|
11990
|
+
<!-- update -->
|
11991
|
+
|
11891
11992
|
</xsl:stylesheet>
|
@@ -208,7 +208,9 @@
|
|
208
208
|
</define>
|
209
209
|
<define name="roledescription">
|
210
210
|
<element name="description">
|
211
|
-
<
|
211
|
+
<oneOrMore>
|
212
|
+
<ref name="TextElement"/>
|
213
|
+
</oneOrMore>
|
212
214
|
</element>
|
213
215
|
</define>
|
214
216
|
<define name="person">
|
@@ -333,7 +335,9 @@
|
|
333
335
|
</define>
|
334
336
|
<define name="affiliationdescription">
|
335
337
|
<element name="description">
|
336
|
-
<
|
338
|
+
<oneOrMore>
|
339
|
+
<ref name="TextElement"/>
|
340
|
+
</oneOrMore>
|
337
341
|
</element>
|
338
342
|
</define>
|
339
343
|
<define name="organization">
|
@@ -897,7 +901,9 @@
|
|
897
901
|
</define>
|
898
902
|
<define name="formattedref">
|
899
903
|
<element name="formattedref">
|
900
|
-
<
|
904
|
+
<oneOrMore>
|
905
|
+
<ref name="TextElement"/>
|
906
|
+
</oneOrMore>
|
901
907
|
</element>
|
902
908
|
</define>
|
903
909
|
<define name="license">
|
@@ -942,7 +948,9 @@
|
|
942
948
|
<optional>
|
943
949
|
<attribute name="type"/>
|
944
950
|
</optional>
|
945
|
-
<
|
951
|
+
<zeroOrMore>
|
952
|
+
<ref name="TextElement"/>
|
953
|
+
</zeroOrMore>
|
946
954
|
</define>
|
947
955
|
<!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
|
948
956
|
<define name="TypedUri">
|
@@ -1042,7 +1050,9 @@
|
|
1042
1050
|
<optional>
|
1043
1051
|
<attribute name="script"/>
|
1044
1052
|
</optional>
|
1045
|
-
<
|
1053
|
+
<oneOrMore>
|
1054
|
+
<ref name="TextElement"/>
|
1055
|
+
</oneOrMore>
|
1046
1056
|
</element>
|
1047
1057
|
</define>
|
1048
1058
|
<define name="docnumber">
|
@@ -1267,12 +1277,16 @@
|
|
1267
1277
|
<optional>
|
1268
1278
|
<attribute name="type"/>
|
1269
1279
|
</optional>
|
1270
|
-
<
|
1280
|
+
<oneOrMore>
|
1281
|
+
<ref name="TextElement"/>
|
1282
|
+
</oneOrMore>
|
1271
1283
|
</element>
|
1272
1284
|
</define>
|
1273
1285
|
<define name="bibabstract">
|
1274
1286
|
<element name="abstract">
|
1275
|
-
<
|
1287
|
+
<oneOrMore>
|
1288
|
+
<ref name="TextElement"/>
|
1289
|
+
</oneOrMore>
|
1276
1290
|
</element>
|
1277
1291
|
</define>
|
1278
1292
|
<define name="copyright">
|
@@ -1377,7 +1391,9 @@
|
|
1377
1391
|
</attribute>
|
1378
1392
|
<optional>
|
1379
1393
|
<element name="description">
|
1380
|
-
<
|
1394
|
+
<oneOrMore>
|
1395
|
+
<ref name="TextElement"/>
|
1396
|
+
</oneOrMore>
|
1381
1397
|
</element>
|
1382
1398
|
</optional>
|
1383
1399
|
<element name="bibitem">
|