metanorma-jis 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a064f0e798e321317671b5e491d584734b5c6348cce7a3b4724a6bc1f71460bf
4
- data.tar.gz: d7f98949f0e67fa152423525138a0c203e544c102160c25b4852ddeee8dfde31
3
+ metadata.gz: 65f86c5e987c2ebb3e29e79cf4257506cb59ad2e5b80036d0814b0b7e806de52
4
+ data.tar.gz: a873f22013e0ffb53706b5615c1297adff565ee6ae0184465456f7a4a081af73
5
5
  SHA512:
6
- metadata.gz: 47436176727b7d79fcf56ef5dae063d8235f4e238cee743b88f0da622f0babbe9dfc5d7c1b477f919c23990b0e75f4bd27f98a07dd7903e4aa11122acdcf7be5
7
- data.tar.gz: 30fd069624c832d3527736d35f56d8f0ff52225579121f299f91d54b106b8584c2483d98ecac608583cd74323798fbbf6f2a60d9cdf89ec470d4943758ab7743
6
+ metadata.gz: '09aaa2e07d8cc7632b463c51d83a8b7d5ddd8056c636175ec1fcc9d4ca824ae7cb3c974e0ed39891c339a15706c99989f7c8dad583d1ece3985d54431a78c581'
7
+ data.tar.gz: f8dcb73f59c6bcd1757c6ebee5f9ee53c8185eecfe0ab1f5922fa9c52e0cce65d661b9ba1647c6cca148e475b0630f52d1697c79dca13833a95cce7f398c468f
@@ -1856,6 +1856,7 @@
1856
1856
  <xsl:variable name="zero_width_space">​</xsl:variable>
1857
1857
  <xsl:variable name="hair_space"> </xsl:variable>
1858
1858
  <xsl:variable name="en_dash">–</xsl:variable>
1859
+ <xsl:variable name="em_dash">—</xsl:variable>
1859
1860
 
1860
1861
  <xsl:template name="getTitle">
1861
1862
  <xsl:param name="name"/>
@@ -2160,6 +2161,10 @@
2160
2161
 
2161
2162
  </xsl:attribute-set> <!-- example-name-style -->
2162
2163
 
2164
+ <xsl:template name="refine_example-name-style">
2165
+
2166
+ </xsl:template>
2167
+
2163
2168
  <xsl:attribute-set name="example-p-style">
2164
2169
 
2165
2170
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
@@ -2176,6 +2181,10 @@
2176
2181
 
2177
2182
  </xsl:attribute-set> <!-- termexample-name-style -->
2178
2183
 
2184
+ <xsl:template name="refine_termexample-name-style">
2185
+
2186
+ </xsl:template>
2187
+
2179
2188
  <!-- ========================== -->
2180
2189
  <!-- Table styles -->
2181
2190
  <!-- ========================== -->
@@ -2377,6 +2386,10 @@
2377
2386
 
2378
2387
  </xsl:attribute-set> <!-- table-fn-style -->
2379
2388
 
2389
+ <xsl:template name="refine_table-fn-style">
2390
+
2391
+ </xsl:template>
2392
+
2380
2393
  <xsl:attribute-set name="table-fn-number-style">
2381
2394
  <xsl:attribute name="font-size">80%</xsl:attribute>
2382
2395
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -2389,6 +2402,10 @@
2389
2402
 
2390
2403
  </xsl:attribute-set> <!-- table-fn-number-style -->
2391
2404
 
2405
+ <xsl:template name="refine_table-fn-number-style">
2406
+
2407
+ </xsl:template>
2408
+
2392
2409
  <xsl:attribute-set name="fn-container-body-style">
2393
2410
  <xsl:attribute name="text-indent">0</xsl:attribute>
2394
2411
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -5858,12 +5875,18 @@
5858
5875
  </xsl:template>
5859
5876
 
5860
5877
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5861
- <xsl:variable name="text" select="normalize-space(.)"/>
5862
- <fo:inline font-size="75%" role="SKIP">
5878
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5879
+ <xsl:variable name="text" select="."/>
5880
+ <xsl:variable name="ratio_">
5881
+ 0.75
5882
+ </xsl:variable>
5883
+ <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
5884
+ <fo:inline font-size="{$ratio * 100}%" role="SKIP">
5863
5885
  <xsl:if test="string-length($text) &gt; 0">
5864
5886
  <xsl:variable name="smallCapsText">
5865
5887
  <xsl:call-template name="recursiveSmallCaps">
5866
5888
  <xsl:with-param name="text" select="$text"/>
5889
+ <xsl:with-param name="ratio" select="$ratio"/>
5867
5890
  </xsl:call-template>
5868
5891
  </xsl:variable>
5869
5892
  <!-- merge neighboring fo:inline -->
@@ -5900,12 +5923,13 @@
5900
5923
 
