metanorma-bipm 2.4.4 → 2.4.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/bipm/bipm.brochure.xsl +50 -7
- data/lib/isodoc/bipm/bipm.guide.xsl +50 -7
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +50 -7
- data/lib/isodoc/bipm/bipm.rapport.xsl +50 -7
- data/lib/isodoc/bipm/jcgm.standard.xsl +51 -7
- data/lib/metanorma/bipm/biblio.rng +24 -8
- data/lib/metanorma/bipm/bipm.rng +15 -51
- data/lib/metanorma/bipm/isodoc.rng +67 -55
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -4116,6 +4116,7 @@
|
|
4116
4116
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
4117
4117
|
<xsl:variable name="hair_space"> </xsl:variable>
|
4118
4118
|
<xsl:variable name="en_dash">–</xsl:variable>
|
4119
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
4119
4120
|
|
4120
4121
|
<xsl:template name="getTitle">
|
4121
4122
|
<xsl:param name="name"/>
|
@@ -4432,6 +4433,10 @@
|
|
4432
4433
|
|
4433
4434
|
</xsl:attribute-set> <!-- example-name-style -->
|
4434
4435
|
|
4436
|
+
<xsl:template name="refine_example-name-style">
|
4437
|
+
|
4438
|
+
</xsl:template>
|
4439
|
+
|
4435
4440
|
<xsl:attribute-set name="example-p-style">
|
4436
4441
|
|
4437
4442
|
</xsl:attribute-set> <!-- example-p-style -->
|
@@ -4446,6 +4451,10 @@
|
|
4446
4451
|
|
4447
4452
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
4448
4453
|
|
4454
|
+
<xsl:template name="refine_termexample-name-style">
|
4455
|
+
|
4456
|
+
</xsl:template>
|
4457
|
+
|
4449
4458
|
<!-- ========================== -->
|
4450
4459
|
<!-- Table styles -->
|
4451
4460
|
<!-- ========================== -->
|
@@ -4662,6 +4671,10 @@
|
|
4662
4671
|
|
4663
4672
|
</xsl:attribute-set> <!-- table-fn-style -->
|
4664
4673
|
|
4674
|
+
<xsl:template name="refine_table-fn-style">
|
4675
|
+
|
4676
|
+
</xsl:template>
|
4677
|
+
|
4665
4678
|
<xsl:attribute-set name="table-fn-number-style">
|
4666
4679
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4667
4680
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -4671,6 +4684,10 @@
|
|
4671
4684
|
|
4672
4685
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4673
4686
|
|
4687
|
+
<xsl:template name="refine_table-fn-number-style">
|
4688
|
+
|
4689
|
+
</xsl:template>
|
4690
|
+
|
4674
4691
|
<xsl:attribute-set name="fn-container-body-style">
|
4675
4692
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4676
4693
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -7086,8 +7103,9 @@
|
|
7086
7103
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7087
7104
|
|
7088
7105
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
7089
|
-
|
7106
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
7090
7107
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
7108
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7091
7109
|
|
7092
7110
|
<fo:inline font-style="normal">(</fo:inline>
|
7093
7111
|
|
@@ -8234,11 +8252,16 @@
|
|
8234
8252
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
8235
8253
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
8236
8254
|
<xsl:variable name="text" select="."/>
|
8237
|
-
<
|
8255
|
+
<xsl:variable name="ratio_">
|
8256
|
+
0.75
|
8257
|
+
</xsl:variable>
|
8258
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
8259
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
8238
8260
|
<xsl:if test="string-length($text) > 0">
|
8239
8261
|
<xsl:variable name="smallCapsText">
|
8240
8262
|
<xsl:call-template name="recursiveSmallCaps">
|
8241
8263
|
<xsl:with-param name="text" select="$text"/>
|
8264
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8242
8265
|
</xsl:call-template>
|
8243
8266
|
</xsl:variable>
|
8244
8267
|
<!-- merge neighboring fo:inline -->
|
@@ -8275,12 +8298,13 @@
|
|
8275
8298
|
|
8276
8299
|
<xsl:template name="recursiveSmallCaps">
|
8277
8300
|
<xsl:param name="text"/>
|
8301
|
+
<xsl:param name="ratio"/>
|
8278
8302
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
8279
8303
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
8280
8304
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
8281
8305
|
<xsl:choose>
|
8282
8306
|
<xsl:when test="$char=$upperCase">
|
8283
|
-
<fo:inline font-size="{100 div
|
8307
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
8284
8308
|
<xsl:value-of select="$upperCase"/>
|
8285
8309
|
</fo:inline>
|
8286
8310
|
</xsl:when>
|
@@ -8291,6 +8315,7 @@
|
|
8291
8315
|
<xsl:if test="string-length($text) > 1">
|
8292
8316
|
<xsl:call-template name="recursiveSmallCaps">
|
8293
8317
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
8318
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8294
8319
|
</xsl:call-template>
|
8295
8320
|
</xsl:if>
|
8296
8321
|
</xsl:template>
|
@@ -8327,6 +8352,9 @@
|
|
8327
8352
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
8328
8353
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8329
8354
|
</xsl:if>
|
8355
|
+
<xsl:if test="$key = 'text-indent'">
|
8356
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
8357
|
+
</xsl:if>
|
8330
8358
|
</xsl:for-each>
|
8331
8359
|
</xsl:variable>
|
8332
8360
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -9761,6 +9789,11 @@
|
|
9761
9789
|
</xsl:call-template>
|
9762
9790
|
</xsl:template>
|
9763
9791
|
|
9792
|
+
<!-- command between two xref points to non-standard bibitem -->
|
9793
|
+
<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']]]">
|
9794
|
+
<xsl:value-of select="."/>
|
9795
|
+
</xsl:template>
|
9796
|
+
|
9764
9797
|
<!-- ====== -->
|
9765
9798
|
<!-- formula -->
|
9766
9799
|
<!-- ====== -->
|
@@ -10483,6 +10516,8 @@
|
|
10483
10516
|
</xsl:attribute>
|
10484
10517
|
</xsl:template>
|
10485
10518
|
|
10519
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
10520
|
+
|
10486
10521
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
10487
10522
|
<xsl:copy>
|
10488
10523
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -10501,7 +10536,8 @@
|
|
10501
10536
|
|
10502
10537
|
<xsl:attribute name="width">
|
10503
10538
|
<xsl:choose>
|
10504
|
-
|
10539
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10540
|
+
<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>
|
10505
10541
|
<xsl:when test="$width != ''">
|
10506
10542
|
<xsl:value-of select="round($width)"/>
|
10507
10543
|
</xsl:when>
|
@@ -10510,7 +10546,8 @@
|
|
10510
10546
|
</xsl:attribute>
|
10511
10547
|
<xsl:attribute name="height">
|
10512
10548
|
<xsl:choose>
|
10513
|
-
|
10549
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10550
|
+
<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>
|
10514
10551
|
<xsl:when test="$height != ''">
|
10515
10552
|
<xsl:value-of select="round($height)"/>
|
10516
10553
|
</xsl:when>
|
@@ -10527,7 +10564,7 @@
|
|
10527
10564
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
10528
10565
|
<xsl:attribute name="width">
|
10529
10566
|
<xsl:choose>
|
10530
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
10567
|
+
<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>
|
10531
10568
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10532
10569
|
</xsl:choose>
|
10533
10570
|
</xsl:attribute>
|
@@ -10538,7 +10575,7 @@
|
|
10538
10575
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
10539
10576
|
<xsl:attribute name="height">
|
10540
10577
|
<xsl:choose>
|
10541
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
10578
|
+
<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>
|
10542
10579
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10543
10580
|
</xsl:choose>
|
10544
10581
|
</xsl:attribute>
|
@@ -12013,6 +12050,7 @@
|
|
12013
12050
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
12014
12051
|
<xsl:if test="normalize-space() != ''">
|
12015
12052
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
12053
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
12016
12054
|
<xsl:apply-templates/>
|
12017
12055
|
</fo:inline>
|
12018
12056
|
</xsl:if>
|
@@ -12163,6 +12201,7 @@
|
|
12163
12201
|
</xsl:when>
|
12164
12202
|
<xsl:otherwise>
|
12165
12203
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12204
|
+
<xsl:call-template name="refine_example-name-style"/>
|
12166
12205
|
<xsl:apply-templates/>
|
12167
12206
|
</fo:inline>
|
12168
12207
|
</xsl:otherwise>
|
@@ -13375,6 +13414,7 @@
|
|
13375
13414
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
13376
13415
|
|
13377
13416
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13417
|
+
|
13378
13418
|
<xsl:call-template name="processBibitem"/>
|
13379
13419
|
</fo:block>
|
13380
13420
|
|
@@ -13414,6 +13454,7 @@
|
|
13414
13454
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13415
13455
|
<xsl:otherwise>
|
13416
13456
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13457
|
+
|
13417
13458
|
<fo:list-item-label end-indent="label-end()">
|
13418
13459
|
<fo:block role="SKIP">
|
13419
13460
|
<fo:inline role="SKIP">
|
@@ -15179,4 +15220,6 @@
|
|
15179
15220
|
</xsl:if>
|
15180
15221
|
</xsl:template>
|
15181
15222
|
|
15223
|
+
<!-- update -->
|
15224
|
+
|
15182
15225
|
</xsl:stylesheet>
|
@@ -1973,6 +1973,7 @@
|
|
1973
1973
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
1974
1974
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1975
1975
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1976
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
1976
1977
|
|
1977
1978
|
<xsl:template name="getTitle">
|
1978
1979
|
<xsl:param name="name"/>
|
@@ -2288,6 +2289,10 @@
|
|
2288
2289
|
|
2289
2290
|
</xsl:attribute-set> <!-- example-name-style -->
|
2290
2291
|
|
2292
|
+
<xsl:template name="refine_example-name-style">
|
2293
|
+
|
2294
|
+
</xsl:template>
|
2295
|
+
|
2291
2296
|
<xsl:attribute-set name="example-p-style">
|
2292
2297
|
|
2293
2298
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -2306,6 +2311,10 @@
|
|
2306
2311
|
|
2307
2312
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
2308
2313
|
|
2314
|
+
<xsl:template name="refine_termexample-name-style">
|
2315
|
+
|
2316
|
+
</xsl:template>
|
2317
|
+
|
2309
2318
|
<!-- ========================== -->
|
2310
2319
|
<!-- Table styles -->
|
2311
2320
|
<!-- ========================== -->
|
@@ -2508,6 +2517,10 @@
|
|
2508
2517
|
|
2509
2518
|
</xsl:attribute-set> <!-- table-fn-style -->
|
2510
2519
|
|
2520
|
+
<xsl:template name="refine_table-fn-style">
|
2521
|
+
|
2522
|
+
</xsl:template>
|
2523
|
+
|
2511
2524
|
<xsl:attribute-set name="table-fn-number-style">
|
2512
2525
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2513
2526
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -2516,6 +2529,10 @@
|
|
2516
2529
|
|
2517
2530
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
2518
2531
|
|
2532
|
+
<xsl:template name="refine_table-fn-number-style">
|
2533
|
+
|
2534
|
+
</xsl:template>
|
2535
|
+
|
2519
2536
|
<xsl:attribute-set name="fn-container-body-style">
|
2520
2537
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2521
2538
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -3841,6 +3858,7 @@
|
|
3841
3858
|
<!-- centered table when table name is centered (see table-name-style) -->
|
3842
3859
|
|
3843
3860
|
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
3861
|
+
|
3844
3862
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
3845
3863
|
<fo:table-column column-width="{@width}"/>
|
3846
3864
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
@@ -4938,8 +4956,9 @@
|
|
4938
4956
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
4939
4957
|
|
4940
4958
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
4941
|
-
|
4959
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
4942
4960
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
4961
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
4943
4962
|
|
4944
4963
|
<xsl:value-of select="@reference"/>
|
4945
4964
|
|
@@ -6094,11 +6113,16 @@
|
|
6094
6113
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
6095
6114
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
6096
6115
|
<xsl:variable name="text" select="."/>
|
6097
|
-
<
|
6116
|
+
<xsl:variable name="ratio_">
|
6117
|
+
0.75
|
6118
|
+
</xsl:variable>
|
6119
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
6120
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
6098
6121
|
<xsl:if test="string-length($text) > 0">
|
6099
6122
|
<xsl:variable name="smallCapsText">
|
6100
6123
|
<xsl:call-template name="recursiveSmallCaps">
|
6101
6124
|
<xsl:with-param name="text" select="$text"/>
|
6125
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
6102
6126
|
</xsl:call-template>
|
6103
6127
|
</xsl:variable>
|
6104
6128
|
<!-- merge neighboring fo:inline -->
|
@@ -6135,12 +6159,13 @@
|
|
6135
6159
|
|
6136
6160
|
<xsl:template name="recursiveSmallCaps">
|
6137
6161
|
<xsl:param name="text"/>
|
6162
|
+
<xsl:param name="ratio"/>
|
6138
6163
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
6139
6164
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
6140
6165
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
6141
6166
|
<xsl:choose>
|
6142
6167
|
<xsl:when test="$char=$upperCase">
|
6143
|
-
<fo:inline font-size="{100 div
|
6168
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
6144
6169
|
<xsl:value-of select="$upperCase"/>
|
6145
6170
|
</fo:inline>
|
6146
6171
|
</xsl:when>
|
@@ -6151,6 +6176,7 @@
|
|
6151
6176
|
<xsl:if test="string-length($text) > 1">
|
6152
6177
|
<xsl:call-template name="recursiveSmallCaps">
|
6153
6178
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
6179
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
6154
6180
|
</xsl:call-template>
|
6155
6181
|
</xsl:if>
|
6156
6182
|
</xsl:template>
|
@@ -6187,6 +6213,9 @@
|
|
6187
6213
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
6188
6214
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6189
6215
|
</xsl:if>
|
6216
|
+
<xsl:if test="$key = 'text-indent'">
|
6217
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
6218
|
+
</xsl:if>
|
6190
6219
|
</xsl:for-each>
|
6191
6220
|
</xsl:variable>
|
6192
6221
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -7596,6 +7625,11 @@
|
|
7596
7625
|
</xsl:call-template>
|
7597
7626
|
</xsl:template>
|
7598
7627
|
|
7628
|
+
<!-- command between two xref points to non-standard bibitem -->
|
7629
|
+
<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']]]">
|
7630
|
+
<xsl:value-of select="."/>
|
7631
|
+
</xsl:template>
|
7632
|
+
|
7599
7633
|
<!-- ====== -->
|
7600
7634
|
<!-- formula -->
|
7601
7635
|
<!-- ====== -->
|
@@ -8299,6 +8333,8 @@
|
|
8299
8333
|
</xsl:attribute>
|
8300
8334
|
</xsl:template>
|
8301
8335
|
|
8336
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
8337
|
+
|
8302
8338
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
8303
8339
|
<xsl:copy>
|
8304
8340
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -8317,7 +8353,8 @@
|
|
8317
8353
|
|
8318
8354
|
<xsl:attribute name="width">
|
8319
8355
|
<xsl:choose>
|
8320
|
-
|
8356
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
8357
|
+
<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>
|
8321
8358
|
<xsl:when test="$width != ''">
|
8322
8359
|
<xsl:value-of select="round($width)"/>
|
8323
8360
|
</xsl:when>
|
@@ -8326,7 +8363,8 @@
|
|
8326
8363
|
</xsl:attribute>
|
8327
8364
|
<xsl:attribute name="height">
|
8328
8365
|
<xsl:choose>
|
8329
|
-
|
8366
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
8367
|
+
<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>
|
8330
8368
|
<xsl:when test="$height != ''">
|
8331
8369
|
<xsl:value-of select="round($height)"/>
|
8332
8370
|
</xsl:when>
|
@@ -8343,7 +8381,7 @@
|
|
8343
8381
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
8344
8382
|
<xsl:attribute name="width">
|
8345
8383
|
<xsl:choose>
|
8346
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
8384
|
+
<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>
|
8347
8385
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
8348
8386
|
</xsl:choose>
|
8349
8387
|
</xsl:attribute>
|
@@ -8354,7 +8392,7 @@
|
|
8354
8392
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
8355
8393
|
<xsl:attribute name="height">
|
8356
8394
|
<xsl:choose>
|
8357
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
8395
|
+
<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>
|
8358
8396
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
8359
8397
|
</xsl:choose>
|
8360
8398
|
</xsl:attribute>
|
@@ -9816,6 +9854,7 @@
|
|
9816
9854
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
9817
9855
|
<xsl:if test="normalize-space() != ''">
|
9818
9856
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9857
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
9819
9858
|
<xsl:apply-templates/>
|
9820
9859
|
</fo:inline>
|
9821
9860
|
</xsl:if>
|
@@ -9966,6 +10005,7 @@
|
|
9966
10005
|
</xsl:when>
|
9967
10006
|
<xsl:otherwise>
|
9968
10007
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
10008
|
+
<xsl:call-template name="refine_example-name-style"/>
|
9969
10009
|
<xsl:apply-templates/>
|
9970
10010
|
</fo:inline>
|
9971
10011
|
</xsl:otherwise>
|
@@ -11183,6 +11223,7 @@
|
|
11183
11223
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11184
11224
|
|
11185
11225
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
11226
|
+
|
11186
11227
|
<xsl:call-template name="processBibitem"/>
|
11187
11228
|
</fo:block>
|
11188
11229
|
|
@@ -11224,6 +11265,7 @@
|
|
11224
11265
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11225
11266
|
<xsl:otherwise>
|
11226
11267
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11268
|
+
|
11227
11269
|
<fo:list-item-label end-indent="label-end()">
|
11228
11270
|
<fo:block role="SKIP">
|
11229
11271
|
<fo:inline role="SKIP">
|
@@ -12996,4 +13038,6 @@
|
|
12996
13038
|
</xsl:if>
|
12997
13039
|
</xsl:template>
|
12998
13040
|
|
13041
|
+
<!-- update -->
|
13042
|
+
|
12999
13043
|
</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">
|
data/lib/metanorma/bipm/bipm.rng
CHANGED
@@ -11,58 +11,22 @@
|
|
11
11
|
<start>
|
12
12
|
<ref name="bipm-standard"/>
|
13
13
|
</start>
|
14
|
-
<define name="
|
15
|
-
<
|
16
|
-
<attribute name="
|
17
|
-
<data type="
|
18
|
-
<param name="pattern">\i\c*|\c+#\c+</param>
|
19
|
-
</data>
|
14
|
+
<define name="XrefAttributes" combine="interleave">
|
15
|
+
<optional>
|
16
|
+
<attribute name="pagenumber">
|
17
|
+
<data type="boolean"/>
|
20
18
|
</attribute>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
-
</optional>
|
33
|
-
<optional>
|
34
|
-
<attribute name="alt"/>
|
35
|
-
</optional>
|
36
|
-
<optional>
|
37
|
-
<attribute name="case">
|
38
|
-
<choice>
|
39
|
-
<value>capital</value>
|
40
|
-
<value>lowercase</value>
|
41
|
-
</choice>
|
42
|
-
</attribute>
|
43
|
-
</optional>
|
44
|
-
<optional>
|
45
|
-
<attribute name="droploc">
|
46
|
-
<data type="boolean"/>
|
47
|
-
</attribute>
|
48
|
-
</optional>
|
49
|
-
<optional>
|
50
|
-
<attribute name="pagenumber">
|
51
|
-
<data type="boolean"/>
|
52
|
-
</attribute>
|
53
|
-
</optional>
|
54
|
-
<optional>
|
55
|
-
<attribute name="nosee">
|
56
|
-
<data type="boolean"/>
|
57
|
-
</attribute>
|
58
|
-
</optional>
|
59
|
-
<optional>
|
60
|
-
<attribute name="nopage">
|
61
|
-
<data type="boolean"/>
|
62
|
-
</attribute>
|
63
|
-
</optional>
|
64
|
-
<ref name="XrefBody"/>
|
65
|
-
</element>
|
19
|
+
</optional>
|
20
|
+
<optional>
|
21
|
+
<attribute name="nosee">
|
22
|
+
<data type="boolean"/>
|
23
|
+
</attribute>
|
24
|
+
</optional>
|
25
|
+
<optional>
|
26
|
+
<attribute name="nopage">
|
27
|
+
<data type="boolean"/>
|
28
|
+
</attribute>
|
29
|
+
</optional>
|
66
30
|
</define>
|
67
31
|
<define name="Clause-Section">
|
68
32
|
<optional>
|