metanorma-bipm 2.4.3 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -6092,12 +6111,18 @@
6092
6111
  </xsl:template>
6093
6112
 
6094
6113
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
6095
- <xsl:variable name="text" select="normalize-space(.)"/>
6096
- <fo:inline font-size="75%" role="SKIP">
6114
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
6115
+ <xsl:variable name="text" select="."/>
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">
6097
6121
  <xsl:if test="string-length($text) &gt; 0">
6098
6122
  <xsl:variable name="smallCapsText">
6099
6123
  <xsl:call-template name="recursiveSmallCaps">
6100
6124
  <xsl:with-param name="text" select="$text"/>
6125
+ <xsl:with-param name="ratio" select="$ratio"/>
6101
6126
  </xsl:call-template>
6102
6127
  </xsl:variable>
6103
6128
  <!-- merge neighboring fo:inline -->
@@ -6134,12 +6159,13 @@
6134
6159
 
6135
6160
  <xsl:template name="recursiveSmallCaps">
6136
6161
  <xsl:param name="text"/>
6162
+ <xsl:param name="ratio"/>
6137
6163
  <xsl:variable name="char" select="substring($text,1,1)"/>
6138
6164
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
6139
6165
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
6140
6166
  <xsl:choose>
6141
6167
  <xsl:when test="$char=$upperCase">
6142
- <fo:inline font-size="{100 div 0.75}%" role="SKIP">
6168
+ <fo:inline font-size="{100 div $ratio}%" role="SKIP">
6143
6169
  <xsl:value-of select="$upperCase"/>
6144
6170
  </fo:inline>
6145
6171
  </xsl:when>
@@ -6150,6 +6176,7 @@
6150
6176
  <xsl:if test="string-length($text) &gt; 1">
6151
6177
  <xsl:call-template name="recursiveSmallCaps">
6152
6178
  <xsl:with-param name="text" select="substring($text,2)"/>
6179
+ <xsl:with-param name="ratio" select="$ratio"/>
6153
6180
  </xsl:call-template>
6154
6181
  </xsl:if>
6155
6182
  </xsl:template>
@@ -6186,6 +6213,9 @@
6186
6213
  <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
6187
6214
  <style name="{$key}"><xsl:value-of select="$value"/></style>
6188
6215
  </xsl:if>
6216
+ <xsl:if test="$key = 'text-indent'">
6217
+ <style name="padding-left"><xsl:value-of select="$value"/></style>
6218
+ </xsl:if>
6189
6219
  </xsl:for-each>
6190
6220
  </xsl:variable>
6191
6221
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -7595,6 +7625,11 @@
7595
7625
  </xsl:call-template>
7596
7626
  </xsl:template>
7597
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
+
7598
7633
  <!-- ====== -->
7599
7634
  <!-- formula -->
7600
7635
  <!-- ====== -->
@@ -8236,16 +8271,44 @@
8236
8271
  </xsl:choose>
8237
8272
 
8238
8273
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8239
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
8240
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
8274
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
8275
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
8276
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
8277
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
8278
+
8279
+ <!-- Example: -->
8241
8280
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
8242
8281
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
8243
8282
  <!-- effective height / width = 1.48, 1.4 - with title -->
8244
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
8283
+
8284
+ <xsl:variable name="scale_x">
8285
+ <xsl:choose>
8286
+ <xsl:when test="$svg_width &gt; $width_effective_px">
8287
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
8288
+ </xsl:when>
8289
+ <xsl:otherwise>1</xsl:otherwise>
8290
+ </xsl:choose>
8291
+ </xsl:variable>
8292
+ <xsl:variable name="scale_y">
8293
+ <xsl:choose>
8294
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
8295
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
8296
+ </xsl:when>
8297
+ <xsl:otherwise>1</xsl:otherwise>
8298
+ </xsl:choose>
8299
+ </xsl:variable>
8300
+
8301
+ <!-- for images with big height -->
8302
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
8245
8303
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
8246
8304
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
8247
- </xsl:if>
8305
+ </xsl:if> -->
8248
8306
  <xsl:attribute name="scaling">uniform</xsl:attribute>
8307
+
8308
+ <xsl:if test="$scale_y != 1">
8309
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
8310
+ </xsl:if>
8311
+
8249
8312
  <xsl:copy-of select="$svg_content"/>
8250
8313
  </fo:instream-foreign-object>
8251
8314
  <!-- </fo:block> -->
@@ -8270,6 +8333,8 @@
8270
8333
  </xsl:attribute>
8271
8334
  </xsl:template>
8272
8335
 
8336
+ <xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
8337
+
8273
8338
  <xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
8274
8339
  <xsl:copy>
8275
8340
  <xsl:apply-templates select="@*" mode="svg_update"/>
@@ -8283,8 +8348,13 @@
8283
8348
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
8284
8349
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
8285
8350
 
8351
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
8352
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
8353
+
8286
8354
  <xsl:attribute name="width">
8287
8355
  <xsl:choose>
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>
8288
8358
  <xsl:when test="$width != ''">