5901
5924
  <xsl:template name="recursiveSmallCaps">
5902
5925
  <xsl:param name="text"/>
5926
+ <xsl:param name="ratio"/>
5903
5927
  <xsl:variable name="char" select="substring($text,1,1)"/>
5904
5928
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
5905
5929
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5906
5930
  <xsl:choose>
5907
5931
  <xsl:when test="$char=$upperCase">
5908
- <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5932
+ <fo:inline font-size="{100 div $ratio}%" role="SKIP">
5909
5933
  <xsl:value-of select="$upperCase"/>
5910
5934
  </fo:inline>
5911
5935
  </xsl:when>
@@ -5916,6 +5940,7 @@
5916
5940
  <xsl:if test="string-length($text) &gt; 1">
5917
5941
  <xsl:call-template name="recursiveSmallCaps">
5918
5942
  <xsl:with-param name="text" select="substring($text,2)"/>
5943
+ <xsl:with-param name="ratio" select="$ratio"/>
5919
5944
  </xsl:call-template>
5920
5945
  </xsl:if>
5921
5946
  </xsl:template>
@@ -5952,6 +5977,9 @@
5952
5977
  <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5953
5978
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5954
5979
  </xsl:if>
5980
+ <xsl:if test="$key = 'text-indent'">
5981
+ <style name="padding-left"><xsl:value-of select="$value"/></style>
5982
+ </xsl:if>
5955
5983
  </xsl:for-each>
5956
5984
  </xsl:variable>
5957
5985
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -7358,6 +7386,11 @@
7358
7386
  </xsl:call-template>
7359
7387
  </xsl:template>
7360
7388
 
7389
+ <!-- command between two xref points to non-standard bibitem -->
7390
+ <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']]]">
7391
+ <xsl:value-of select="."/>
7392
+ </xsl:template>
7393
+
7361
7394
  <!-- ====== -->
7362
7395
  <!-- formula -->
7363
7396
  <!-- ====== -->
@@ -7992,16 +8025,44 @@
7992
8025
  </xsl:choose>
7993
8026
 
7994
8027
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7995
- <xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
7996
- <xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
8028
+ <xsl:variable name="svg_width_" select="xalan:nodeset($svg_content)/*/@width"/>
8029
+ <xsl:variable name="svg_width" select="number(translate($svg_width_, 'px', ''))"/>
8030
+ <xsl:variable name="svg_height_" select="xalan:nodeset($svg_content)/*/@height"/>
8031
+ <xsl:variable name="svg_height" select="number(translate($svg_height_, 'px', ''))"/>
8032
+
8033
+ <!-- Example: -->
7997
8034
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
7998
8035
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
7999
8036
  <!-- effective height / width = 1.48, 1.4 - with title -->
8000
- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
8037
+
8038
+ <xsl:variable name="scale_x">
8039
+ <xsl:choose>
8040
+ <xsl:when test="$svg_width &gt; $width_effective_px">
8041
+ <xsl:value-of select="$width_effective_px div $svg_width"/>
8042
+ </xsl:when>
8043
+ <xsl:otherwise>1</xsl:otherwise>
8044
+ </xsl:choose>
8045
+ </xsl:variable>
8046
+ <xsl:variable name="scale_y">
8047
+ <xsl:choose>
8048
+ <xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
8049
+ <xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
8050
+ </xsl:when>
8051
+ <xsl:otherwise>1</xsl:otherwise>
8052
+ </xsl:choose>
8053
+ </xsl:variable>
8054
+
8055
+ <!-- for images with big height -->
8056
+ <!-- <xsl:if test="$svg_height &gt; ($svg_width * 1.4)">
8001
8057
  <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
8002
8058
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
8003
- </xsl:if>
8059
+ </xsl:if> -->
8004
8060
  <xsl:attribute name="scaling">uniform</xsl:attribute>
8061
+
8062
+ <xsl:if test="$scale_y != 1">
8063
+ <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
8064
+ </xsl:if>
8065
+
8005
8066
  <xsl:copy-of select="$svg_content"/>
8006
8067
  </fo:instream-foreign-object>
8007
8068
  <!-- </fo:block> -->
@@ -8026,6 +8087,8 @@
8026
8087
  </xsl:attribute>
8027
8088
  </xsl:template>
8028
8089
 
8090
+ <xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
8091
+
8029
8092
  <xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
8030
8093
  <xsl:copy>
8031
8094
  <xsl:apply-templates select="@*" mode="svg_update"/>
@@ -8039,8 +8102,13 @@
8039
8102
  <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
8040
8103
  <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
8041
8104
 
8105
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
8106
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
8107
+
8042
8108
  <xsl:attribute name="width">
8043
8109
  <xsl:choose>
8110
+ <!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
8111
+ <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>
8044
8112
  <xsl:when test="$width != ''">
