metanorma-nist 1.2.14 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e78c8ae10f3132672926796f46dbf8878162307eff3397a4b3dcd851546bcfb
4
- data.tar.gz: 495b6372624db9ae53eac0da0d007093728d643aea4b991317e9cc600846b8cf
3
+ metadata.gz: bd9a240ccb58e745abb276285bf1f48004d72a8f5a15413f39611773926fc9f5
4
+ data.tar.gz: 126d8a1e178ec82888a4ddaa6d10b0a589872424981df7e49409a72882a85241
5
5
  SHA512:
6
- metadata.gz: f5188d91752f67dcf8f0ec293b3875d86fead17a0b4cd05738deb2c1c111dddeb29fea79dbb516766b820b8419f75d3633a5c0d09396be5d3af100e1fc3ef13a
7
- data.tar.gz: 1106b9615698e0d044af2659c9c2d68c8ba152742586dbb6c64a7cfeb9fdbc679cd7139b149d69d0f0f6037af8f7d636666425bdfec20cfd672df68ed00bb968
6
+ metadata.gz: c7bd829e6baf2aaea5cfc577c8c0bc41cd8622a322a06bd551ca212467e53d768127fce8b2d12f40eeeaa7ad4d989254ee3bd555bd0e153197c04d2a63e2e0e0
7
+ data.tar.gz: 892c02adf47677f1b1133b818c235ba7d7ccee378490f3e3c6f416d7e39d9cd74b571a490e2b8cf6e77e954ce9fe3479962265bda536664b33a579c57dfb24f1
@@ -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: '2.7'
23
+ - ruby: '3.0'
24
24
  os: 'ubuntu-latest'
25
25
  experimental: true
26
- - ruby: '2.7'
26
+ - ruby: '3.0'
27
27
  os: 'windows-latest'
28
28
  experimental: true
29
- - ruby: '2.7'
29
+ - ruby: '3.0'
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
33
- - uses: actions/checkout@master
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,6 +1,12 @@
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
+
9
+ AllCops:
10
+ DisplayCopNames: false
11
+ StyleGuideCopsOnly: false
12
+ TargetRubyVersion: 2.4
@@ -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-isodoc+xml</value>
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
- <choice>
465
- <value>orcid</value>
466
- <value>uri</value>
467
- </choice>
465
+ <data type="string" datatypeLibrary=""/>
468
466
  </attribute>
469
467
  <text/>
470
468
  </element>
@@ -789,6 +787,7 @@
789
787
  <value>adapted</value>
790
788
  <value>vote-started</value>
791
789
  <value>vote-ended</value>
790
+ <value>announced</value>
792
791
  </choice>
793
792
  </define>
794
793
  <define name="bdate">
@@ -1106,7 +1105,7 @@
1106
1105
  <value>complementOf</value>
1107
1106
  <value>obsoletes</value>
1108
1107
  <value>obsoletedBy</value>
1109
- <value>cited</value>
1108
+ <value>cites</value>
1110
1109
  <value>isCitedIn</value>
1111
1110
  </choice>
1112
1111
  </define>
@@ -1,7 +1,7 @@
1
1
  require "asciidoctor"
2
2
  require "asciidoctor/standoc/converter"
3
3
  require "fileutils"
4
- require_relative "./front_id.rb"
4
+ require_relative "./front_id"
5
5
 
6
6
  module Asciidoctor
7
7
  module NIST
@@ -26,6 +26,7 @@ module Asciidoctor
26
26
 
27
27
  def title_subtitle(node, t, at)
28
28
  return unless node.attr("title-sub")
29
+
29
30
  t.title(**attr_code(at.merge(type: "subtitle"))) do |t1|
30
31
  t1 << asciidoc_sub(node.attr("title-sub"))
31
32
  end
@@ -36,6 +37,7 @@ module Asciidoctor
36
37
 
37
38
  def title_document_class(node, t, at)
38
39
  return unless node.attr("title-document-class")
40
+
39
41
  t.title(**attr_code(at.merge(type: "document-class"))) do |t1|
40
42
  t1 << asciidoc_sub(node.attr("title-document-class"))
41
43
  end
@@ -45,8 +47,10 @@ module Asciidoctor
45
47
  t.title(**attr_code(at.merge(type: "main"))) do |t1|
46
48
  t1 << (asciidoc_sub(node.attr("title-main")) || node.title)
47
49
  end
48
- node.attr("title-main-short") and t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
49
- t1 << asciidoc_sub(node.attr("title-main-short"))
50
+ if node.attr("title-main-short")
51
+ t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
52
+ t1 << asciidoc_sub(node.attr("title-main-short"))
53
+ end
50
54
  end