8289
8359
  <xsl:value-of select="round($width)"/>
8290
8360
  </xsl:when>
@@ -8293,6 +8363,8 @@
8293
8363
  </xsl:attribute>
8294
8364
  <xsl:attribute name="height">
8295
8365
  <xsl:choose>
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>
8296
8368
  <xsl:when test="$height != ''">
8297
8369
  <xsl:value-of select="round($height)"/>
8298
8370
  </xsl:when>
@@ -8304,6 +8376,28 @@
8304
8376
  </xsl:copy>
8305
8377
  </xsl:template>
8306
8378
 
8379
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
8380
+ <!-- image[@width]/svg -->
8381
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
8382
+ <xsl:attribute name="width">
8383
+ <xsl:choose>
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>
8385
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
8386
+ </xsl:choose>
8387
+ </xsl:attribute>
8388
+ </xsl:template>
8389
+
8390
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
8391
+ <!-- image[@height]/svg -->
8392
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
8393
+ <xsl:attribute name="height">
8394
+ <xsl:choose>
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>
8396
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
8397
+ </xsl:choose>
8398
+ </xsl:attribute>
8399
+ </xsl:template>
8400
+
8307
8401
  <!-- regex for 'display: inline-block;' -->
8308
8402
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
8309
8403
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -9760,6 +9854,7 @@
9760
9854
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
9761
9855
  <xsl:if test="normalize-space() != ''">
9762
9856
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9857
+ <xsl:call-template name="refine_termexample-name-style"/>
9763
9858
  <xsl:apply-templates/>
9764
9859
  </fo:inline>
9765
9860
  </xsl:if>
@@ -9910,6 +10005,7 @@
9910
10005
  </xsl:when>
9911
10006
  <xsl:otherwise>
9912
10007
  <fo:inline xsl:use-attribute-sets="example-name-style">
10008
+ <xsl:call-template name="refine_example-name-style"/>
9913
10009
  <xsl:apply-templates/>
9914
10010
  </fo:inline>
9915
10011
  </xsl:otherwise>
@@ -10380,7 +10476,9 @@
10380
10476
  </xsl:template> <!-- sections_element_style -->
10381
10477
 
10382
10478
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
10383
- <fo:block break-after="page"/>
10479
+
10480
+ <fo:block break-after="page"/>
10481
+
10384
10482
  <fo:block>
10385
10483
  <xsl:call-template name="setId"/>
10386
10484
  <xsl:apply-templates/>
@@ -10451,7 +10549,7 @@
10451
10549
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10452
10550
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10453
10551
  </xsl:when>
10454
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10552
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10455
10553
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10456
10554
  </xsl:when>
10457
10555
  </xsl:choose>
@@ -11125,6 +11223,7 @@
11125
11223
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
11126
11224
 
11127
11225
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11226
+
11128
11227
  <xsl:call-template name="processBibitem"/>
11129
11228
  </fo:block>
11130
11229
 
@@ -11166,6 +11265,7 @@
11166
11265
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11167
11266
  <xsl:otherwise>
11168
11267
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11268
+
11169
11269
  <fo:list-item-label end-indent="label-end()">
11170
11270
  <fo:block role="SKIP">
11171
11271
  <fo:inline role="SKIP">
@@ -12938,4 +13038,6 @@
12938
13038
  </xsl:if>
12939
13039
  </xsl:template>
12940
13040
 
13041
+ <!-- update -->
13042
+
12941
13043
  </xsl:stylesheet>
@@ -208,7 +208,9 @@
208
208
  </define>
209
209
  <define name="roledescription">
210
210
  <element name="description">
211
- <ref name="FormattedString"/>
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
- <ref name="FormattedString"/>
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
- <ref name="FormattedString"/>
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
- <ref name="FormattedString"/>
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
- <text/>
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
- <ref name="FormattedString"/>
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
- <ref name="FormattedString"/>
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
- <ref name="FormattedString"/>
1394
+ <oneOrMore>
1395
+ <ref name="TextElement"/>
1396
+ </oneOrMore>
1381
1397
  </element>
1382
1398
  </optional>
1383
1399
  <element name="bibitem">
@@ -11,58 +11,22 @@
11
11
  <start>
12
12
  <ref name="bipm-standard"/>
13
13
  </start>
14
- <define name="xref">
15
- <element name="xref">
16
- <attribute name="target">
17
- <data type="string">
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
- <optional>
22
- <attribute name="to">
23
- <data type="string">
24
- <param name="pattern">\i\c*|\c+#\c+</param>
25
- </data>
26
- </attribute>
27
- </optional>
28
- <optional>
29
- <attribute name="type">
30
- <ref name="ReferenceFormat"/>
31
- </attribute>
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>
@@ -156,44 +156,7 @@
156
156
  </define>
157
157
  <define name="xref">
158
158
  <element name="xref">
