metanorma-csa 2.4.3 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e4fa9ad31dfc822948fa0c41539cee42c88dcbc4d90aab489ea37075b2a25fd
4
- data.tar.gz: ea51d3c48d4301eb2fbb32bcc2d143a831c4bd01503016ff4a5c89633a94a05a
3
+ metadata.gz: be3ee9afaaeac7e5116f05cf4ea372cb97eeb0701478a76418b772131d4efa13
4
+ data.tar.gz: 5e04ecaed0de6c94536dfcb65f38d4491f6bab75f9bce71b25f875a4b0b93bfc
5
5
  SHA512:
6
- metadata.gz: adf4a1a7e2bd08738e9d69dab199852d899438a6646b567662bc77d189647e4436dedc4a8f011b9a490ebc52017c41dcd398c89fd525f1e7d4458e63fbb96c39
7
- data.tar.gz: ed481d1008946eea02b468a40168e98f7f216ff864936f15dc2f85a68431ff11829770d42d34b8041308d4f837492ae4cf65a7293406d14dea1c4b09c35b962a
6
+ metadata.gz: 2b9d95ffafdd38135ca1a4f3f46e1e5566a51b7df35c291a141300a72019d625cf1bb0139977ed62cce09c470b5c0ae8b40574fd6d4677aa84b901430690e98c
7
+ data.tar.gz: cea6b9bfcb8c4894f4635bc858f11ea39dea15fda4ff5af4c175324405564ba06e2f9cb3c99731dedecbce2f1abbcfd37e74779e11c7c324c73fd8c898380f61
@@ -819,6 +819,7 @@
819
819
  <xsl:variable name="zero_width_space">​</xsl:variable>
820
820
  <xsl:variable name="hair_space"> </xsl:variable>
821
821
  <xsl:variable name="en_dash">–</xsl:variable>
822
+ <xsl:variable name="em_dash">—</xsl:variable>
822
823
 
823
824
  <xsl:template name="getTitle">
824
825
  <xsl:param name="name"/>
@@ -1139,6 +1140,10 @@
1139
1140
 
1140
1141
  </xsl:attribute-set> <!-- example-name-style -->
1141
1142
 
1143
+ <xsl:template name="refine_example-name-style">
1144
+
1145
+ </xsl:template>
1146
+
1142
1147
  <xsl:attribute-set name="example-p-style">
1143
1148
 
1144
1149
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
@@ -1155,6 +1160,10 @@
1155
1160
 
1156
1161
  </xsl:attribute-set> <!-- termexample-name-style -->
1157
1162
 
1163
+ <xsl:template name="refine_termexample-name-style">
1164
+
1165
+ </xsl:template>
1166
+
1158
1167
  <!-- ========================== -->
1159
1168
  <!-- Table styles -->
1160
1169
  <!-- ========================== -->
@@ -1311,12 +1320,20 @@
1311
1320
 
1312
1321
  </xsl:attribute-set> <!-- table-fn-style -->
1313
1322
 
1323
+ <xsl:template name="refine_table-fn-style">
1324
+
1325
+ </xsl:template>
1326
+
1314
1327
  <xsl:attribute-set name="table-fn-number-style">
1315
1328
  <xsl:attribute name="font-size">80%</xsl:attribute>
1316
1329
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
1317
1330
 
1318
1331
  </xsl:attribute-set> <!-- table-fn-number-style -->
1319
1332
 
1333
+ <xsl:template name="refine_table-fn-number-style">
1334
+
1335
+ </xsl:template>
1336
+
1320
1337
  <xsl:attribute-set name="fn-container-body-style">
1321
1338
  <xsl:attribute name="text-indent">0</xsl:attribute>
1322
1339
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -2631,6 +2648,7 @@
2631
2648
  <!-- centered table when table name is centered (see table-name-style) -->
2632
2649
 
2633
2650
  <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
2651
+
2634
2652
  <fo:table-column column-width="proportional-column-width(1)"/>
2635
2653
  <fo:table-column column-width="{@width}"/>
2636
2654
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -3672,8 +3690,9 @@
3672
3690
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3673
3691
 
3674
3692
  <fo:block xsl:use-attribute-sets="table-fn-style">
3675
-
3693
+ <xsl:call-template name="refine_table-fn-style"/>
3676
3694
  <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3695
+ <xsl:call-template name="refine_table-fn-number-style"/>
3677
3696
 
3678
3697
  <xsl:value-of select="@reference"/>
3679
3698
 
@@ -4811,12 +4830,18 @@
4811
4830
  </xsl:template>
4812
4831
 
4813
4832
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4814
- <xsl:variable name="text" select="normalize-space(.)"/>
4815
- <fo:inline font-size="75%" role="SKIP">
4833
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
4834
+ <xsl:variable name="text" select="."/>
4835
+ <xsl:variable name="ratio_">
4836
+ 0.75
4837
+ </xsl:variable>
4838
+ <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
4839
+ <fo:inline font-size="{$ratio * 100}%" role="SKIP">
4816
4840
  <xsl:if test="string-length($text) &gt; 0">
4817
4841
  <xsl:variable name="smallCapsText">
4818
4842
  <xsl:call-template name="recursiveSmallCaps">
4819
4843
  <xsl:with-param name="text" select="$text"/>
4844
+ <xsl:with-param name="ratio" select="$ratio"/>
4820
4845
  </xsl:call-template>
4821
4846
  </xsl:variable>
4822
4847
  <!-- merge neighboring fo:inline -->
@@ -4853,12 +4878,13 @@
4853
4878
 
4854
4879
  <xsl:template name="recursiveSmallCaps">
4855
4880
  <xsl:param name="text"/>
4881
+ <xsl:param name="ratio"/>
4856
4882
  <xsl:variable name="char" select="substring($text,1,1)"/>
4857
4883
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
4858
4884
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
4859
4885
  <xsl:choose>
4860
4886
  <xsl:when test="$char=$upperCase">
4861
- <fo:inline font-size="{100 div 0.75}%" role="SKIP">
4887
+ <fo:inline font-size="{100 div $ratio}%" role="SKIP">
4862
4888
  <xsl:value-of select="$upperCase"/>
4863
4889
  </fo:inline>
4864
4890
  </xsl:when>
@@ -4869,6 +4895,7 @@
4869
4895
  <xsl:if test="string-length($text) &gt; 1">
4870
4896
  <xsl:call-template name="recursiveSmallCaps">
4871
4897
  <xsl:with-param name="text" select="substring($text,2)"/>
4898
+ <xsl:with-param name="ratio" select="$ratio"/>
4872
4899
  </xsl:call-template>
4873
4900
  </xsl:if>
4874
4901
  </xsl:template>
@@ -4905,6 +4932,9 @@
4905
4932
  <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
4906
4933
  <style name="{$key}"><xsl:value-of select="$value"/></style>
4907
4934
  </xsl:if>
4935
+ <xsl:if test="$key = 'text-indent'">
4936
+ <style name="padding-left"><xsl:value-of select="$value"/></style>
4937
+ </xsl:if>
4908
4938
  </xsl:for-each>
4909
4939
  </xsl:variable>
4910
4940
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -6307,6 +6337,11 @@
6307
6337
  </xsl:call-template>
6308
6338
  </xsl:template>
6309
6339
 
6340
+ <!-- command between two xref points to non-standard bibitem -->
6341
+ <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']]]">
6342
+ <xsl:value-of select="."/>
6343
+ </xsl:template>
6344
+
6310
6345
  <!-- ====== -->
6311
6346
  <!-- formula -->
6312
6347
  <!-- ====== -->
@@ -6950,16 +6985,44 @@
6950
6985
  </xsl:choose>
6951
6986
 
6952
6987
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
6953
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
6954
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
6988
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
6989
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
6990
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
6991
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
6992
+
6993
+ <!-- Example: -->
6955
6994
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
6956
6995
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
6957
6996
  <!-- effective height / width = 1.48, 1.4 - with title -->
6958
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
6997
+
6998
+ <xsl:variable name="scale_x">
6999
+ <xsl:choose>
7000
+ <xsl:when test="$svg_width &gt; $width_effective_px">
7001
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
7002
+ </xsl:when>
7003
+ <xsl:otherwise>1</xsl:otherwise>
7004
+ </xsl:choose>
7005
+ </xsl:variable>
7006
+ <xsl:variable name="scale_y">
7007
+ <xsl:choose>
7008
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
7009
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
7010
+ </xsl:when>
7011
+ <xsl:otherwise>1</xsl:otherwise>
7012
+ </xsl:choose>
7013
+ </xsl:variable>
7014
+
7015
+ <!-- for images with big height -->
7016
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
6959
7017
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
6960
7018
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
6961
- </xsl:if>
7019
+ </xsl:if> -->
6962
7020
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7021
+
7022
+ <xsl:if test="$scale_y != 1">
7023
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
7024
+ </xsl:if>
7025
+
6963
7026
  <xsl:copy-of select="$svg_content"/>
6964
7027
  </fo:instream-foreign-object>
6965
7028
  <!-- </fo:block> -->
@@ -6984,6 +7047,8 @@
6984
7047
  </xsl:attribute>
6985
7048
  </xsl:template>
6986
7049
 
7050
+ <xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
7051
+
6987
7052
  <xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
6988
7053
  <xsl:copy>
6989
7054
  <xsl:apply-templates select="@*" mode="svg_update"/>
@@ -6997,8 +7062,13 @@
6997
7062
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
6998
7063
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
6999
7064
 