51
55
  end
52
56
 
@@ -85,6 +89,7 @@ module Asciidoctor
85
89
  def metadata_committee(node, xml)
86
90
  return unless node.attr("technical-committee") || node.attr("subcommittee") ||
87
91
  node.attr("workgroup") || node.attr("workinggroup")
92
+
88
93
  xml.editorialgroup do |a|
89
94
  c = node.attr("technical-committee") and a.committee(c)
90
95
  c = node.attr("subcommittee") and
@@ -124,6 +129,7 @@ module Asciidoctor
124
129
  title = node.attr("series-title")
125
130
  abbrev = node.attr("series-abbrev")
126
131
  return unless (title || abbrev)
132
+
127
133
  xml.series **{ type: "secondary" } do |s|
128
134
  title and s.title title
129
135
  abbrev and s.abbreviation abbrev
@@ -146,11 +152,15 @@ module Asciidoctor
146
152
  end
147
153
 
148
154
  def relaton_relation_descriptions
149
- super.merge({ "supersedes" => "obsoletes", "superseded-by" => "obsoleted-by", })
155
+ super.merge(
156
+ { "supersedes" => "obsoletes",
157
+ "superseded-by" => "obsoleted-by" }
158
+ )
150
159
  end
151
160
 
152
161
  def metadata_getrelation(node, xml, type, desc = nil)
153
- if type == "obsoleted-by" and desc.nil? and node.attr("superseding-status")
162
+ if type == "obsoleted-by" && desc.nil? &&
163
+ node.attr("superseding-status")
154
164
  metadata_superseding_doc(node, xml)
155
165
  end
156
166
  super
@@ -229,6 +239,7 @@ module Asciidoctor
229
239
 
230
240
  def metadata_ext(node, xml)
231
241
  metadata_doctype(node, xml)
242
+ metadata_subdoctype(node, xml)
232
243
  metadata_committee(node, xml)
233
244
  metadata_commentperiod(node, xml)
234
245
  end
@@ -86,6 +86,35 @@
86
86
  <text/>
87
87
  </element>
88
88
  </define>
89
+ <define name="erefType">
90
+ <optional>
91
+ <attribute name="normative">
92
+ <data type="boolean"/>
93
+ </attribute>
94
+ </optional>
95
+ <attribute name="citeas"/>
96
+ <attribute name="type">
97
+ <ref name="ReferenceFormat"/>
98
+ </attribute>
99
+ <optional>
100
+ <attribute name="alt"/>
101
+ </optional>
102
+ <optional>
103
+ <attribute name="case">
104
+ <choice>
105
+ <value>capital</value>
106
+ <value>lowercase</value>
107
+ </choice>
108
+ </attribute>
109
+ </optional>
110
+ <optional>
111
+ <attribute name="droploc">
112
+ <data type="boolean"/>
113
+ </attribute>
114
+ </optional>
115
+ <ref name="CitationType"/>
116
+ <text/>
117
+ </define>
89
118
  <define name="ul">
90
119
  <element name="ul">
91
120
  <attribute name="id">
@@ -102,7 +131,7 @@
102
131
  </attribute>
103
132
  </optional>
104
133
  <oneOrMore>
105
- <ref name="li"/>
134
+ <ref name="ul_li"/>
106
135
  </oneOrMore>
107
136
  <zeroOrMore>
108
137
  <ref name="note"/>
@@ -775,6 +804,90 @@
775
804
  <ref name="paragraph"/>
776
805
  </element>
777
806
  </define>
