metanorma-ribose 2.4.4 → 2.4.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: 7ce8de0432273f5b9ba03eeb10aa7c494698cf0d84701dd9e945a7bd1228665b
4
- data.tar.gz: cb59e908e459a490b6edcf44f7caf0f6622079cd96591d74c03cb19b3dc49615
3
+ metadata.gz: 04fec1adc64d9089a2d992cd22535e17380317916d00bbb28d5b2bb3c3ff4092
4
+ data.tar.gz: 5cda790bba9445ceb0a9613207da3514dc4d7bf7071f8cc74e32a7824961558c
5
5
  SHA512:
6
- metadata.gz: 1575984cc44861b1cec45264eace9db1a8733a8e135ac6d06e2a7cb2b32a882e7617531b6665caf9c6dd692e72d312087d1f98f75556a979e6745f041c8236b5
7
- data.tar.gz: 673c558664981e0eca5a2965ca6cb4222a6281d94465a8e0e85eac029c26b31813188206e5a10e02dad4cdcfd7f0e20f79b61d0500f29a3e733f2122fe8394b3
6
+ metadata.gz: 350fb4a6f97089c3e596ff7d3edfef12e1cf85a36e4f9105613b51bf324f01a9ff9e9572c03b2a28ef32df05c9749dabec3fc89324132264cd28f39ace90d21f
7
+ data.tar.gz: 45d6a86de99ab2425a542ea4343e2036a833d9075df97974f08107361488ad4ad1e9855b5dc3ed71417364d91fbef9b9a467b827ebfb844d77cdc09e8c4fb9f5
@@ -1452,6 +1452,7 @@
1452
1452
  <xsl:variable name="zero_width_space">​</xsl:variable>
1453
1453
  <xsl:variable name="hair_space"> </xsl:variable>
1454
1454
  <xsl:variable name="en_dash">–</xsl:variable>
1455
+ <xsl:variable name="em_dash">—</xsl:variable>
1455
1456
 
1456
1457
  <xsl:template name="getTitle">
1457
1458
  <xsl:param name="name"/>
@@ -1801,6 +1802,10 @@
1801
1802
 
1802
1803
  </xsl:attribute-set> <!-- example-name-style -->
1803
1804
 
1805
+ <xsl:template name="refine_example-name-style">
1806
+
1807
+ </xsl:template>
1808
+
1804
1809
  <xsl:attribute-set name="example-p-style">
1805
1810
 
1806
1811
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
@@ -1819,6 +1824,10 @@
1819
1824
 
1820
1825
  </xsl:attribute-set> <!-- termexample-name-style -->
1821
1826
 
1827
+ <xsl:template name="refine_termexample-name-style">
1828
+
1829
+ </xsl:template>
1830
+
1822
1831
  <!-- ========================== -->
1823
1832
  <!-- Table styles -->
1824
1833
  <!-- ========================== -->
@@ -2000,12 +2009,20 @@
2000
2009
 
2001
2010
  </xsl:attribute-set> <!-- table-fn-style -->
2002
2011
 
2012
+ <xsl:template name="refine_table-fn-style">
2013
+
2014
+ </xsl:template>
2015
+
2003
2016
  <xsl:attribute-set name="table-fn-number-style">
2004
2017
  <xsl:attribute name="font-size">80%</xsl:attribute>
2005
2018
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
2006
2019
 
2007
2020
  </xsl:attribute-set> <!-- table-fn-number-style -->
2008
2021
 
2022
+ <xsl:template name="refine_table-fn-number-style">
2023
+
2024
+ </xsl:template>
2025
+
2009
2026
  <xsl:attribute-set name="fn-container-body-style">
2010
2027
  <xsl:attribute name="text-indent">0</xsl:attribute>
2011
2028
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -3379,6 +3396,7 @@
3379
3396
  <!-- centered table when table name is centered (see table-name-style) -->
3380
3397
 
3381
3398
  <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
3399
+
3382
3400
  <fo:table-column column-width="proportional-column-width(1)"/>
3383
3401
  <fo:table-column column-width="{@width}"/>
3384
3402
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -4420,8 +4438,9 @@
4420
4438
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4421
4439
 
4422
4440
  <fo:block xsl:use-attribute-sets="table-fn-style">
4423
-
4441
+ <xsl:call-template name="refine_table-fn-style"/>
4424
4442
  <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
4443
+ <xsl:call-template name="refine_table-fn-number-style"/>
4425
4444
 
4426
4445
  <xsl:value-of select="@reference"/>
4427
4446
 
@@ -5572,11 +5591,16 @@
5572
5591
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5573
5592
  <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5574
5593
  <xsl:variable name="text" select="."/>
5575
- <fo:inline font-size="75%" role="SKIP">
5594
+ <xsl:variable name="ratio_">
5595
+ 0.75
5596
+ </xsl:variable>
5597
+ <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
5598
+ <fo:inline font-size="{$ratio * 100}%" role="SKIP">
5576
5599
  <xsl:if test="string-length($text) &gt; 0">
5577
5600
  <xsl:variable name="smallCapsText">
5578
5601
  <xsl:call-template name="recursiveSmallCaps">
5579
5602
  <xsl:with-param name="text" select="$text"/>
5603
+ <xsl:with-param name="ratio" select="$ratio"/>
5580
5604
  </xsl:call-template>
5581
5605
  </xsl:variable>
