metanorma-ribose 2.4.5 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +91 -23
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 916fa1fbeb573a0ee41f153a6fac734fc0878259eb2ad5cb2057d29ab89bd02d
|
4
|
+
data.tar.gz: cb0d292d7aec15c189380e3cc6d858718d35d161c360d7dc9952c428ae783628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
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)"/> -->
|
@@ -1453,6 +1466,9 @@
|
|
1453
1466
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1454
1467
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1455
1468
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1469
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1470
|
+
<xsl:variable name="lf">
|
1471
|
+
</xsl:variable>
|
1456
1472
|
|
1457
1473
|
<xsl:template name="getTitle">
|
1458
1474
|
<xsl:param name="name"/>
|
@@ -3204,6 +3220,20 @@
|
|
3204
3220
|
</xsl:for-each>
|
3205
3221
|
</xsl:template>
|
3206
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
|
+
|
3207
3237
|
<xsl:template match="*[local-name()='table']" name="table">
|
3208
3238
|
|
3209
3239
|
<xsl:variable name="table-preamble">
|
@@ -3213,9 +3243,11 @@
|
|
3213
3243
|
<xsl:variable name="table">
|
3214
3244
|
|
3215
3245
|
<xsl:variable name="simple-table">
|
3216
|
-
<xsl:
|
3217
|
-
<xsl:
|
3218
|
-
|
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>
|
3219
3251
|
</xsl:variable>
|
3220
3252
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
3221
3253
|
|
@@ -3309,9 +3341,9 @@
|
|
3309
3341
|
</xsl:attribute>
|
3310
3342
|
</xsl:for-each>
|
3311
3343
|
|
3312
|
-
<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']"/>
|
3313
3345
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3314
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
3346
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3315
3347
|
</xsl:if>
|
3316
3348
|
|
3317
3349
|
<xsl:choose>
|
@@ -3464,9 +3496,28 @@
|
|
3464
3496
|
|
3465
3497
|
</fo:block>
|
3466
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
|
+
|
3467
3507
|
</xsl:if>
|
3468
3508
|
</xsl:template> <!-- table/name -->
|
3469
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(.),'^( | | )', '')"/>
|
3516
|
+
</xsl:when>
|
3517
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3518
|
+
</xsl:choose>
|
3519
|
+
</xsl:template>
|
3520
|
+
|
3470
3521
|
<!-- SOURCE: ... -->
|
3471
3522
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3472
3523
|
<xsl:call-template name="termsource"/>
|
@@ -3877,7 +3928,7 @@
|
|
3877
3928
|
<xsl:param name="colwidths"/>
|
3878
3929
|
<xsl:param name="colgroup"/>
|
3879
3930
|
|
3880
|
-
<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']"/>
|
3881
3932
|
|
3882
3933
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3883
3934
|
|
@@ -3949,7 +4000,7 @@
|
|
3949
4000
|
|
3950
4001
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3951
4002
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3952
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4003
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
3953
4004
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3954
4005
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3955
4006
|
|
@@ -3959,7 +4010,7 @@
|
|
3959
4010
|
|
3960
4011
|
<!-- horizontal row separator -->
|
3961
4012
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3962
|
-
<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) != ''">
|
3963
4014
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3964
4015
|
|
3965
4016
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4624,7 +4675,20 @@
|
|
4624
4675
|
<!-- Definition List -->
|
4625
4676
|
<!-- ===================== -->
|
4626
4677
|
|
4627
|
-
|
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">
|
4628
4692
|
<xsl:variable name="isAdded" select="@added"/>
|
4629
4693
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4630
4694
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6566,7 +6630,13 @@
|
|
6566
6630
|
<xsl:value-of select="$language_current_2"/>
|
6567
6631
|
</xsl:when>
|
6568
6632
|
<xsl:otherwise>
|
6569
|
-
<xsl:
|
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>
|
6570
6640
|
</xsl:otherwise>
|
6571
6641
|
</xsl:choose>
|
6572
6642
|
</xsl:otherwise>
|
@@ -7472,7 +7542,7 @@
|
|
7472
7542
|
</xsl:when>
|
7473
7543
|
<xsl:otherwise>
|
7474
7544
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7475
|
-
<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'])">
|
7476
7546
|
|
7477
7547
|
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7478
7548
|
<xsl:attribute name="width">
|
@@ -12495,6 +12565,4 @@
|
|
12495
12565
|
</xsl:if>
|
12496
12566
|
</xsl:template>
|
12497
12567
|
|
12498
|
-
<!-- update -->
|
12499
|
-
|
12500
12568
|
</xsl:stylesheet>
|
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
|
+
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-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|