807
+ <define name="em">
808
+ <element name="em">
809
+ <zeroOrMore>
810
+ <choice>
811
+ <ref name="PureTextElement"/>
812
+ <ref name="stem"/>
813
+ <ref name="index"/>
814
+ </choice>
815
+ </zeroOrMore>
816
+ </element>
817
+ </define>
818
+ <define name="strong">
819
+ <element name="strong">
820
+ <zeroOrMore>
821
+ <choice>
822
+ <ref name="PureTextElement"/>
823
+ <ref name="stem"/>
824
+ <ref name="index"/>
825
+ </choice>
826
+ </zeroOrMore>
827
+ </element>
828
+ </define>
829
+ <define name="tt">
830
+ <element name="tt">
831
+ <zeroOrMore>
832
+ <choice>
833
+ <ref name="PureTextElement"/>
834
+ <ref name="index"/>
835
+ </choice>
836
+ </zeroOrMore>
837
+ </element>
838
+ </define>
839
+ <define name="keyword">
840
+ <element name="keyword">
841
+ <zeroOrMore>
842
+ <choice>
843
+ <ref name="PureTextElement"/>
844
+ <ref name="index"/>
845
+ </choice>
846
+ </zeroOrMore>
847
+ </element>
848
+ </define>
849
+ <define name="strike">
850
+ <element name="strike">
851
+ <zeroOrMore>
852
+ <choice>
853
+ <ref name="PureTextElement"/>
854
+ <ref name="index"/>
855
+ </choice>
856
+ </zeroOrMore>
857
+ </element>
858
+ </define>
859
+ <define name="underline">
860
+ <element name="underline">
861
+ <zeroOrMore>
862
+ <choice>
863
+ <ref name="PureTextElement"/>
864
+ <ref name="index"/>
865
+ </choice>
866
+ </zeroOrMore>
867
+ </element>
868
+ </define>
869
+ <define name="smallcap">
870
+ <element name="smallcap">
871
+ <zeroOrMore>
872
+ <choice>
873
+ <ref name="PureTextElement"/>
874
+ <ref name="index"/>
875
+ </choice>
876
+ </zeroOrMore>
877
+ </element>
878
+ </define>
879
+ <define name="pagebreak">
880
+ <element name="pagebreak">
881
+ <optional>
882
+ <attribute name="orientation">
883
+ <choice>
884
+ <value>landscape</value>
885
+ <value>portrait</value>
886
+ </choice>
887
+ </attribute>
888
+ </optional>
889
+ </element>
890
+ </define>
778
891
  </include>
779
892
  <!-- end overrides -->
780
893
  <define name="colgroup">
@@ -793,7 +906,35 @@
793
906
  <value>internal</value>
794
907
  </define>
795
908
  <define name="TextElement" combine="choice">
796
- <ref name="concept"/>
909
+ <choice>
910
+ <ref name="concept"/>
911
+ <ref name="add"/>
912
+ <ref name="del"/>
913
+ </choice>
914
+ </define>
915
+ <define name="add">
916
+ <element name="add">
917
+ <choice>
918
+ <ref name="PureTextElement"/>
919
+ <ref name="eref"/>
920
+ <ref name="stem"/>
921
+ <ref name="keyword"/>
922
+ <ref name="xref"/>
923
+ <ref name="hyperlink"/>
924
+ </choice>
925
+ </element>
926
+ </define>
927
+ <define name="del">
928
+ <element name="del">
929
+ <choice>
930
+ <ref name="PureTextElement"/>
931
+ <ref name="eref"/>
932
+ <ref name="stem"/>
933
+ <ref name="keyword"/>
934
+ <ref name="xref"/>
935
+ <ref name="hyperlink"/>
936
+ </choice>
937
+ </element>
797
938
  </define>
798
939
  <define name="concept">
799
940
  <element name="concept">
@@ -814,8 +955,170 @@
814
955
  <ref name="permission"/>
815
956
  <ref name="imagemap"/>
816
957
  <ref name="svgmap"/>
958
+ <ref name="inputform"/>
959
+ </choice>
960
+ </define>
961
+ <define name="inputform">
962
+ <element name="form">
963
+ <attribute name="id">
964
+ <data type="ID"/>
965
+ </attribute>
966
+ <attribute name="name"/>
967
+ <attribute name="action"/>
968
+ <zeroOrMore>
969
+ <choice>
970
+ <ref name="TextElement"/>
971
+ <ref name="FormInput"/>
972
+ </choice>
973
+ </zeroOrMore>
974
+ </element>
975
+ </define>
976
+ <define name="FormInput">
977
+ <choice>
978
+ <ref name="input"/>
979
+ <ref name="formlabel"/>
980
+ <ref name="select"/>
981
+ <ref name="textarea"/>
817
982
  </choice>
818
983
  </define>