5582
5606
  <!-- merge neighboring fo:inline -->
@@ -5613,12 +5637,13 @@
5613
5637
 
5614
5638
  <xsl:template name="recursiveSmallCaps">
5615
5639
  <xsl:param name="text"/>
5640
+ <xsl:param name="ratio"/>
5616
5641
  <xsl:variable name="char" select="substring($text,1,1)"/>
5617
5642
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
5618
5643
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5619
5644
  <xsl:choose>
5620
5645
  <xsl:when test="$char=$upperCase">
5621
- <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5646
+ <fo:inline font-size="{100 div $ratio}%" role="SKIP">
5622
5647
  <xsl:value-of select="$upperCase"/>
5623
5648
  </fo:inline>
5624
5649
  </xsl:when>
@@ -5629,6 +5654,7 @@
5629
5654
  <xsl:if test="string-length($text) &gt; 1">
5630
5655
  <xsl:call-template name="recursiveSmallCaps">
5631
5656
  <xsl:with-param name="text" select="substring($text,2)"/>
5657
+ <xsl:with-param name="ratio" select="$ratio"/>
5632
5658
  </xsl:call-template>
5633
5659
  </xsl:if>
5634
5660
  </xsl:template>
@@ -5665,6 +5691,9 @@
5665
5691
  <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5666
5692
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5667
5693
  </xsl:if>
5694
+ <xsl:if test="$key = 'text-indent'">
5695
+ <style name="padding-left"><xsl:value-of select="$value"/></style>
5696
+ </xsl:if>
5668
5697
  </xsl:for-each>
5669
5698
  </xsl:variable>
5670
5699
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -7067,6 +7096,11 @@
7067
7096
  </xsl:call-template>
7068
7097
  </xsl:template>
7069
7098
 
7099
+ <!-- command between two xref points to non-standard bibitem -->
7100
+ <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']]]">
7101
+ <xsl:value-of select="."/>
7102
+ </xsl:template>
7103
+
7070
7104
  <!-- ====== -->
7071
7105
  <!-- formula -->
7072
7106
  <!-- ====== -->
@@ -7773,6 +7807,8 @@
7773
7807
  </xsl:attribute>
7774
7808
  </xsl:template>
7775
7809
 
7810
+ <xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
7811
+
7776
7812
  <xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
7777
7813
  <xsl:copy>
7778
7814
  <xsl:apply-templates select="@*" mode="svg_update"/>
@@ -7791,7 +7827,8 @@
7791
7827
 
7792
7828
  <xsl:attribute name="width">
7793
7829
  <xsl:choose>
7794
- <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7830
+ <!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7831
+ <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>
7795
7832
  <xsl:when test="$width != ''">
7796
7833
  <xsl:value-of select="round($width)"/>
7797
7834
  </xsl:when>
@@ -7800,7 +7837,8 @@
7800
7837
  </xsl:attribute>
7801
7838
  <xsl:attribute name="height">
7802
7839
  <xsl:choose>
7803
- <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7840
+ <!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7841
+ <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>
7804
7842
  <xsl:when test="$height != ''">
7805
7843
  <xsl:value-of select="round($height)"/>
7806
7844
  </xsl:when>
@@ -7817,7 +7855,7 @@
7817
7855
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7818
7856
  <xsl:attribute name="width">
7819
7857
  <xsl:choose>
7820
- <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7858
+ <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>
7821
7859
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7822
7860
  </xsl:choose>
7823
7861
  </xsl:attribute>
@@ -7828,7 +7866,7 @@
7828
7866
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7829
7867
  <xsl:attribute name="height">
7830
7868
  <xsl:choose>
7831
- <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7869
+ <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>
7832
7870
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7833
7871
  </xsl:choose>
7834
7872
  </xsl:attribute>
@@ -9294,6 +9332,7 @@
9294
9332
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
9295
9333
  <xsl:if test="normalize-space() != ''">
9296
9334
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9335
+ <xsl:call-template name="refine_termexample-name-style"/>
9297
9336
  <xsl:apply-templates/>:
9298
9337
  </fo:inline>
9299
9338
  </xsl:if>
@@ -9444,6 +9483,7 @@
9444
9483
  </xsl:when>
9445
9484
  <xsl:otherwise>
9446
9485
  <fo:inline xsl:use-attribute-sets="example-name-style">
9486
+ <xsl:call-template name="refine_example-name-style"/>
9447
9487
  <xsl:apply-templates/>:
9448
9488
  </fo:inline>
9449
9489
  </xsl:otherwise>
@@ -10651,6 +10691,7 @@
10651
10691
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
10652
10692
 
10653
10693
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
10694
+
10654
10695
  <xsl:call-template name="processBibitem"/>
10655
10696
  </fo:block>
10656
10697
 
@@ -10688,6 +10729,7 @@
10688
10729
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10689
10730
  <xsl:otherwise>
10690
10731
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10732
+
10691
10733
  <fo:list-item-label end-indent="label-end()">
10692
10734
  <fo:block role="SKIP">
10693
10735
  <fo:inline role="SKIP">
@@ -12453,4 +12495,6 @@
12453
12495
  </xsl:if>
12454
12496
  </xsl:template>
12455
12497
 
12498
+ <!-- update -->
12499
+
12456
12500
  </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">
@@ -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 Ribose
3
- VERSION = "2.4.4".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-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
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-10 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