metanorma-nist 1.2.11 → 1.2.16
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 +9 -32
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -2
- data/README.adoc +3 -0
- data/lib/asciidoctor/nist/basicdoc.rng +5 -3
- data/lib/asciidoctor/nist/biblio.rng +4 -6
- data/lib/asciidoctor/nist/boilerplate.rb +2 -2
- data/lib/asciidoctor/nist/cleanup.rb +3 -2
- data/lib/asciidoctor/nist/converter.rb +4 -2
- data/lib/asciidoctor/nist/front.rb +1 -1
- data/lib/asciidoctor/nist/isodoc.rng +108 -2
- data/lib/asciidoctor/nist/nist.rng +6 -0
- data/lib/asciidoctor/nist/nist_intro.xml +9 -9
- data/lib/asciidoctor/nist/nist_intro_cswp.xml +9 -9
- data/lib/isodoc/nist/html/html_nist_titlepage.html +5 -3
- data/lib/isodoc/nist/html/word_nist_titlepage.html +8 -8
- data/lib/isodoc/nist/html/word_nist_titlepage_cswp.html +2 -0
- data/lib/isodoc/nist/html_convert.rb +6 -8
- data/lib/isodoc/nist/nist.csts.xsl +5009 -0
- data/lib/isodoc/nist/nist.cswp.xsl +607 -301
- data/lib/isodoc/nist/nist.sp.xsl +607 -259
- data/lib/isodoc/nist/pdf_convert.rb +5 -1
- data/lib/isodoc/nist/word_convert.rb +2 -4
- data/lib/metanorma/nist/processor.rb +0 -2
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +4 -4
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4580e1420646d3ff63309546c46de0031750698c6cf68930dd67a360f0201484
|
4
|
+
data.tar.gz: 859aeab56c957b83de78147e3c721a579ae6b65a2d10f69f62ebfa653f338a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcb49ab1eab50871f69e6a5b824235a509dce74c48796555843daf636ad5177fa1b475b9f8a972494ac2656df209f737c91c9b549db01feb1b3429f4fadb46c4
|
7
|
+
data.tar.gz: 2120dbc9485b036496155fcc93275e4ae95f35f11b2f29f21c530fae9b7944e643b3aac4c329263796cae6bf52da01dc5565719fa751b5a8bcd9c8a8f497bed5
|
data/.github/workflows/rake.yml
CHANGED
@@ -4,7 +4,7 @@ name: rake
|
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
|
-
branches: [ master, main
|
7
|
+
branches: [ master, main ]
|
8
8
|
tags: [ v* ]
|
9
9
|
pull_request:
|
10
10
|
|
@@ -16,50 +16,27 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
22
|
include:
|
23
|
-
- ruby: '
|
23
|
+
- ruby: '3.0'
|
24
24
|
os: 'ubuntu-latest'
|
25
25
|
experimental: true
|
26
|
-
- ruby: '
|
26
|
+
- ruby: '3.0'
|
27
27
|
os: 'windows-latest'
|
28
28
|
experimental: true
|
29
|
-
- ruby: '
|
29
|
+
- ruby: '3.0'
|
30
30
|
os: 'macos-latest'
|
31
31
|
experimental: true
|
32
32
|
steps:
|
33
|
-
- uses: actions/checkout@
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
with:
|
35
|
+
submodules: true
|
34
36
|
|
35
37
|
- uses: ruby/setup-ruby@v1
|
36
38
|
with:
|
37
39
|
ruby-version: ${{ matrix.ruby }}
|
38
|
-
|
39
|
-
- if: matrix.os == 'macos-latest'
|
40
|
-
run: brew install autoconf automake libtool
|
41
|
-
|
42
|
-
- uses: actions/cache@v2
|
43
|
-
with:
|
44
|
-
path: vendor/bundle
|
45
|
-
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
46
|
-
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
47
|
-
|
48
|
-
- run: bundle config set path 'vendor/bundle'
|
49
|
-
|
50
|
-
- run: bundle install --jobs 4 --retry 3
|
40
|
+
bundler-cache: true
|
51
41
|
|
52
42
|
- run: bundle exec rake
|
53
|
-
|
54
|
-
tests-passed:
|
55
|
-
needs: rake
|
56
|
-
runs-on: ubuntu-latest
|
57
|
-
steps:
|
58
|
-
- name: Trigger tests passed event
|
59
|
-
uses: Sibz/github-status-action@v1
|
60
|
-
with:
|
61
|
-
authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
62
|
-
context: 'tests-passed-successfully'
|
63
|
-
description: 'Tests passed successfully'
|
64
|
-
state: 'success'
|
65
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.rubocop-https--*
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# This project follows the Ribose OSS style guide.
|
2
2
|
# https://github.com/riboseinc/oss-guides
|
3
3
|
# All project-specific additions and overrides should be specified in this file.
|
4
|
-
|
5
4
|
inherit_from:
|
6
5
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
|
+
|
7
|
+
# local repo-specific modifications
|
8
|
+
|
7
9
|
AllCops:
|
8
|
-
|
10
|
+
DisplayCopNames: false
|
11
|
+
StyleGuideCopsOnly: false
|
12
|
+
TargetRubyVersion: 2.4
|
9
13
|
Rails:
|
10
14
|
Enabled: true
|
data/README.adoc
CHANGED
@@ -660,6 +660,9 @@ which will be converted to the tag `nistvariable` in Metanorma XML:
|
|
660
660
|
----
|
661
661
|
---
|
662
662
|
|
663
|
+
In the rest of Metanorma, `{{{ ... }}}` is used to introduce AsciiDoc markup into sourcecode.
|
664
|
+
In the NIST flavour, this is done through `{{{{ ... }}}}`
|
665
|
+
|
663
666
|
=== Errata
|
664
667
|
|
665
668
|
Errata are marked up as an Asciidoctor table with role attribute `[.errata]`.
|
@@ -729,9 +729,11 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<
|
733
|
-
<
|
734
|
-
|
732
|
+
<optional>
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
735
737
|
<element name="primary">
|
736
738
|
<oneOrMore>
|
737
739
|
<ref name="PureTextElement"/>
|
@@ -124,7 +124,7 @@
|
|
124
124
|
<value>application/tei+xml</value>
|
125
125
|
<value>text/x-asciidoc</value>
|
126
126
|
<value>text/markdown</value>
|
127
|
-
<value>application/x-
|
127
|
+
<value>application/x-metanorma+xml</value>
|
128
128
|
<text/>
|
129
129
|
</choice>
|
130
130
|
</attribute>
|
@@ -452,6 +452,7 @@
|
|
452
452
|
<attribute name="type">
|
453
453
|
<choice>
|
454
454
|
<value>isni</value>
|
455
|
+
<value>orcid</value>
|
455
456
|
<value>uri</value>
|
456
457
|
</choice>
|
457
458
|
</attribute>
|
@@ -461,10 +462,7 @@
|
|
461
462
|
<define name="org-identifier">
|
462
463
|
<element name="identifier">
|
463
464
|
<attribute name="type">
|
464
|
-
<
|
465
|
-
<value>orcid</value>
|
466
|
-
<value>uri</value>
|
467
|
-
</choice>
|
465
|
+
<data type="string" datatypeLibrary=""/>
|
468
466
|
</attribute>
|
469
467
|
<text/>
|
470
468
|
</element>
|
@@ -1106,7 +1104,7 @@
|
|
1106
1104
|
<value>complementOf</value>
|
1107
1105
|
<value>obsoletes</value>
|
1108
1106
|
<value>obsoletedBy</value>
|
1109
|
-
<value>
|
1107
|
+
<value>cites</value>
|
1110
1108
|
<value>isCitedIn</value>
|
1111
1109
|
</choice>
|
1112
1110
|
</define>
|
@@ -96,8 +96,8 @@ module Asciidoctor
|
|
96
96
|
|
97
97
|
def boilerplate_isodoc(xmldoc)
|
98
98
|
conv = super
|
99
|
-
conv.i18n.set(
|
100
|
-
conv.i18n.set(
|
99
|
+
conv.i18n.set("nist_division", @nistdivision)
|
100
|
+
conv.i18n.set("nist_division_address", @nistdivisionaddress)
|
101
101
|
conv
|
102
102
|
end
|
103
103
|
|
@@ -16,10 +16,11 @@ module Asciidoctor
|
|
16
16
|
xmldoc.xpath("//sourcecode").each do |x|
|
17
17
|
x.traverse do |n|
|
18
18
|
next unless n.text?
|
19
|
-
|
20
|
-
|
19
|
+
next unless /\{\{\{/.match(n.text)
|
20
|
+
n.replace(Nokogiri::XML::NodeSet.new(n.document, nistvariable_insert(n)))
|
21
21
|
end
|
22
22
|
end
|
23
|
+
super
|
23
24
|
end
|
24
25
|
|
25
26
|
# skip annex/terms/terms, which is empty node
|
@@ -62,7 +62,7 @@ module Asciidoctor
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def olist(node)
|
65
|
-
id =
|
65
|
+
id = Metanorma::Utils::anchor_or_uuid(node)
|
66
66
|
noko do |xml|
|
67
67
|
xml.ol **attr_code(id: id, class: node.attr("class")) do |xml_ol|
|
68
68
|
node.items.each { |item| li(xml_ol, item) }
|
@@ -72,7 +72,7 @@ module Asciidoctor
|
|
72
72
|
|
73
73
|
def glossary(node)
|
74
74
|
noko do |xml|
|
75
|
-
xml.dl **{id:
|
75
|
+
xml.dl **{id: Metanorma::Utils::anchor_or_uuid(node),
|
76
76
|
type: "glossary"} do |xml_dl|
|
77
77
|
node.items.each do |terms, dd|
|
78
78
|
dt(terms, xml_dl)
|
@@ -105,6 +105,8 @@ module Asciidoctor
|
|
105
105
|
@series = node.attr("series")
|
106
106
|
@cswp = %w(nist-cswp nist-csts).include?(@series)
|
107
107
|
super
|
108
|
+
@sourcecode_markup_start = node.attr("sourcecode-markup-start") || "{{{{"
|
109
|
+
@sourcecode_markup_end = node.attr("sourcecode-markup-end") || "}}}}"
|
108
110
|
end
|
109
111
|
|
110
112
|
def outputs(node, ret)
|
@@ -102,7 +102,7 @@
|
|
102
102
|
</attribute>
|
103
103
|
</optional>
|
104
104
|
<oneOrMore>
|
105
|
-
<ref name="
|
105
|
+
<ref name="ul_li"/>
|
106
106
|
</oneOrMore>
|
107
107
|
<zeroOrMore>
|
108
108
|
<ref name="note"/>
|
@@ -789,6 +789,9 @@
|
|
789
789
|
<attribute name="width"/>
|
790
790
|
</element>
|
791
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
792
795
|
<define name="TextElement" combine="choice">
|
793
796
|
<ref name="concept"/>
|
794
797
|
</define>
|
@@ -809,6 +812,8 @@
|
|
809
812
|
<ref name="requirement"/>
|
810
813
|
<ref name="recommendation"/>
|
811
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
812
817
|
</choice>
|
813
818
|
</define>
|
814
819
|
<define name="bibliography">
|
@@ -914,6 +919,9 @@
|
|
914
919
|
</choice>
|
915
920
|
</attribute>
|
916
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
917
925
|
<optional>
|
918
926
|
<ref name="boilerplate"/>
|
919
927
|
</optional>
|
@@ -924,11 +932,21 @@
|
|
924
932
|
<zeroOrMore>
|
925
933
|
<ref name="annex"/>
|
926
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
927
938
|
<zeroOrMore>
|
928
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
929
940
|
</zeroOrMore>
|
930
941
|
</element>
|
931
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
932
950
|
<define name="preface">
|
933
951
|
<element name="preface">
|
934
952
|
<oneOrMore>
|
@@ -952,6 +970,11 @@
|
|
952
970
|
<ref name="Content-Section"/>
|
953
971
|
</element>
|
954
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
955
978
|
<define name="boilerplate">
|
956
979
|
<element name="boilerplate">
|
957
980
|
<optional>
|
@@ -1632,4 +1655,87 @@
|
|
1632
1655
|
<text/>
|
1633
1656
|
</element>
|
1634
1657
|
</define>
|
1658
|
+
<define name="imagemap">
|
1659
|
+
<element name="imagemap">
|
1660
|
+
<ref name="figure"/>
|
1661
|
+
<zeroOrMore>
|
1662
|
+
<element name="area">
|
1663
|
+
<attribute name="type">
|
1664
|
+
<choice>
|
1665
|
+
<value>rect</value>
|
1666
|
+
<value>circle</value>
|
1667
|
+
<value>ellipse</value>
|
1668
|
+
<value>poly</value>
|
1669
|
+
</choice>
|
1670
|
+
</attribute>
|
1671
|
+
<choice>
|
1672
|
+
<ref name="xref"/>
|
1673
|
+
<ref name="hyperlink"/>
|
1674
|
+
<ref name="eref"/>
|
1675
|
+
</choice>
|
1676
|
+
<oneOrMore>
|
1677
|
+
<element name="coords">
|
1678
|
+
<attribute name="x">
|
1679
|
+
<data type="float"/>
|
1680
|
+
</attribute>
|
1681
|
+
<attribute name="y">
|
1682
|
+
<data type="float"/>
|
1683
|
+
</attribute>
|
1684
|
+
</element>
|
1685
|
+
</oneOrMore>
|
1686
|
+
<optional>
|
1687
|
+
<element name="radius">
|
1688
|
+
<attribute name="x">
|
1689
|
+
<data type="float"/>
|
1690
|
+
</attribute>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="y">
|
1693
|
+
<data type="float"/>
|
1694
|
+
</attribute>
|
1695
|
+
</optional>
|
1696
|
+
</element>
|
1697
|
+
</optional>
|
1698
|
+
</element>
|
1699
|
+
</zeroOrMore>
|
1700
|
+
</element>
|
1701
|
+
</define>
|
1702
|
+
<define name="svgmap">
|
1703
|
+
<element name="svgmap">
|
1704
|
+
<ref name="figure"/>
|
1705
|
+
<zeroOrMore>
|
1706
|
+
<element name="target">
|
1707
|
+
<attribute name="href">
|
1708
|
+
<data type="anyURI"/>
|
1709
|
+
</attribute>
|
1710
|
+
<choice>
|
1711
|
+
<ref name="xref"/>
|
1712
|
+
<ref name="hyperlink"/>
|
1713
|
+
<ref name="eref"/>
|
1714
|
+
</choice>
|
1715
|
+
</element>
|
1716
|
+
</zeroOrMore>
|
1717
|
+
</element>
|
1718
|
+
</define>
|
1719
|
+
<define name="ul_li">
|
1720
|
+
<element name="li">
|
1721
|
+
<optional>
|
1722
|
+
<attribute name="id">
|
1723
|
+
<data type="ID"/>
|
1724
|
+
</attribute>
|
1725
|
+
</optional>
|
1726
|
+
<optional>
|
1727
|
+
<attribute name="uncheckedcheckbox">
|
1728
|
+
<data type="boolean"/>
|
1729
|
+
</attribute>
|
1730
|
+
</optional>
|
1731
|
+
<optional>
|
1732
|
+
<attribute name="checkedcheckbox">
|
1733
|
+
<data type="boolean"/>
|
1734
|
+
</attribute>
|
1735
|
+
</optional>
|
1736
|
+
<oneOrMore>
|
1737
|
+
<ref name="BasicBlock"/>
|
1738
|
+
</oneOrMore>
|
1739
|
+
</element>
|
1740
|
+
</define>
|
1635
1741
|
</grammar>
|
@@ -194,6 +194,9 @@
|
|
194
194
|
<zeroOrMore>
|
195
195
|
<ref name="termdocsource"/>
|
196
196
|
</zeroOrMore>
|
197
|
+
<optional>
|
198
|
+
<ref name="misccontainer"/>
|
199
|
+
</optional>
|
197
200
|
<optional>
|
198
201
|
<ref name="boilerplate"/>
|
199
202
|
</optional>
|
@@ -207,6 +210,9 @@
|
|
207
210
|
<optional>
|
208
211
|
<ref name="bibliography"/>
|
209
212
|
</optional>
|
213
|
+
<zeroOrMore>
|
214
|
+
<ref name="indexsect"/>
|
215
|
+
</zeroOrMore>
|
210
216
|
</element>
|
211
217
|
</define>
|
212
218
|
</grammar>
|
@@ -6,21 +6,21 @@
|
|
6
6
|
<p>
|
7
7
|
{%- if substage == "retired" or substage == "withdrawn" -%}
|
8
8
|
{%- if unpublished -%}
|
9
|
-
{%- if substage == "retired" %}{{draft-retired-boilerplate}}{% else %}{{draft-withdrawn-boilerplate}}{% endif -%}
|
9
|
+
{%- if substage == "retired" %}{{labels["draft-retired-boilerplate"]}}{% else %}{{labels["draft-withdrawn-boilerplate"]}}{% endif -%}
|
10
10
|
{%- else -%}
|
11
|
-
{%- if withdrawal_pending %}{{ withdrawal-pending-boilerplate}}{% else %}{{ publication-withdrawn-boilerplate }}{% endif -%}
|
11
|
+
{%- if withdrawal_pending %}{{ labels["withdrawal-pending-boilerplate"]}}{% else %}{{ labels["publication-withdrawn-boilerplate"] }}{% endif -%}
|
12
12
|
{%- endif -%}
|
13
13
|
{%- else -%}
|
14
14
|
{%- if status == "Internal Draft" -%}
|
15
|
-
{{- draft-internal-boilerplate -}}
|
15
|
+
{{- labels["draft-internal-boilerplate"] -}}
|
16
16
|
{%- elsif status == "Work-in-Progress Draft" -%}
|
17
|
-
{{- draft-wip-boilerplate -}}
|
17
|
+
{{- labels["draft-wip-boilerplate"] -}}
|
18
18
|
{%- elsif status == "Preliminary Draft" -%}
|
19
|
-
{{- draft-prelim-boilerplate -}}
|
19
|
+
{{- labels["draft-prelim-boilerplate"] -}}
|
20
20
|
{%- elsif status == "Public Draft" -%}
|
21
|
-
{{- draft-public-boilerplate -}}
|
21
|
+
{{- labels["draft-public-boilerplate"] -}}
|
22
22
|
{%- elsif status == "Approval Draft" -%}
|
23
|
-
{{- draft-public-boilerplate -}}
|
23
|
+
{{- labels["draft-public-boilerplate"] -}}
|
24
24
|
{%- endif -%}
|
25
25
|
{%- endif -%}
|
26
26
|
</p>
|
@@ -78,8 +78,8 @@ CODEN: NSPUE2</p>
|
|
78
78
|
<p align="center"><strong>Comments on this publication may be submitted to:</strong></p>
|
79
79
|
|
80
80
|
<p align="center">National Institute of Standards and Technology <br/>
|
81
|
-
Attn: {{ nist_division }} <br/>
|
82
|
-
{{ nist_division_address }} <br/>
|
81
|
+
Attn: {{ labels["nist_division"] }} <br/>
|
82
|
+
{{ labels["nist_division_address"] }} <br/>
|
83
83
|
{% if email %}
|
84
84
|
Email: <link target="mailto:{{ email }}"/>
|
85
85
|
{% endif %}</p>
|