984
+ <define name="InputType">
985
+ <choice>
986
+ <value>button</value>
987
+ <value>checkbox</value>
988
+ <value>date</value>
989
+ <value>file</value>
990
+ <value>password</value>
991
+ <value>radio</value>
992
+ <value>submit</value>
993
+ <value>text</value>
994
+ </choice>
995
+ </define>
996
+ <define name="input">
997
+ <element name="input">
998
+ <attribute name="type">
999
+ <ref name="InputType"/>
1000
+ </attribute>
1001
+ <optional>
1002
+ <attribute name="checked">
1003
+ <data type="boolean"/>
1004
+ </attribute>
1005
+ </optional>
1006
+ <optional>
1007
+ <attribute name="disabled">
1008
+ <data type="boolean"/>
1009
+ </attribute>
1010
+ </optional>
1011
+ <optional>
1012
+ <attribute name="readonly">
1013
+ <data type="boolean"/>
1014
+ </attribute>
1015
+ </optional>
1016
+ <optional>
1017
+ <attribute name="maxlength">
1018
+ <data type="int"/>
1019
+ </attribute>
1020
+ </optional>
1021
+ <optional>
1022
+ <attribute name="minlength">
1023
+ <data type="int"/>
1024
+ </attribute>
1025
+ </optional>
1026
+ <optional>
1027
+ <attribute name="name"/>
1028
+ </optional>
1029
+ <optional>
1030
+ <attribute name="value"/>
1031
+ </optional>
1032
+ <optional>
1033
+ <attribute name="id">
1034
+ <data type="ID"/>
1035
+ </attribute>
1036
+ </optional>
1037
+ </element>
1038
+ </define>
1039
+ <define name="formlabel">
1040
+ <element name="label">
1041
+ <attribute name="for">
1042
+ <data type="IDREF"/>
1043
+ </attribute>
1044
+ <zeroOrMore>
1045
+ <ref name="PureTextElement"/>
1046
+ </zeroOrMore>
1047
+ </element>
1048
+ </define>
1049
+ <define name="select">
1050
+ <element name="select">
1051
+ <optional>
1052
+ <attribute name="name"/>
1053
+ </optional>
1054
+ <optional>
1055
+ <attribute name="value"/>
1056
+ </optional>
1057
+ <optional>
1058
+ <attribute name="id">
1059
+ <data type="ID"/>
1060
+ </attribute>
1061
+ </optional>
1062
+ <optional>
1063
+ <attribute name="disabled">
1064
+ <data type="boolean"/>
1065
+ </attribute>
1066
+ </optional>
1067
+ <optional>
1068
+ <attribute name="multiple">
1069
+ <data type="boolean"/>
1070
+ </attribute>
1071
+ </optional>
1072
+ <optional>
1073
+ <attribute name="size">
1074
+ <data type="int"/>
1075
+ </attribute>
1076
+ </optional>
1077
+ <oneOrMore>
1078
+ <ref name="option"/>
1079
+ </oneOrMore>
1080
+ </element>
1081
+ </define>
1082
+ <define name="option">
1083
+ <element name="option">
1084
+ <optional>
1085
+ <attribute name="disabled">
1086
+ <data type="boolean"/>
1087
+ </attribute>
1088
+ </optional>
1089
+ <optional>
1090
+ <attribute name="value"/>
1091
+ </optional>
1092
+ <zeroOrMore>
1093
+ <ref name="PureTextElement"/>
1094
+ </zeroOrMore>
1095
+ </element>
1096
+ </define>
1097
+ <define name="textarea">
1098
+ <element name="textarea">
1099
+ <optional>
1100
+ <attribute name="name"/>
1101
+ </optional>
1102
+ <optional>
1103
+ <attribute name="value"/>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="id">
1107
+ <data type="ID"/>
1108
+ </attribute>
1109
+ </optional>
1110
+ <optional>
1111
+ <attribute name="rows">
1112
+ <data type="int"/>
1113
+ </attribute>
1114
+ </optional>
1115
+ <optional>
1116
+ <attribute name="cols">
1117
+ <data type="int"/>
1118
+ </attribute>
1119
+ </optional>
1120
+ </element>
1121
+ </define>
819
1122
  <define name="bibliography">
820
1123
  <element name="bibliography">
821
1124
  <oneOrMore>
@@ -888,9 +1191,7 @@
888
1191
  </define>
889
1192
  <define name="IsoWorkgroup">
890
1193
  <optional>
891
- <attribute name="number">
892
- <data type="int"/>
893
- </attribute>
1194
+ <attribute name="number"/>
894
1195
  </optional>
895
1196
  <optional>
896
1197
  <attribute name="type"/>
@@ -1716,4 +2017,26 @@
1716
2017
  </zeroOrMore>
1717
2018
  </element>
1718
2019
  </define>
2020
+ <define name="ul_li">
2021
+ <element name="li">
2022
+ <optional>
2023
+ <attribute name="id">
2024
+ <data type="ID"/>
2025
+ </attribute>
2026
+ </optional>
2027
+ <optional>
2028
+ <attribute name="uncheckedcheckbox">
2029
+ <data type="boolean"/>
2030
+ </attribute>
2031
+ </optional>
2032
+ <optional>
2033
+ <attribute name="checkedcheckbox">
2034
+ <data type="boolean"/>
2035
+ </attribute>
2036
+ </optional>
2037
+ <oneOrMore>
2038
+ <ref name="BasicBlock"/>
2039
+ </oneOrMore>
2040
+ </element>
2041
+ </define>
1719
2042
  </grammar>