metanorma-ribose 2.4.4 → 2.4.6

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: 916fa1fbeb573a0ee41f153a6fac734fc0878259eb2ad5cb2057d29ab89bd02d
4
+ data.tar.gz: cb0d292d7aec15c189380e3cc6d858718d35d161c360d7dc9952c428ae783628
5
5
  SHA512:
6
- metadata.gz: 1575984cc44861b1cec45264eace9db1a8733a8e135ac6d06e2a7cb2b32a882e7617531b6665caf9c6dd692e72d312087d1f98f75556a979e6745f041c8236b5
7
- data.tar.gz: 673c558664981e0eca5a2965ca6cb4222a6281d94465a8e0e85eac029c26b31813188206e5a10e02dad4cdcfd7f0e20f79b61d0500f29a3e733f2122fe8394b3
6
+ metadata.gz: b83beef32eeef721533f83e9d8e069dea8dc1399fa6607e1f1fba00fd54c4b20102aff61322da990d52a2da87238c4fdf6ac8d7f592277bcd7cc50e14562cb7c
7
+ data.tar.gz: 4fe493f21b38db3f90cb667828ecf0bc4010205b877f7cfa9a8db37a9dd7f3670971f7e2d722106e854b1b2738fa45e9d14d375fbc5ab8f631dd0bbf7c46b2f2
@@ -1223,17 +1223,30 @@
1223
1223
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
1224
1224
 
1225
1225
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
1226
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
1226
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
1227
1227
  <!-- Example: <tables>
1228
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
1229
- <tbody>
1230
- <tr>
1231
- <td id="tab-symdu_1_1">
1232
- <p_len>6</p_len>
1233
- <p_len>100</p_len> for 2nd paragraph
1234
- <word_len>6</word_len>
1235
- <word_len>20</word_len>
1236
- ...
1228
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
1229
+ <column width_max="39354" width_min="39354"/>
1230
+ <column width_max="75394" width_min="75394"/>
1231
+ <column width_max="108813" width_min="108813"/>
1232
+ <tbody>
1233
+ <tr>
1234
+ <td width_max="39354" width_min="39354">
1235
+ <p_len>39354</p_len>
1236
+ <word_len>39354</word_len>
1237
+ </td>
1238
+
1239
+ OLD:
1240
+ <tables>
1241
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
1242
+ <tbody>
1243
+ <tr>
1244
+ <td id="tab-symdu_1_1">
1245
+ <p_len>6</p_len>
1246
+ <p_len>100</p_len> for 2nd paragraph
1247
+ <word_len>6</word_len>
1248
+ <word_len>20</word_len>
1249
+ ...
1237
1250
  -->
1238
1251
 
1239
1252
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -1452,6 +1465,10 @@
1452
1465
  <xsl:variable name="zero_width_space">​</xsl:variable>
1453
1466
  <xsl:variable name="hair_space"> </xsl:variable>
1454
1467
  <xsl:variable name="en_dash">–</xsl:variable>
1468
+ <xsl:variable name="em_dash">—</xsl:variable>
1469
+ <xsl:variable name="cr">&#13;</xsl:variable>
1470
+ <xsl:variable name="lf">
1471
+ </xsl:variable>
1455
1472
 
1456
1473
  <xsl:template name="getTitle">
1457
1474
  <xsl:param name="name"/>
@@ -1801,6 +1818,10 @@
1801
1818
 
1802
1819
  </xsl:attribute-set> <!-- example-name-style -->
1803
1820
 
1821
+ <xsl:template name="refine_example-name-style">
1822
+
1823
+ </xsl:template>
1824
+
1804
1825
  <xsl:attribute-set name="example-p-style">
1805
1826
 
1806
1827
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
@@ -1819,6 +1840,10 @@
1819
1840
 
1820
1841
  </xsl:attribute-set> <!-- termexample-name-style -->
1821
1842
 
1843
+ <xsl:template name="refine_termexample-name-style">
1844
+
1845
+ </xsl:template>
1846
+
1822
1847
  <!-- ========================== -->
1823
1848
  <!-- Table styles -->
1824
1849
  <!-- ========================== -->
@@ -2000,12 +2025,20 @@
2000
2025
 
2001
2026
  </xsl:attribute-set> <!-- table-fn-style -->
2002
2027
 
2028
+ <xsl:template name="refine_table-fn-style">
2029
+
2030
+ </xsl:template>
2031
+
2003
2032
  <xsl:attribute-set name="table-fn-number-style">
2004
2033
  <xsl:attribute name="font-size">80%</xsl:attribute>
2005
2034
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
2006
2035
 
2007
2036
  </xsl:attribute-set> <!-- table-fn-number-style -->
2008
2037
 
2038
+ <xsl:template name="refine_table-fn-number-style">
2039
+
2040
+ </xsl:template>
2041
+
2009
2042
  <xsl:attribute-set name="fn-container-body-style">
2010
2043
  <xsl:attribute name="text-indent">0</xsl:attribute>
2011
2044
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -3187,6 +3220,20 @@
3187
3220
  </xsl:for-each>
3188
3221
  </xsl:template>
3189
3222
 
3223
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
3224
+
3225
+ <xsl:template match="*[local-name()='table']" priority="2">
3226
+ <xsl:choose>
3227
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
3228
+ <xsl:call-template name="table"/>
3229
+ </xsl:when>
3230
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
3231
+ <xsl:otherwise>
3232
+ <xsl:call-template name="table"/>
3233
+ </xsl:otherwise>
3234
+ </xsl:choose>
3235
+ </xsl:template>
3236
+
3190
3237
  <xsl:template match="*[local-name()='table']" name="table">
3191
3238
 
3192
3239
  <xsl:variable name="table-preamble">
@@ -3196,9 +3243,11 @@
3196
3243
  <xsl:variable name="table">
3197
3244
 
3198
3245
  <xsl:variable name="simple-table">
3199
- <xsl:call-template name="getSimpleTable">
3200
- <xsl:with-param name="id" select="@id"/>
3201
- </xsl:call-template>
3246
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
3247
+ <xsl:call-template name="getSimpleTable">
3248
+ <xsl:with-param name="id" select="@id"/>
3249
+ </xsl:call-template>
3250
+ </xsl:if>
3202
3251
  </xsl:variable>
3203
3252
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
3204
3253
 
@@ -3292,9 +3341,9 @@
3292
3341
  </xsl:attribute>
3293
3342
  </xsl:for-each>
3294
3343
 
3295
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3344
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3296
3345
  <xsl:if test="$isNoteOrFnExist = 'true'">
3297
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3346
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
3298
3347
  </xsl:if>
3299
3348
 
3300
3349
  <xsl:choose>
@@ -3379,6 +3428,7 @@
3379
3428
  <!-- centered table when table name is centered (see table-name-style) -->
3380
3429
 
3381
3430
  <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
3431
+
3382
3432
  <fo:table-column column-width="proportional-column-width(1)"/>
3383
3433
  <fo:table-column column-width="{@width}"/>
3384
3434
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -3446,9 +3496,28 @@
3446
3496
 
3447
3497
  </fo:block>
3448
3498
 
3499
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3500
+ <xsl:if test="$continued = 'true'">
3501
+ <fo:block text-align="right">
3502
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3503
+ </fo:block>
3504
+ </xsl:if>
3505
+ <!-- </xsl:if> -->
3506
+
3449
3507
  </xsl:if>
3450
3508
  </xsl:template> <!-- table/name -->
3451
3509
 
3510
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
3511
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
3512
+ <xsl:choose>
3513
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
3514
+ <!-- remove CR or LF at start -->
3515
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
3516
+ </xsl:when>
3517
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
3518
+ </xsl:choose>
3519
+ </xsl:template>
3520
+
3452
3521
  <!-- SOURCE: ... -->
3453
3522
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
3454
3523
  <xsl:call-template name="termsource"/>
@@ -3859,7 +3928,7 @@
3859
3928
  <xsl:param name="colwidths"/>
3860
3929
  <xsl:param name="colgroup"/>
3861
3930
 
3862
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3931
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3863
3932
 
3864
3933
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3865
3934
 
@@ -3931,7 +4000,7 @@
3931
4000
 
3932
4001
  <xsl:apply-templates select="../*[local-name()='p']"/>
3933
4002
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3934
- <xsl:apply-templates select="../*[local-name()='note']"/>
4003
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3935
4004
  <xsl:apply-templates select="../*[local-name()='example']"/>
3936
4005
  <xsl:apply-templates select="../*[local-name()='source']"/>
3937
4006
 
@@ -3941,7 +4010,7 @@
3941
4010
 
3942
4011
  <!-- horizontal row separator -->
3943
4012
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3944
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4013
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3945
4014
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3946
4015
 
3947
4016
  <xsl:call-template name="setBordersTableArray"/>
@@ -4420,8 +4489,9 @@
4420
4489
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4421
4490
 
4422
4491
  <fo:block xsl:use-attribute-sets="table-fn-style">
4423
-
4492
+ <xsl:call-template name="refine_table-fn-style"/>
4424
4493
  <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
4494
+ <xsl:call-template name="refine_table-fn-number-style"/>
4425
4495
 
4426
4496
  <xsl:value-of select="@reference"/>
4427
4497
 
@@ -4605,7 +4675,20 @@
4605
4675
  <!-- Definition List -->
4606
4676
  <!-- ===================== -->
4607
4677
 
4608
- <xsl:template match="*[local-name()='dl']">
4678
+ <!-- for table auto-layout algorithm -->
4679
+ <xsl:template match="*[local-name()='dl']" priority="2">
4680
+ <xsl:choose>
4681
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
4682
+ <xsl:call-template name="dl"/>
4683
+ </xsl:when>
4684
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
4685
+ <xsl:otherwise>
4686
+ <xsl:call-template name="dl"/>
4687
+ </xsl:otherwise>
4688
+ </xsl:choose>
4689
+ </xsl:template>
4690
+
4691
+ <xsl:template match="*[local-name()='dl']" name="dl">
4609
4692
  <xsl:variable name="isAdded" select="@added"/>
4610
4693
  <xsl:variable name="isDeleted" select="@deleted"/>
4611
4694
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -5572,11 +5655,16 @@
5572
5655
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5573
5656
  <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5574
5657
  <xsl:variable name="text" select="."/>
5575
- <fo:inline font-size="75%" role="SKIP">
5658
+ <xsl:variable name="ratio_">
5659
+ 0.75
5660
+ </xsl:variable>
5661
+ <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
5662
+ <fo:inline font-size="{$ratio * 100}%" role="SKIP">
5576
5663
  <xsl:if test="string-length($text) &gt; 0">
5577
5664
  <xsl:variable name="smallCapsText">
5578
5665
  <xsl:call-template name="recursiveSmallCaps">
5579
5666
  <xsl:with-param name="text" select="$text"/>
5667
+ <xsl:with-param name="ratio" select="$ratio"/>
5580
5668
  </xsl:call-template>
5581
5669
  </xsl:variable>
5582
5670
  <!-- merge neighboring fo:inline -->
@@ -5613,12 +5701,13 @@
5613
5701
 
5614
5702
  <xsl:template name="recursiveSmallCaps">
5615
5703
  <xsl:param name="text"/>
5704
+ <xsl:param name="ratio"/>
5616
5705
  <xsl:variable name="char" select="substring($text,1,1)"/>
5617
5706
  <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
5618
5707
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5619
5708
  <xsl:choose>
5620
5709
  <xsl:when test="$char=$upperCase">
5621
- <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5710
+ <fo:inline font-size="{100 div $ratio}%" role="SKIP">
5622
5711
  <xsl:value-of select="$upperCase"/>
5623
5712
  </fo:inline>
5624
5713
  </xsl:when>
@@ -5629,6 +5718,7 @@
5629
5718
  <xsl:if test="string-length($text) &gt; 1">
5630
5719
  <xsl:call-template name="recursiveSmallCaps">
5631
5720
  <xsl:with-param name="text" select="substring($text,2)"/>
5721
+ <xsl:with-param name="ratio" select="$ratio"/>
5632
5722
  </xsl:call-template>
5633
5723
  </xsl:if>
5634
5724
  </xsl:template>
@@ -5665,6 +5755,9 @@
5665
5755
  <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5666
5756
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5667
5757
  </xsl:if>
5758
+ <xsl:if test="$key = 'text-indent'">
5759
+ <style name="padding-left"><xsl:value-of select="$value"/></style>
5760
+ </xsl:if>
5668
5761
  </xsl:for-each>
5669
5762
  </xsl:variable>
5670
5763
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -6537,7 +6630,13 @@
6537
6630
  <xsl:value-of select="$language_current_2"/>
6538
6631
  </xsl:when>
6539
6632
  <xsl:otherwise>
6540
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
6633
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
6634
+ <xsl:choose>
6635
+ <xsl:when test="$language_current_3 != ''">
6636
+ <xsl:value-of select="$language_current_3"/>
6637
+ </xsl:when>
6638
+ <xsl:otherwise>en</xsl:otherwise>
6639
+ </xsl:choose>
6541
6640
  </xsl:otherwise>
6542
6641
  </xsl:choose>
6543
6642
  </xsl:otherwise>
@@ -7067,6 +7166,11 @@
7067
7166
  </xsl:call-template>
7068
7167
  </xsl:template>
7069
7168
 
7169
+ <!-- command between two xref points to non-standard bibitem -->
7170
+ <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']]]">
7171
+ <xsl:value-of select="."/>
7172
+ </xsl:template>
7173
+
7070
7174
  <!-- ====== -->
7071
7175
  <!-- formula -->
7072
7176
  <!-- ====== -->
@@ -7438,7 +7542,7 @@
7438
7542
  </xsl:when>
7439
7543
  <xsl:otherwise>
7440
7544
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7441
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7545
+ <xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
7442
7546
 
7443
7547
  <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7444
7548
  <xsl:attribute name="width">
@@ -7773,6 +7877,8 @@
7773
7877
  </xsl:attribute>
7774
7878
  </xsl:template>
7775
7879
 
7880
+ <xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
7881
+
7776
7882
  <xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
7777
7883
  <xsl:copy>
7778
7884
  <xsl:apply-templates select="@*" mode="svg_update"/>
@@ -7791,7 +7897,8 @@
7791
7897
 
7792
7898
  <xsl:attribute name="width">
7793
7899
  <xsl:choose>
7794
- <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7900
+ <!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7901
+ <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
7902
  <xsl:when test="$width != ''">
7796
7903
  <xsl:value-of select="round($width)"/>
7797
7904
  </xsl:when>
@@ -7800,7 +7907,8 @@
7800
7907
  </xsl:attribute>
7801
7908
  <xsl:attribute name="height">
7802
7909
  <xsl:choose>
7803
- <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7910
+ <!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
7911
+ <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
7912
  <xsl:when test="$height != ''">
7805
7913
  <xsl:value-of select="round($height)"/>
7806
7914
  </xsl:when>
@@ -7817,7 +7925,7 @@
7817
7925
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
7818
7926
  <xsl:attribute name="width">
7819
7927
  <xsl:choose>
7820
- <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
7928
+ <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
7929
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7822
7930
  </xsl:choose>
7823
7931
  </xsl:attribute>
@@ -7828,7 +7936,7 @@
7828
7936
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
7829
7937
  <xsl:attribute name="height">
7830
7938
  <xsl:choose>
7831
- <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
7939
+ <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
7940
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
7833
7941
  </xsl:choose>
7834
7942
  </xsl:attribute>
@@ -9294,6 +9402,7 @@
9294
9402
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
9295
9403
  <xsl:if test="normalize-space() != ''">
9296
9404
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9405
+ <xsl:call-template name="refine_termexample-name-style"/>
9297
9406
  <xsl:apply-templates/>:
9298
9407
  </fo:inline>
9299
9408
  </xsl:if>
@@ -9444,6 +9553,7 @@
9444
9553
  </xsl:when>
9445
9554
  <xsl:otherwise>
9446
9555
  <fo:inline xsl:use-attribute-sets="example-name-style">
9556
+ <xsl:call-template name="refine_example-name-style"/>
9447
9557
  <xsl:apply-templates/>:
9448
9558
  </fo:inline>
9449
9559
  </xsl:otherwise>
@@ -10651,6 +10761,7 @@
10651
10761
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
10652
10762
 
10653
10763
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
10764
+
10654
10765
  <xsl:call-template name="processBibitem"/>
10655
10766
  </fo:block>
10656
10767
 
@@ -10688,6 +10799,7 @@
10688
10799
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10689
10800
  <xsl:otherwise>
10690
10801
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10802
+
10691
10803
  <fo:list-item-label end-indent="label-end()">
10692
10804
  <fo:block role="SKIP">
10693
10805
  <fo:inline role="SKIP">
@@ -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.6".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.6
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-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic