metanorma-mpfa 0.6.1 → 0.6.6
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 +12 -11
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/bin/manifest +43 -42
- data/lib/asciidoctor/mpfa/biblio.rng +1 -0
- data/lib/asciidoctor/mpfa/isodoc.rng +209 -4
- data/lib/asciidoctor/mpfa/mpfd.rng +3 -0
- data/lib/isodoc/mpfa/init.rb +1 -2
- data/lib/isodoc/mpfa/metadata.rb +14 -14
- data/lib/isodoc/mpfa/mpfa.circular.xsl +560 -81
- data/lib/isodoc/mpfa/mpfa.compliance-standards-for-mpf-trustees.xsl +560 -81
- data/lib/isodoc/mpfa/mpfa.guidelines.xsl +560 -81
- data/lib/isodoc/mpfa/mpfa.standards.xsl +560 -81
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +560 -81
- data/lib/isodoc/mpfa/xref.rb +28 -24
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +3 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c8636c4532317ad31af938010b32a0e0db9504d6d7bc6f96d46603694f3db1e
|
4
|
+
data.tar.gz: fa33c669965b72847fa28c831ade831a5cbd0b0253794d4c3acb9d8454c6eda5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c93cb0a5cd55b40bf6b22c5cfeac7e1a9d8c772b20a7e3c0b08b511ca4ccde6d188d99fdaf823362305bfdc4a80a8b675b8779ff91e91f0f816bb75b3ebf5243
|
7
|
+
data.tar.gz: 17011395f91cc0f1210707bf31e6797a693bed509e1afeda99222e8ffc702fec9853c26110ed22716ae8fdd28ce59fd43bd3486d96392fe68e768ee39692f22e
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
|
-
include:
|
23
|
-
- ruby: '3.0'
|
24
|
-
os: 'ubuntu-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: '3.0'
|
27
|
-
os: 'windows-latest'
|
28
|
-
experimental: true
|
29
|
-
- ruby: '3.0'
|
30
|
-
os: 'macos-latest'
|
31
|
-
experimental: true
|
32
22
|
steps:
|
33
23
|
- uses: actions/checkout@v2
|
34
24
|
with:
|
@@ -40,3 +30,14 @@ jobs:
|
|
40
30
|
bundler-cache: true
|
41
31
|
|
42
32
|
- run: bundle exec rake
|
33
|
+
|
34
|
+
tests-passed:
|
35
|
+
needs: rake
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: peter-evans/repository-dispatch@v1
|
39
|
+
with:
|
40
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
41
|
+
repository: ${{ github.repository }}
|
42
|
+
event-type: tests-passed
|
43
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
#
|
2
|
-
# https://github.com/
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
4
3
|
inherit_from:
|
5
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
5
|
|
7
6
|
# local repo-specific modifications
|
7
|
+
# ...
|
8
8
|
|
9
9
|
AllCops:
|
10
|
-
|
11
|
-
StyleGuideCopsOnly: false
|
12
|
-
TargetRubyVersion: 2.4
|
13
|
-
Rails:
|
14
|
-
Enabled: true
|
10
|
+
TargetRubyVersion: 2.5
|
data/bin/manifest
CHANGED
@@ -29,12 +29,13 @@ supported_gem_paths.each do |backend|
|
|
29
29
|
end
|
30
30
|
puts
|
31
31
|
|
32
|
-
def uuid
|
32
|
+
def uuid
|
33
33
|
UUIDTools::UUID.random_create
|
34
34
|
end
|
35
35
|
|
36
36
|
def extract_documents(m)
|
37
|
-
return [] unless m
|
37
|
+
return [] unless m && m["sections"]
|
38
|
+
|
38
39
|
ret = []
|
39
40
|
m["sections"].each do |s|
|
40
41
|
ret << s if s["file"]
|
@@ -45,22 +46,24 @@ end
|
|
45
46
|
|
46
47
|
def hyperlink(link)
|
47
48
|
return unless link
|
49
|
+
|
48
50
|
link.sub(/\.adoc(?=$|#)/, ".html")
|
49
51
|
end
|
50
52
|
|
51
53
|
def iterate(sections)
|
52
54
|
return "" unless sections
|
55
|
+
|
53
56
|
ret = ""
|
54
57
|
Array(sections).each do |m|
|
55
|
-
ret+= "<clause id='#{uuid}'>\n"
|
56
|
-
title = m["title"] && m["number"] ? "#{m['number']}. #{m['title']}" : (
|
58
|
+
ret += "<clause id='#{uuid}'>\n"
|
59
|
+
title = m["title"] && m["number"] ? "#{m['number']}. #{m['title']}" : (m["number"] || m["title"] || "—")
|
57
60
|
file = hyperlink(m["file"])
|
58
61
|
title = "<link target='#{file}'>#{title}</link>" if file
|
59
|
-
ret+= "<title>#{title}</title>\n"
|
60
|
-
ret+= "<p>#{m['description']}</p>\n" if m["description"]
|
61
|
-
ret+= "<p align='right'>#{m['revdate']}</p>\n" if m["revdate"]
|
62
|
+
ret += "<title>#{title}</title>\n"
|
63
|
+
ret += "<p>#{m['description']}</p>\n" if m["description"]
|
64
|
+
ret += "<p align='right'>#{m['revdate']}</p>\n" if m["revdate"]
|
62
65
|
ret += iterate(m["sections"])
|
63
|
-
ret+= "</clause>\n"
|
66
|
+
ret += "</clause>\n"
|
64
67
|
end
|
65
68
|
ret
|
66
69
|
end
|
@@ -69,20 +72,19 @@ options = {}
|
|
69
72
|
opt_parser = OptionParser.new do |opts|
|
70
73
|
opts.banner += " <file>"
|
71
74
|
opts.on(
|
72
|
-
|
73
|
-
|
75
|
+
"-t",
|
76
|
+
"--type TYPE",
|
74
77
|
"Type of standard to generate"
|
75
78
|
) { |v| options[:type] = v.to_sym }
|
76
79
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
)
|
80
|
+
opts.on(
|
81
|
+
"-r",
|
82
|
+
"--require LIBRARY",
|
83
|
+
"Require LIBRARY prior to execution"
|
84
|
+
) do |v|
|
82
85
|
options[:require] ||= []
|
83
86
|
options[:require] << v
|
84
|
-
|
85
|
-
|
87
|
+
end
|
86
88
|
|
87
89
|
opts.on_tail("-h", "--help", "Show this message") do
|
88
90
|
puts opts
|
@@ -98,7 +100,6 @@ if options[:require]
|
|
98
100
|
end
|
99
101
|
end
|
100
102
|
|
101
|
-
|
102
103
|
manifest = YAML.load_file(ARGV.pop)
|
103
104
|
|
104
105
|
documents = extract_documents(manifest)
|
@@ -106,41 +107,41 @@ documents = extract_documents(manifest)
|
|
106
107
|
# TODO real lookup of namespaces and root elements
|
107
108
|
|
108
109
|
out = <<~END
|
109
|
-
<#{options[:type]}-standard xmlns="http://riboseinc.com/isoxml">
|
110
|
-
<bibdata type="standard">
|
111
|
-
|
110
|
+
<#{options[:type]}-standard xmlns="http://riboseinc.com/isoxml">
|
111
|
+
<bibdata type="standard">
|
112
|
+
<title>#{manifest['title']}</title>
|
112
113
|
END
|
113
114
|
|
114
115
|
# TODO leave in anchor references?
|
115
116
|
#
|
116
117
|
documents.each do |d|
|
117
118
|
out += <<~END
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
119
|
+
<relation type="partOf">
|
120
|
+
<bibdata type="standard">
|
121
|
+
<title>#{d['title']}</title>
|
122
|
+
<docidentifier>#{d['number']}</docidentifier>
|
123
|
+
<abstract>#{d['description']}</abstract>
|
124
|
+
</bibdata>
|
125
|
+
</relation>
|
125
126
|
END
|
126
127
|
end
|
127
128
|
|
128
129
|
out += <<~END
|
129
|
-
</bibdata>
|
130
|
-
<sections>
|
130
|
+
</bibdata>
|
131
|
+
<sections>
|
131
132
|
END
|
132
133
|
|
133
|
-
out+=iterate(manifest["sections"])
|
134
|
+
out += iterate(manifest["sections"])
|
134
135
|
|
135
|
-
out+= <<~END
|
136
|
-
</sections>
|
137
|
-
<#{options[:type]}-standard>
|
136
|
+
out += <<~END
|
137
|
+
</sections>
|
138
|
+
<#{options[:type]}-standard>
|
138
139
|
END
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
140
|
+
outfilename = options[:filename].sub(/\.[^.]+$/, ".xml")
|
141
|
+
File.open(outfilename, "w") { |f| f.write out }
|
142
|
+
|
143
|
+
processor = registry.find_processor(options[:type].to_sym)
|
144
|
+
ext = :html
|
145
|
+
file_extension = "html" || processor.output_formats[ext]
|
146
|
+
outfilename = options[:filename].sub(/\.[^.]+$/, ".#{file_extension}")
|
147
|
+
processor.output(out, outfilename, ext, { suppressheadingnumbers: true })
|
@@ -45,6 +45,11 @@
|
|
45
45
|
<optional>
|
46
46
|
<attribute name="alt"/>
|
47
47
|
</optional>
|
48
|
+
<optional>
|
49
|
+
<attribute name="updatetype">
|
50
|
+
<data type="boolean"/>
|
51
|
+
</attribute>
|
52
|
+
</optional>
|
48
53
|
<text/>
|
49
54
|
</element>
|
50
55
|
</define>
|
@@ -543,6 +548,9 @@
|
|
543
548
|
</define>
|
544
549
|
<define name="BibDataExtensionType">
|
545
550
|
<ref name="doctype"/>
|
551
|
+
<optional>
|
552
|
+
<ref name="docsubtype"/>
|
553
|
+
</optional>
|
546
554
|
<optional>
|
547
555
|
<ref name="editorialgroup"/>
|
548
556
|
</optional>
|
@@ -876,8 +884,28 @@
|
|
876
884
|
</zeroOrMore>
|
877
885
|
</element>
|
878
886
|
</define>
|
887
|
+
<define name="pagebreak">
|
888
|
+
<element name="pagebreak">
|
889
|
+
<optional>
|
890
|
+
<attribute name="orientation">
|
891
|
+
<choice>
|
892
|
+
<value>landscape</value>
|
893
|
+
<value>portrait</value>
|
894
|
+
</choice>
|
895
|
+
</attribute>
|
896
|
+
</optional>
|
897
|
+
</element>
|
898
|
+
</define>
|
879
899
|
</include>
|
880
900
|
<!-- end overrides -->
|
901
|
+
<define name="docsubtype">
|
902
|
+
<element name="docsubtype">
|
903
|
+
<ref name="DocumentSubtype"/>
|
904
|
+
</element>
|
905
|
+
</define>
|
906
|
+
<define name="DocumentSubtype">
|
907
|
+
<text/>
|
908
|
+
</define>
|
881
909
|
<define name="colgroup">
|
882
910
|
<element name="colgroup">
|
883
911
|
<oneOrMore>
|
@@ -927,7 +955,24 @@
|
|
927
955
|
<define name="concept">
|
928
956
|
<element name="concept">
|
929
957
|
<optional>
|
930
|
-
<
|
958
|
+
<element name="refterm">
|
959
|
+
<zeroOrMore>
|
960
|
+
<choice>
|
961
|
+
<ref name="PureTextElement"/>
|
962
|
+
<ref name="stem"/>
|
963
|
+
</choice>
|
964
|
+
</zeroOrMore>
|
965
|
+
</element>
|
966
|
+
</optional>
|
967
|
+
<optional>
|
968
|
+
<element name="renderterm">
|
969
|
+
<zeroOrMore>
|
970
|
+
<choice>
|
971
|
+
<ref name="PureTextElement"/>
|
972
|
+
<ref name="stem"/>
|
973
|
+
</choice>
|
974
|
+
</zeroOrMore>
|
975
|
+
</element>
|
931
976
|
</optional>
|
932
977
|
<choice>
|
933
978
|
<ref name="eref"/>
|
@@ -943,8 +988,170 @@
|
|
943
988
|
<ref name="permission"/>
|
944
989
|
<ref name="imagemap"/>
|
945
990
|
<ref name="svgmap"/>
|
991
|
+
<ref name="inputform"/>
|
992
|
+
</choice>
|
993
|
+
</define>
|
994
|
+
<define name="inputform">
|
995
|
+
<element name="form">
|
996
|
+
<attribute name="id">
|
997
|
+
<data type="ID"/>
|
998
|
+
</attribute>
|
999
|
+
<attribute name="name"/>
|
1000
|
+
<attribute name="action"/>
|
1001
|
+
<zeroOrMore>
|
1002
|
+
<choice>
|
1003
|
+
<ref name="TextElement"/>
|
1004
|
+
<ref name="FormInput"/>
|
1005
|
+
</choice>
|
1006
|
+
</zeroOrMore>
|
1007
|
+
</element>
|
1008
|
+
</define>
|
1009
|
+
<define name="FormInput">
|
1010
|
+
<choice>
|
1011
|
+
<ref name="input"/>
|
1012
|
+
<ref name="formlabel"/>
|
1013
|
+
<ref name="select"/>
|
1014
|
+
<ref name="textarea"/>
|
946
1015
|
</choice>
|
947
1016
|
</define>
|
1017
|
+
<define name="InputType">
|
1018
|
+
<choice>
|
1019
|
+
<value>button</value>
|
1020
|
+
<value>checkbox</value>
|
1021
|
+
<value>date</value>
|
1022
|
+
<value>file</value>
|
1023
|
+
<value>password</value>
|
1024
|
+
<value>radio</value>
|
1025
|
+
<value>submit</value>
|
1026
|
+
<value>text</value>
|
1027
|
+
</choice>
|
1028
|
+
</define>
|
1029
|
+
<define name="input">
|
1030
|
+
<element name="input">
|
1031
|
+
<attribute name="type">
|
1032
|
+
<ref name="InputType"/>
|
1033
|
+
</attribute>
|
1034
|
+
<optional>
|
1035
|
+
<attribute name="checked">
|
1036
|
+
<data type="boolean"/>
|
1037
|
+
</attribute>
|
1038
|
+
</optional>
|
1039
|
+
<optional>
|
1040
|
+
<attribute name="disabled">
|
1041
|
+
<data type="boolean"/>
|
1042
|
+
</attribute>
|
1043
|
+
</optional>
|
1044
|
+
<optional>
|
1045
|
+
<attribute name="readonly">
|
1046
|
+
<data type="boolean"/>
|
1047
|
+
</attribute>
|
1048
|
+
</optional>
|
1049
|
+
<optional>
|
1050
|
+
<attribute name="maxlength">
|
1051
|
+
<data type="int"/>
|
1052
|
+
</attribute>
|
1053
|
+
</optional>
|
1054
|
+
<optional>
|
1055
|
+
<attribute name="minlength">
|
1056
|
+
<data type="int"/>
|
1057
|
+
</attribute>
|
1058
|
+
</optional>
|
1059
|
+
<optional>
|
1060
|
+
<attribute name="name"/>
|
1061
|
+
</optional>
|
1062
|
+
<optional>
|
1063
|
+
<attribute name="value"/>
|
1064
|
+
</optional>
|
1065
|
+
<optional>
|
1066
|
+
<attribute name="id">
|
1067
|
+
<data type="ID"/>
|
1068
|
+
</attribute>
|
1069
|
+
</optional>
|
1070
|
+
</element>
|
1071
|
+
</define>
|
1072
|
+
<define name="formlabel">
|
1073
|
+
<element name="label">
|
1074
|
+
<attribute name="for">
|
1075
|
+
<data type="IDREF"/>
|
1076
|
+
</attribute>
|
1077
|
+
<zeroOrMore>
|
1078
|
+
<ref name="PureTextElement"/>
|
1079
|
+
</zeroOrMore>
|
1080
|
+
</element>
|
1081
|
+
</define>
|
1082
|
+
<define name="select">
|
1083
|
+
<element name="select">
|
1084
|
+
<optional>
|
1085
|
+
<attribute name="name"/>
|
1086
|
+
</optional>
|
1087
|
+
<optional>
|
1088
|
+
<attribute name="value"/>
|
1089
|
+
</optional>
|
1090
|
+
<optional>
|
1091
|
+
<attribute name="id">
|
1092
|
+
<data type="ID"/>
|
1093
|
+
</attribute>
|
1094
|
+
</optional>
|
1095
|
+
<optional>
|
1096
|
+
<attribute name="disabled">
|
1097
|
+
<data type="boolean"/>
|
1098
|
+
</attribute>
|
1099
|
+
</optional>
|
1100
|
+
<optional>
|
1101
|
+
<attribute name="multiple">
|
1102
|
+
<data type="boolean"/>
|
1103
|
+
</attribute>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<attribute name="size">
|
1107
|
+
<data type="int"/>
|
1108
|
+
</attribute>
|
1109
|
+
</optional>
|
1110
|
+
<oneOrMore>
|
1111
|
+
<ref name="option"/>
|
1112
|
+
</oneOrMore>
|
1113
|
+
</element>
|
1114
|
+
</define>
|
1115
|
+
<define name="option">
|
1116
|
+
<element name="option">
|
1117
|
+
<optional>
|
1118
|
+
<attribute name="disabled">
|
1119
|
+
<data type="boolean"/>
|
1120
|
+
</attribute>
|
1121
|
+
</optional>
|
1122
|
+
<optional>
|
1123
|
+
<attribute name="value"/>
|
1124
|
+
</optional>
|
1125
|
+
<zeroOrMore>
|
1126
|
+
<ref name="PureTextElement"/>
|
1127
|
+
</zeroOrMore>
|
1128
|
+
</element>
|
1129
|
+
</define>
|
1130
|
+
<define name="textarea">
|
1131
|
+
<element name="textarea">
|
1132
|
+
<optional>
|
1133
|
+
<attribute name="name"/>
|
1134
|
+
</optional>
|
1135
|
+
<optional>
|
1136
|
+
<attribute name="value"/>
|
1137
|
+
</optional>
|
1138
|
+
<optional>
|
1139
|
+
<attribute name="id">
|
1140
|
+
<data type="ID"/>
|
1141
|
+
</attribute>
|
1142
|
+
</optional>
|
1143
|
+
<optional>
|
1144
|
+
<attribute name="rows">
|
1145
|
+
<data type="int"/>
|
1146
|
+
</attribute>
|
1147
|
+
</optional>
|
1148
|
+
<optional>
|
1149
|
+
<attribute name="cols">
|
1150
|
+
<data type="int"/>
|
1151
|
+
</attribute>
|
1152
|
+
</optional>
|
1153
|
+
</element>
|
1154
|
+
</define>
|
948
1155
|
<define name="bibliography">
|
949
1156
|
<element name="bibliography">
|
950
1157
|
<oneOrMore>
|
@@ -1017,9 +1224,7 @@
|
|
1017
1224
|
</define>
|
1018
1225
|
<define name="IsoWorkgroup">
|
1019
1226
|
<optional>
|
1020
|
-
<attribute name="number"
|
1021
|
-
<data type="int"/>
|
1022
|
-
</attribute>
|
1227
|
+
<attribute name="number"/>
|
1023
1228
|
</optional>
|
1024
1229
|
<optional>
|
1025
1230
|
<attribute name="type"/>
|