7065
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
7066
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
7067
+
7000
7068
  <xsl:attribute name="width">
7001
7069
  <xsl:choose>
7070
+ <!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7071
+ <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>
7002
7072
  <xsl:when test="$width != ''">
7003
7073
  <xsl:value-of select="round($width)"/>
7004
7074
  </xsl:when>
@@ -7007,6 +7077,8 @@
7007
7077
  </xsl:attribute>
7008
7078
  <xsl:attribute name="height">
7009
7079
  <xsl:choose>
7080
+ <!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7081
+ <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>
7010
7082
  <xsl:when test="$height != ''">
7011
7083
  <xsl:value-of select="round($height)"/>
7012
7084
  </xsl:when>
@@ -7018,6 +7090,28 @@
7018
7090
  </xsl:copy>
7019
7091
  </xsl:template>
7020
7092
 
7093
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
7094
+ <!-- image[@width]/svg -->
7095
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7096
+ <xsl:attribute name="width">
7097
+ <xsl:choose>
7098
+ <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>
7099
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7100
+ </xsl:choose>
7101
+ </xsl:attribute>
7102
+ </xsl:template>
7103
+
7104
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
7105
+ <!-- image[@height]/svg -->
7106
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7107
+ <xsl:attribute name="height">
7108
+ <xsl:choose>
7109
+ <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>
7110
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7111
+ </xsl:choose>
7112
+ </xsl:attribute>
7113
+ </xsl:template>
7114
+
7021
7115
  <!-- regex for 'display: inline-block;' -->
7022
7116
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
7023
7117
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -8475,6 +8569,7 @@
8475
8569
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
8476
8570
  <xsl:if test="normalize-space() != ''">
8477
8571
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
8572
+ <xsl:call-template name="refine_termexample-name-style"/>
8478
8573
  <xsl:apply-templates/>
8479
8574
  </fo:inline>
8480
8575
  </xsl:if>
@@ -8625,6 +8720,7 @@
8625
8720
  </xsl:when>
8626
8721
  <xsl:otherwise>
8627
8722
  <fo:inline xsl:use-attribute-sets="example-name-style">
8723
+ <xsl:call-template name="refine_example-name-style"/>
8628
8724
  <xsl:apply-templates/>
8629
8725
  </fo:inline>
8630
8726
  </xsl:otherwise>
@@ -9088,7 +9184,9 @@
9088
9184
  </xsl:template> <!-- sections_element_style -->
9089
9185
 
9090
9186
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
9091
- <fo:block break-after="page"/>
9187
+
9188
+ <fo:block break-after="page"/>
9189
+
9092
9190
  <fo:block>
9093
9191
  <xsl:call-template name="setId"/>
9094
9192
  <xsl:apply-templates/>
@@ -9155,7 +9253,7 @@
9155
9253
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
9156
9254
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9157
9255
  </xsl:when>
9158
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9256
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
9159
9257
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
9160
9258
  </xsl:when>
9161
9259
  </xsl:choose>
@@ -9829,6 +9927,7 @@
9829
9927
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
9830
9928
 
9831
9929
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
9930
+
9832
9931
  <xsl:call-template name="processBibitem"/>
9833
9932
  </fo:block>
9834
9933
 
@@ -9852,6 +9951,7 @@
9852
9951
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
9853
9952
  <xsl:otherwise>
9854
9953
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
9954
+
9855
9955
  <fo:list-item-label end-indent="label-end()">
9856
9956
  <fo:block role="SKIP">
9857
9957
  <fo:inline role="SKIP">
@@ -11613,4 +11713,6 @@
11613
11713
  </xsl:if>
11614
11714
  </xsl:template>
11615
11715
 
11716
+ <!-- update -->
11717
+
11616
11718
  </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">
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns='https://www.metanorma.org/ns/csa' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns='https://www.metanorma.org/ns/csa' xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <!--
4
4
  VERSION v1.2.1
5
5
  Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
@@ -13,23 +13,8 @@
13
13
  </start>
14
14
  <define name="figure">
15
15
  <element name="figure">
16
- <attribute name="id">
17
- <data type="ID"/>
18
- </attribute>
19
- <optional>
20
- <attribute name="unnumbered">
21
- <data type="boolean"/>
22
- </attribute>
23
- </optional>
24
- <optional>
25
- <attribute name="number"/>
26
- </optional>
27
- <optional>
28
- <attribute name="subsequence"/>
29
- </optional>
30
- <optional>
31
- <attribute name="class"/>
32
- </optional>
16
+ <ref name="FigureAttributes"/>
17
+ <ref name="BlockAttributes"/>
33
18
  <optional>
34
19
  <ref name="source"/>
35
20
  </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 Csa
3
- VERSION = "2.4.3".freeze
3
+ VERSION = "2.4.5".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
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