159
- <attribute name="target">
160
- <data type="string">
161
- <param name="pattern">\i\c*|\c+#\c+</param>
162
- </data>
163
- </attribute>
164
- <optional>
165
- <attribute name="to">
166
- <data type="string">
167
- <param name="pattern">\i\c*|\c+#\c+</param>
168
- </data>
169
- </attribute>
170
- </optional>
171
- <optional>
172
- <attribute name="type">
173
- <ref name="ReferenceFormat"/>
174
- </attribute>
175
- </optional>
176
- <optional>
177
- <attribute name="alt"/>
178
- </optional>
179
- <optional>
180
- <attribute name="case">
181
- <choice>
182
- <value>capital</value>
183
- <value>lowercase</value>
184
- </choice>
185
- </attribute>
186
- </optional>
187
- <optional>
188
- <attribute name="droploc">
189
- <data type="boolean"/>
190
- </attribute>
191
- </optional>
192
- <optional>
193
- <attribute name="style">
194
- <ref name="XrefStyleType"/>
195
- </attribute>
196
- </optional>
159
+ <ref name="XrefAttributes"/>
197
160
  <ref name="XrefBody"/>
198
161
  </element>
199
162
  </define>
@@ -407,23 +370,7 @@
407
370
  </define>
408
371
  <define name="figure">
409
372
  <element name="figure">
410
- <attribute name="id">
411
- <data type="ID"/>
412
- </attribute>
413
- <optional>
414
- <attribute name="unnumbered">
415
- <data type="boolean"/>
416
- </attribute>
417
- </optional>
418
- <optional>
419
- <attribute name="number"/>
420
- </optional>
421
- <optional>
422
- <attribute name="subsequence"/>
423
- </optional>
424
- <optional>
425
- <attribute name="class"/>
426
- </optional>
373
+ <ref name="FigureAttributes"/>
427
374
  <ref name="BlockAttributes"/>
428
375
  <optional>
429
376
  <ref name="tname"/>
@@ -2450,6 +2397,49 @@
2450
2397
  </zeroOrMore>
2451
2398
  </element>
2452
2399
  </define>
2400
+ <define name="XrefAttributes">
2401
+ <attribute name="target">
2402
+ <data type="string">
2403
+ <param name="pattern">\i\c*|\c+#\c+</param>
2404
+ </data>
2405
+ </attribute>
2406
+ <optional>
2407
+ <attribute name="to">
2408
+ <data type="string">
2409
+ <param name="pattern">\i\c*|\c+#\c+</param>
2410
+ </data>
2411
+ </attribute>
2412
+ </optional>
2413
+ <optional>
2414
+ <attribute name="type">
2415
+ <ref name="ReferenceFormat"/>
2416
+ </attribute>
2417
+ </optional>
2418
+ <optional>
2419
+ <attribute name="alt"/>
2420
+ </optional>
2421
+ <optional>
2422
+ <attribute name="case">
2423
+ <choice>
2424
+ <value>capital</value>
2425
+ <value>lowercase</value>
2426
+ </choice>
2427
+ </attribute>
2428
+ </optional>
2429
+ <optional>
2430
+ <attribute name="droploc">
2431
+ <data type="boolean"/>
2432
+ </attribute>
2433
+ </optional>
2434
+ <optional>
2435
+ <attribute name="style">
2436
+ <ref name="XrefStyleType"/>
2437
+ </attribute>
2438
+ </optional>
2439
+ <optional>
2440
+ <attribute name="label"/>
2441
+ </optional>
2442
+ </define>
2453
2443
  <define name="XrefBody">
2454
2444
  <zeroOrMore>
2455
2445
  <ref name="XrefTarget"/>
@@ -2528,6 +2518,28 @@
2528
2518
  <attribute name="columns"/>
2529
2519
  </optional>
2530
2520
  </define>
2521
+ <define name="FigureAttributes">
2522
+ <attribute name="id">
2523
+ <data type="ID"/>
2524
+ </attribute>
2525
+ <optional>
2526
+ <attribute name="unnumbered">
2527
+ <data type="boolean"/>
2528
+ </attribute>
2529
+ </optional>
2530
+ <optional>
2531
+ <attribute name="number"/>
2532
+ </optional>
2533
+ <optional>
2534
+ <attribute name="subsequence"/>
2535
+ </optional>
2536
+ <optional>
2537
+ <attribute name="class"/>
2538
+ </optional>
2539
+ <optional>
2540
+ <attribute name="width"/>
2541
+ </optional>
2542
+ </define>
2531
2543
  <start>
2532
2544
  <ref name="standard-document"/>
2533
2545
  </start>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module BIPM
3
- VERSION = "2.4.3".freeze
3
+ VERSION = "2.4.5".freeze
4
4
  end
5
5
  end
@@ -9,6 +9,7 @@ module Relaton
9
9
  end
10
10
 
11
11
  def klass_initialize(_options)
12
+ super
12
13
  @nametemplateklass = Relaton::Render::Template::Name
13
14
  @seriestemplateklass = Relaton::Render::Template::Series
14
15
  @extenttemplateklass = Relaton::Render::Template::Extent
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-04 00:00:00.000000000 Z
11
+ date: 2024-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic