metanorma-ribose 2.2.6 → 2.2.7
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 +81 -13
- data/lib/metanorma/ribose/isodoc.rng +29 -7
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7165b810d75c75ae9265cd7536229c31effbf384eca0d8df7bc3886b3104068d
|
4
|
+
data.tar.gz: 596450c4cbf2a31dd4294950e86a6762d20f59a26a8a289d8a84ee2b703ccf1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 467db5e091b769e9e0fe6b285e03dd2cdb504420dd2f2f7d5f70bd456131035339d54617bb4e692986af9f56067e3e5c51d40c38523db0c4b79abebd8478d331
|
7
|
+
data.tar.gz: 8dcd95606761269f05d2f4cf7eea3a531374fa389b52e55904b682824a56f4be6b7d4861858d1155dace7d16d6791bb76b19ce729e324077e4c64988c0171361
|
@@ -1876,6 +1876,11 @@
|
|
1876
1876
|
<!-- ========================== -->
|
1877
1877
|
<!-- Definition's list styles -->
|
1878
1878
|
<!-- ========================== -->
|
1879
|
+
|
1880
|
+
<xsl:attribute-set name="dl-block-style">
|
1881
|
+
|
1882
|
+
</xsl:attribute-set>
|
1883
|
+
|
1879
1884
|
<xsl:attribute-set name="dt-row-style">
|
1880
1885
|
|
1881
1886
|
<xsl:attribute name="min-height">7mm</xsl:attribute>
|
@@ -1883,6 +1888,7 @@
|
|
1883
1888
|
</xsl:attribute-set>
|
1884
1889
|
|
1885
1890
|
<xsl:attribute-set name="dt-cell-style">
|
1891
|
+
|
1886
1892
|
</xsl:attribute-set>
|
1887
1893
|
|
1888
1894
|
<xsl:attribute-set name="dt-block-style">
|
@@ -1904,6 +1910,7 @@
|
|
1904
1910
|
|
1905
1911
|
<xsl:attribute-set name="dd-cell-style">
|
1906
1912
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
1913
|
+
|
1907
1914
|
</xsl:attribute-set>
|
1908
1915
|
|
1909
1916
|
<!-- ========================== -->
|
@@ -2058,6 +2065,10 @@
|
|
2058
2065
|
|
2059
2066
|
</xsl:attribute-set>
|
2060
2067
|
|
2068
|
+
<xsl:attribute-set name="figure-source-style">
|
2069
|
+
|
2070
|
+
</xsl:attribute-set>
|
2071
|
+
|
2061
2072
|
<!-- Formula's styles -->
|
2062
2073
|
<xsl:attribute-set name="formula-style">
|
2063
2074
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -2626,7 +2637,7 @@
|
|
2626
2637
|
|
2627
2638
|
<xsl:template name="processTables_Contents">
|
2628
2639
|
<tables>
|
2629
|
-
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2640
|
+
<xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2630
2641
|
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
2631
2642
|
<xsl:copy-of select="*[local-name() = 'name']"/>
|
2632
2643
|
</table>
|
@@ -2973,7 +2984,7 @@
|
|
2973
2984
|
</xsl:attribute>
|
2974
2985
|
</xsl:for-each>
|
2975
2986
|
|
2976
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2987
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2977
2988
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2978
2989
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2979
2990
|
</xsl:if>
|
@@ -3017,7 +3028,7 @@
|
|
3017
3028
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3018
3029
|
</xsl:when>
|
3019
3030
|
<xsl:otherwise>
|
3020
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note and dl which render separaterely -->
|
3031
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3021
3032
|
</xsl:otherwise>
|
3022
3033
|
</xsl:choose>
|
3023
3034
|
|
@@ -3121,6 +3132,11 @@
|
|
3121
3132
|
</xsl:if>
|
3122
3133
|
</xsl:template> <!-- table/name -->
|
3123
3134
|
|
3135
|
+
<!-- SOURCE: ... -->
|
3136
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3137
|
+
<xsl:call-template name="termsource"/>
|
3138
|
+
</xsl:template>
|
3139
|
+
|
3124
3140
|
<xsl:template name="calculate-columns-numbers">
|
3125
3141
|
<xsl:param name="table-row"/>
|
3126
3142
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -3477,7 +3493,7 @@
|
|
3477
3493
|
</fo:table-header>
|
3478
3494
|
</xsl:template> <!-- thead -->
|
3479
3495
|
|
3480
|
-
<!-- template is using for iso, jcgm, bsi only -->
|
3496
|
+
<!-- template is using for iec, iso, jcgm, bsi only -->
|
3481
3497
|
<xsl:template name="table-header-title">
|
3482
3498
|
<xsl:param name="cols-count"/>
|
3483
3499
|
<!-- row for title -->
|
@@ -3520,7 +3536,7 @@
|
|
3520
3536
|
<xsl:param name="colwidths"/>
|
3521
3537
|
<xsl:param name="colgroup"/>
|
3522
3538
|
|
3523
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3539
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3524
3540
|
|
3525
3541
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3526
3542
|
|
@@ -3590,6 +3606,7 @@
|
|
3590
3606
|
|
3591
3607
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3592
3608
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3609
|
+
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3593
3610
|
|
3594
3611
|
<xsl:variable name="isDisplayRowSeparator">
|
3595
3612
|
|
@@ -4227,7 +4244,7 @@
|
|
4227
4244
|
<xsl:variable name="isAdded" select="@added"/>
|
4228
4245
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4229
4246
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4230
|
-
<fo:block-container>
|
4247
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
4231
4248
|
|
4232
4249
|
<xsl:call-template name="setBlockSpanAll"/>
|
4233
4250
|
|
@@ -4235,6 +4252,18 @@
|
|
4235
4252
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4236
4253
|
</xsl:if>
|
4237
4254
|
|
4255
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']">
|
4256
|
+
<!-- set font-size as sourcecode font-size -->
|
4257
|
+
<xsl:variable name="sourcecode_attributes">
|
4258
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
4259
|
+
</xsl:variable>
|
4260
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@font-size">
|
4261
|
+
<xsl:attribute name="{local-name()}">
|
4262
|
+
<xsl:value-of select="."/>
|
4263
|
+
</xsl:attribute>
|
4264
|
+
</xsl:for-each>
|
4265
|
+
</xsl:if>
|
4266
|
+
|
4238
4267
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4239
4268
|
<xsl:attribute name="margin-left">
|
4240
4269
|
<xsl:choose>
|
@@ -4671,6 +4700,7 @@
|
|
4671
4700
|
<xsl:param name="split_keep-within-line"/>
|
4672
4701
|
|
4673
4702
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
4703
|
+
|
4674
4704
|
<xsl:call-template name="insert_dt_cell">
|
4675
4705
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
4676
4706
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -4692,6 +4722,7 @@
|
|
4692
4722
|
<!-- border is mandatory, to calculate real width -->
|
4693
4723
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4694
4724
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4725
|
+
|
4695
4726
|
</xsl:if>
|
4696
4727
|
|
4697
4728
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
@@ -5144,6 +5175,7 @@
|
|
5144
5175
|
<fo:inline>
|
5145
5176
|
<xsl:for-each select="$styles/style">
|
5146
5177
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
5178
|
+
|
5147
5179
|
</xsl:for-each>
|
5148
5180
|
<xsl:apply-templates/>
|
5149
5181
|
</fo:inline>
|
@@ -6657,6 +6689,13 @@
|
|
6657
6689
|
</fo:block>
|
6658
6690
|
</xsl:template>
|
6659
6691
|
|
6692
|
+
<!-- SOURCE: ... -->
|
6693
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
6694
|
+
|
6695
|
+
<xsl:call-template name="termsource"/>
|
6696
|
+
|
6697
|
+
</xsl:template>
|
6698
|
+
|
6660
6699
|
<xsl:template match="*[local-name() = 'image']">
|
6661
6700
|
<xsl:variable name="isAdded" select="../@added"/>
|
6662
6701
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
@@ -7807,9 +7846,11 @@
|
|
7807
7846
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7808
7847
|
</xsl:if>
|
7809
7848
|
|
7810
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7849
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name' or local-name() = 'dl')]"/>
|
7811
7850
|
</fo:block>
|
7812
7851
|
|
7852
|
+
<xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
|
7853
|
+
|
7813
7854
|
</fo:block-container>
|
7814
7855
|
</fo:block-container>
|
7815
7856
|
</xsl:otherwise>
|
@@ -7839,11 +7880,22 @@
|
|
7839
7880
|
<!-- add sourcecode highlighting -->
|
7840
7881
|
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
7841
7882
|
<xsl:variable name="class" select="@class"/>
|
7883
|
+
|
7884
|
+
<!-- Example: <1> -->
|
7885
|
+
<xsl:variable name="is_callout">
|
7886
|
+
<xsl:if test="parent::*[local-name() = 'dt']">
|
7887
|
+
<xsl:variable name="dt_id" select="../@id"/>
|
7888
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']//*[local-name() = 'callout'][@target = $dt_id]">true</xsl:if>
|
7889
|
+
</xsl:if>
|
7890
|
+
</xsl:variable>
|
7891
|
+
|
7842
7892
|
<xsl:choose>
|
7843
7893
|
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
7844
7894
|
<fo:inline>
|
7845
7895
|
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
7896
|
+
<xsl:if test="$is_callout = 'true'"><</xsl:if>
|
7846
7897
|
<xsl:apply-templates/>
|
7898
|
+
<xsl:if test="$is_callout = 'true'">></xsl:if>
|
7847
7899
|
</fo:inline>
|
7848
7900
|
</xsl:when>
|
7849
7901
|
<xsl:otherwise>
|
@@ -8267,6 +8319,10 @@
|
|
8267
8319
|
</fo:block>
|
8268
8320
|
</xsl:template>
|
8269
8321
|
|
8322
|
+
<xsl:template match="*[local-name() = 'div']">
|
8323
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
8324
|
+
</xsl:template>
|
8325
|
+
|
8270
8326
|
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
|
8271
8327
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
8272
8328
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
@@ -8966,13 +9022,8 @@
|
|
8966
9022
|
</xsl:template>
|
8967
9023
|
|
8968
9024
|
<xsl:template match="*[local-name() = 'deprecates']">
|
8969
|
-
<xsl:variable name="title-deprecated">
|
8970
|
-
<xsl:call-template name="getLocalizedString">
|
8971
|
-
<xsl:with-param name="key">deprecated</xsl:with-param>
|
8972
|
-
</xsl:call-template>
|
8973
|
-
</xsl:variable>
|
8974
9025
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
8975
|
-
<xsl:
|
9026
|
+
<xsl:apply-templates/>
|
8976
9027
|
</fo:block>
|
8977
9028
|
</xsl:template>
|
8978
9029
|
|
@@ -10193,6 +10244,23 @@
|
|
10193
10244
|
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step1">
|
10194
10245
|
<xsl:copy-of select="."/>
|
10195
10246
|
</xsl:template>
|
10247
|
+
|
10248
|
+
<!-- add @id, redundant for table auto-layout algorithm -->
|
10249
|
+
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
10250
|
+
<xsl:copy>
|
10251
|
+
<xsl:copy-of select="@*"/>
|
10252
|
+
<xsl:call-template name="add_id"/>
|
10253
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
10254
|
+
</xsl:copy>
|
10255
|
+
</xsl:template>
|
10256
|
+
|
10257
|
+
<xsl:template name="add_id">
|
10258
|
+
<xsl:if test="not(@id)">
|
10259
|
+
<!-- add @id - first element with @id plus '_element_name' -->
|
10260
|
+
<xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
10261
|
+
</xsl:if>
|
10262
|
+
</xsl:template>
|
10263
|
+
|
10196
10264
|
<!-- =========================================================================== -->
|
10197
10265
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
10198
10266
|
<!-- =========================================================================== -->
|
@@ -382,6 +382,9 @@
|
|
382
382
|
<optional>
|
383
383
|
<ref name="dl"/>
|
384
384
|
</optional>
|
385
|
+
<optional>
|
386
|
+
<ref name="source"/>
|
387
|
+
</optional>
|
385
388
|
</element>
|
386
389
|
</define>
|
387
390
|
<define name="figure">
|
@@ -404,9 +407,6 @@
|
|
404
407
|
<attribute name="class"/>
|
405
408
|
</optional>
|
406
409
|
<ref name="BlockAttributes"/>
|
407
|
-
<optional>
|
408
|
-
<ref name="source"/>
|
409
|
-
</optional>
|
410
410
|
<optional>
|
411
411
|
<ref name="tname"/>
|
412
412
|
</optional>
|
@@ -431,6 +431,20 @@
|
|
431
431
|
<zeroOrMore>
|
432
432
|
<ref name="note"/>
|
433
433
|
</zeroOrMore>
|
434
|
+
<optional>
|
435
|
+
<ref name="source"/>
|
436
|
+
</optional>
|
437
|
+
</element>
|
438
|
+
</define>
|
439
|
+
<define name="source">
|
440
|
+
<element name="source">
|
441
|
+
<attribute name="status">
|
442
|
+
<ref name="SourceStatusType"/>
|
443
|
+
</attribute>
|
444
|
+
<ref name="origin"/>
|
445
|
+
<optional>
|
446
|
+
<ref name="modification"/>
|
447
|
+
</optional>
|
434
448
|
</element>
|
435
449
|
</define>
|
436
450
|
<define name="sourcecode">
|
@@ -2099,10 +2113,7 @@
|
|
2099
2113
|
<define name="termsource">
|
2100
2114
|
<element name="termsource">
|
2101
2115
|
<attribute name="status">
|
2102
|
-
<
|
2103
|
-
<value>identical</value>
|
2104
|
-
<value>modified</value>
|
2105
|
-
</choice>
|
2116
|
+
<ref name="SourceStatusType"/>
|
2106
2117
|
</attribute>
|
2107
2118
|
<attribute name="type">
|
2108
2119
|
<choice>
|
@@ -2116,6 +2127,17 @@
|
|
2116
2127
|
</optional>
|
2117
2128
|
</element>
|
2118
2129
|
</define>
|
2130
|
+
<define name="SourceStatusType">
|
2131
|
+
<choice>
|
2132
|
+
<value>identical</value>
|
2133
|
+
<value>modified</value>
|
2134
|
+
<value>restyled</value>
|
2135
|
+
<value>context-added</value>
|
2136
|
+
<value>generalisation</value>
|
2137
|
+
<value>specialisation</value>
|
2138
|
+
<value>unspecified</value>
|
2139
|
+
</choice>
|
2140
|
+
</define>
|
2119
2141
|
<define name="origin">
|
2120
2142
|
<element name="origin">
|
2121
2143
|
<choice>
|
data/metanorma-ribose.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 2.4.
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.4.1"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.4.
|
19
|
+
version: 2.4.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.4.
|
26
|
+
version: 2.4.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|