metanorma-nist 1.2.10 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -0
- data/lib/asciidoctor/nist/isodoc.rng +26 -3
- data/lib/isodoc/nist/nist.cswp.xsl +18 -2
- data/lib/isodoc/nist/nist.sp.xsl +18 -2
- data/lib/isodoc/nist/xref.rb +11 -5
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.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: a863e95b5d96fb7716f7d124404590f3bc1ed01eb6def1a29270d20dba88946c
|
4
|
+
data.tar.gz: 0eab5f2b4444a27583679a1b36ecb77054d2d6983f0e2fc24ba50feb0bef76b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15fbad057288628de2ddb1807caae07799d66757312ea6ff4de5edb548b80476dea3286cc896f435b84169c5a457b9b9c98d130166ab04084b07f13c883d32dc
|
7
|
+
data.tar.gz: 90430efbb2d72e3eb967d19dd894923c7424a22c5a133b6bbd51484695f449594cefefef936814f6631eaa6d640ab87d66dd547cea74d2b787e663c411441fb7
|
data/.github/workflows/rake.yml
CHANGED
@@ -253,6 +253,9 @@
|
|
253
253
|
<data type="boolean"/>
|
254
254
|
</attribute>
|
255
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
256
259
|
<optional>
|
257
260
|
<ref name="colgroup"/>
|
258
261
|
</optional>
|
@@ -836,6 +839,9 @@
|
|
836
839
|
<data type="boolean"/>
|
837
840
|
</attribute>
|
838
841
|
</optional>
|
842
|
+
<optional>
|
843
|
+
<attribute name="number"/>
|
844
|
+
</optional>
|
839
845
|
<optional>
|
840
846
|
<attribute name="obligation">
|
841
847
|
<choice>
|
@@ -891,9 +897,11 @@
|
|
891
897
|
<element name="code">
|
892
898
|
<text/>
|
893
899
|
</element>
|
894
|
-
<
|
895
|
-
<text
|
896
|
-
|
900
|
+
<optional>
|
901
|
+
<element name="text">
|
902
|
+
<text/>
|
903
|
+
</element>
|
904
|
+
</optional>
|
897
905
|
</element>
|
898
906
|
</define>
|
899
907
|
<define name="standard-document">
|
@@ -1063,6 +1071,9 @@
|
|
1063
1071
|
</choice>
|
1064
1072
|
</attribute>
|
1065
1073
|
</optional>
|
1074
|
+
<optional>
|
1075
|
+
<attribute name="number"/>
|
1076
|
+
</optional>
|
1066
1077
|
<optional>
|
1067
1078
|
<attribute name="type"/>
|
1068
1079
|
</optional>
|
@@ -1116,6 +1127,9 @@
|
|
1116
1127
|
<optional>
|
1117
1128
|
<attribute name="type"/>
|
1118
1129
|
</optional>
|
1130
|
+
<optional>
|
1131
|
+
<attribute name="number"/>
|
1132
|
+
</optional>
|
1119
1133
|
<optional>
|
1120
1134
|
<ref name="section-title"/>
|
1121
1135
|
</optional>
|
@@ -1218,6 +1232,9 @@
|
|
1218
1232
|
<optional>
|
1219
1233
|
<attribute name="type"/>
|
1220
1234
|
</optional>
|
1235
|
+
<optional>
|
1236
|
+
<attribute name="number"/>
|
1237
|
+
</optional>
|
1221
1238
|
<optional>
|
1222
1239
|
<attribute name="obligation">
|
1223
1240
|
<choice>
|
@@ -1546,6 +1563,7 @@
|
|
1546
1563
|
<value>add</value>
|
1547
1564
|
<value>modify</value>
|
1548
1565
|
<value>delete</value>
|
1566
|
+
<value>replace</value>
|
1549
1567
|
</choice>
|
1550
1568
|
</attribute>
|
1551
1569
|
<optional>
|
@@ -1576,6 +1594,11 @@
|
|
1576
1594
|
</optional>
|
1577
1595
|
<optional>
|
1578
1596
|
<element name="newcontent">
|
1597
|
+
<optional>
|
1598
|
+
<attribute name="id">
|
1599
|
+
<data type="ID"/>
|
1600
|
+
</attribute>
|
1601
|
+
</optional>
|
1579
1602
|
<zeroOrMore>
|
1580
1603
|
<ref name="BasicBlock"/>
|
1581
1604
|
</zeroOrMore>
|
@@ -1636,7 +1636,12 @@
|
|
1636
1636
|
|
1637
1637
|
<xsl:variable name="table_attributes">
|
1638
1638
|
<attribute name="table-layout">fixed</attribute>
|
1639
|
-
<attribute name="width">
|
1639
|
+
<attribute name="width">
|
1640
|
+
<xsl:choose>
|
1641
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
1642
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
1643
|
+
</xsl:choose>
|
1644
|
+
</attribute>
|
1640
1645
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1641
1646
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1642
1647
|
|
@@ -2830,6 +2835,10 @@
|
|
2830
2835
|
</xsl:if>
|
2831
2836
|
<xsl:apply-templates/>
|
2832
2837
|
</fo:inline>
|
2838
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2839
|
+
<fo:inline text-decoration="underline">
|
2840
|
+
<xsl:apply-templates/>
|
2841
|
+
</fo:inline>
|
2833
2842
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2834
2843
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2835
2844
|
<xsl:apply-templates/>
|
@@ -4400,6 +4409,8 @@
|
|
4400
4409
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4401
4410
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4402
4411
|
<xsl:value-of select="substring(.,1,1)"/>
|
4412
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4413
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4403
4414
|
</xsl:template><xsl:template name="convertDate">
|
4404
4415
|
<xsl:param name="date"/>
|
4405
4416
|
<xsl:param name="format" select="'short'"/>
|
@@ -4682,6 +4693,11 @@
|
|
4682
4693
|
<xsl:call-template name="getLang"/>
|
4683
4694
|
</xsl:variable>
|
4684
4695
|
|
4685
|
-
<xsl:
|
4696
|
+
<xsl:choose>
|
4697
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4698
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4699
|
+
</xsl:when>
|
4700
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4701
|
+
</xsl:choose>
|
4686
4702
|
|
4687
4703
|
</xsl:template></xsl:stylesheet>
|
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -2684,7 +2684,12 @@
|
|
2684
2684
|
|
2685
2685
|
<xsl:variable name="table_attributes">
|
2686
2686
|
<attribute name="table-layout">fixed</attribute>
|
2687
|
-
<attribute name="width">
|
2687
|
+
<attribute name="width">
|
2688
|
+
<xsl:choose>
|
2689
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
2690
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
2691
|
+
</xsl:choose>
|
2692
|
+
</attribute>
|
2688
2693
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2689
2694
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2690
2695
|
|
@@ -3878,6 +3883,10 @@
|
|
3878
3883
|
</xsl:if>
|
3879
3884
|
<xsl:apply-templates/>
|
3880
3885
|
</fo:inline>
|
3886
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
3887
|
+
<fo:inline text-decoration="underline">
|
3888
|
+
<xsl:apply-templates/>
|
3889
|
+
</fo:inline>
|
3881
3890
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3882
3891
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3883
3892
|
<xsl:apply-templates/>
|
@@ -5473,6 +5482,8 @@
|
|
5473
5482
|
<xsl:value-of select="translate(.,'. ','')"/>
|
5474
5483
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
5475
5484
|
<xsl:value-of select="substring(.,1,1)"/>
|
5485
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5486
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5476
5487
|
</xsl:template><xsl:template name="convertDate">
|
5477
5488
|
<xsl:param name="date"/>
|
5478
5489
|
<xsl:param name="format" select="'short'"/>
|
@@ -5755,6 +5766,11 @@
|
|
5755
5766
|
<xsl:call-template name="getLang"/>
|
5756
5767
|
</xsl:variable>
|
5757
5768
|
|
5758
|
-
<xsl:
|
5769
|
+
<xsl:choose>
|
5770
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5771
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5772
|
+
</xsl:when>
|
5773
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5774
|
+
</xsl:choose>
|
5759
5775
|
|
5760
5776
|
</xsl:template></xsl:stylesheet>
|
data/lib/isodoc/nist/xref.rb
CHANGED
@@ -4,6 +4,9 @@ require "fileutils"
|
|
4
4
|
|
5
5
|
module IsoDoc
|
6
6
|
module NIST
|
7
|
+
class Counter < IsoDoc::XrefGen::Counter
|
8
|
+
end
|
9
|
+
|
7
10
|
class Xref < IsoDoc::Xref
|
8
11
|
SECTIONS_XPATH =
|
9
12
|
"//foreword | //introduction | //reviewnote | //executivesummary | //annex | "\
|
@@ -17,15 +20,18 @@ module IsoDoc
|
|
17
20
|
@in_execsummary = true
|
18
21
|
hierarchical_asset_names(d.xpath("//xmlns:executivesummary"), "ES")
|
19
22
|
@in_execsummary = false
|
20
|
-
|
23
|
+
c = Counter.new
|
24
|
+
clause_names(d, c)
|
21
25
|
middle_section_asset_names(d)
|
22
26
|
termnote_anchor_names(d)
|
23
27
|
termexample_anchor_names(d)
|
24
28
|
end
|
25
29
|
|
26
30
|
def back_anchor_names(docxml)
|
27
|
-
|
28
|
-
|
31
|
+
i = Counter.new("@")
|
32
|
+
docxml.xpath(ns("//annex")).each do |c|
|
33
|
+
i.increment(c)
|
34
|
+
annex_names(c, i.print)
|
29
35
|
end
|
30
36
|
docxml.xpath(ns("//bibliography/clause | "\
|
31
37
|
"//bibliography/references")).each do |b|
|
@@ -44,8 +50,8 @@ module IsoDoc
|
|
44
50
|
|
45
51
|
def clause_names(docxml, sect_num)
|
46
52
|
q = "//xmlns:sections/child::*"
|
47
|
-
docxml.xpath(q).
|
48
|
-
section_names(c,
|
53
|
+
docxml.xpath(q).each do |c|
|
54
|
+
section_names(c, sect_num, 1)
|
49
55
|
end
|
50
56
|
end
|
51
57
|
|
data/metanorma-nist.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
32
32
|
|
33
33
|
spec.add_dependency "metanorma-standoc", "~> 1.7.0"
|
34
|
-
spec.add_dependency "isodoc", "~> 1.4.
|
34
|
+
spec.add_dependency "isodoc", "~> 1.4.2"
|
35
35
|
#spec.add_dependency "relaton-nist", "~> 0.3.0"
|
36
36
|
|
37
37
|
spec.add_development_dependency "byebug", "~> 9.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.4.
|
103
|
+
version: 1.4.2
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.4.
|
110
|
+
version: 1.4.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: byebug
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|