8045
8113
  <xsl:value-of select="round($width)"/>
8046
8114
  </xsl:when>
@@ -8049,6 +8117,8 @@
8049
8117
  </xsl:attribute>
8050
8118
  <xsl:attribute name="height">
8051
8119
  <xsl:choose>
8120
+ <!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
8121
+ <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>
8052
8122
  <xsl:when test="$height != ''">
8053
8123
  <xsl:value-of select="round($height)"/>
8054
8124
  </xsl:when>
@@ -8060,6 +8130,28 @@
8060
8130
  </xsl:copy>
8061
8131
  </xsl:template>
8062
8132
 
8133
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
8134
+ <!-- image[@width]/svg -->
8135
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
8136
+ <xsl:attribute name="width">
8137
+ <xsl:choose>
8138
+ <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>
8139
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
8140
+ </xsl:choose>
8141
+ </xsl:attribute>
8142
+ </xsl:template>
8143
+
8144
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
8145
+ <!-- image[@height]/svg -->
8146
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
8147
+ <xsl:attribute name="height">
8148
+ <xsl:choose>
8149
+ <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>
8150
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
8151
+ </xsl:choose>
8152
+ </xsl:attribute>
8153
+ </xsl:template>
8154
+
8063
8155
  <!-- regex for 'display: inline-block;' -->
8064
8156
  <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
8065
8157
  <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
@@ -9515,6 +9607,7 @@
9515
9607
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
9516
9608
  <xsl:if test="normalize-space() != ''">
9517
9609
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9610
+ <xsl:call-template name="refine_termexample-name-style"/>
9518
9611
  <xsl:apply-templates/>
9519
9612
  </fo:inline>
9520
9613
  </xsl:if>
@@ -9665,6 +9758,7 @@
9665
9758
  </xsl:when>
9666
9759
  <xsl:otherwise>
9667
9760
  <fo:inline xsl:use-attribute-sets="example-name-style">
9761
+ <xsl:call-template name="refine_example-name-style"/>
9668
9762
  <xsl:apply-templates/>
9669
9763
  </fo:inline>
9670
9764
  </xsl:otherwise>
@@ -10121,7 +10215,9 @@
10121
10215
  </xsl:template> <!-- sections_element_style -->
10122
10216
 
10123
10217
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
10124
- <fo:block break-after="page"/>
10218
+
10219
+ <fo:block break-after="page"/>
10220
+
10125
10221
  <fo:block>
10126
10222
  <xsl:call-template name="setId"/>
10127
10223
  <xsl:apply-templates/>
@@ -10188,7 +10284,7 @@
10188
10284
  <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10189
10285
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10190
10286
  </xsl:when>
10191
- <xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10287
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10192
10288
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10193
10289
  </xsl:when>
10194
10290
  </xsl:choose>
@@ -10923,6 +11019,7 @@
10923
11019
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10924
11020
  <xsl:otherwise>
10925
11021
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11022
+
10926
11023
  <fo:list-item-label end-indent="label-end()">
10927
11024
  <fo:block role="SKIP">
10928
11025
  <fo:inline role="SKIP">
@@ -12791,4 +12888,6 @@
12791
12888
  </xsl:if>
12792
12889
  </xsl:template>
12793
12890
 
12891
+ <!-- update -->
12892
+
12794
12893
  </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">
@@ -77,6 +77,11 @@ module Metanorma
77
77
  a.children.first.previous = "<name>#{@i18n.chairperson}</name>"
78
78
  end
79
79
  end
80
+
81
+ def ol_cleanup(doc)
82
+ ::Metanorma::Standoc::Converter.instance_method(:ol_cleanup).bind(self)
83
+ .call(doc)
84
+ end
80
85
  end
81
86
  end
82
87
  end
@@ -138,7 +138,8 @@ module Metanorma
138
138
 
139
139
  def metadata_id(node, xml)
140
140
  if id = node.attr("docidentifier")
141
- xml.docidentifier id.sub(/^JIS /, ""), **attr_code(type: "JIS")
141
+ xml.docidentifier id.sub(/^JIS /, ""),
142
+ **attr_code(type: "JIS", primary: "true")
142
143
  else iso_id(node, xml)
143
144
  end
144
145
  end
@@ -177,7 +178,7 @@ module Metanorma
177
178
 
178
179
  def iso_id_out(xml, params, _with_prf)
179
180
  id = iso_id_default(params).to_s(with_publisher: false)
180
- xml.docidentifier id.strip, type: "JIS"
181
+ xml.docidentifier id.strip, type: "JIS", primary: "true"
181
182
  end
182
183
 
183
184
  def iso_id_default(params)
@@ -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,6 +1,6 @@
1
1
  module Metanorma
2
2
  module JIS
3
- VERSION = "0.2.3".freeze
3
+ VERSION = "0.2.5".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
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: japanese_calendar