metanorma-iso 2.2.2 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/header-dis.html +111 -29
- data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
- data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
- data/lib/isodoc/iso/html/style-human.css +7 -2
- data/lib/isodoc/iso/html/style-human.scss +0 -1
- data/lib/isodoc/iso/html/style-iso.css +7 -2
- data/lib/isodoc/iso/html/style-iso.scss +0 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
- data/lib/isodoc/iso/html/wordstyle.css +150 -0
- data/lib/isodoc/iso/html/wordstyle.scss +144 -0
- data/lib/isodoc/iso/i18n-en.yaml +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
- data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
- data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/word_convert.rb +6 -4
- data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
- data/lib/isodoc/iso/word_dis_convert.rb +5 -2
- data/lib/metanorma/iso/base.rb +2 -1
- data/lib/metanorma/iso/biblio.rng +5 -0
- data/lib/metanorma/iso/isodoc.rng +47 -13
- data/lib/metanorma/iso/validate.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +5 -2
- metadata +4 -87
- data/.github/workflows/automerge.yml +0 -31
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/ubuntu.yml +0 -41
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.css +0 -2
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -2
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -71
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -45
- data/spec/examples/iso_123_all_parts.xml +0 -45
- data/spec/examples/iso_123_no_year_note.xml +0 -46
- data/spec/examples/iso_124_.xml +0 -41
- data/spec/examples/iso_216_.xml +0 -47
- data/spec/examples/iso_iec_12382_.xml +0 -48
- data/spec/examples/rice.adoc +0 -714
- data/spec/examples/rice.preview.html +0 -1870
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
- data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/ISO_1213_1.png +0 -0
- data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/amd_spec.rb +0 -986
- data/spec/isodoc/blocks_spec.rb +0 -1174
- data/spec/isodoc/i18n_spec.rb +0 -1579
- data/spec/isodoc/inline_spec.rb +0 -1060
- data/spec/isodoc/iso_spec.rb +0 -255
- data/spec/isodoc/metadata_spec.rb +0 -701
- data/spec/isodoc/postproc_spec.rb +0 -1089
- data/spec/isodoc/ref_spec.rb +0 -439
- data/spec/isodoc/section_spec.rb +0 -998
- data/spec/isodoc/table_spec.rb +0 -420
- data/spec/isodoc/terms_spec.rb +0 -314
- data/spec/isodoc/word_dis_spec.rb +0 -2064
- data/spec/isodoc/xref_spec.rb +0 -1747
- data/spec/metanorma/amd_spec.rb +0 -724
- data/spec/metanorma/base_spec.rb +0 -1384
- data/spec/metanorma/blank_spec.rb +0 -38
- data/spec/metanorma/blocks_spec.rb +0 -624
- data/spec/metanorma/cleanup_spec.rb +0 -1645
- data/spec/metanorma/inline_spec.rb +0 -203
- data/spec/metanorma/lists_spec.rb +0 -197
- data/spec/metanorma/macros_spec.rb +0 -99
- data/spec/metanorma/processor_spec.rb +0 -161
- data/spec/metanorma/refs_spec.rb +0 -672
- data/spec/metanorma/section_spec.rb +0 -492
- data/spec/metanorma/table_spec.rb +0 -329
- data/spec/metanorma/validate_spec.rb +0 -2153
- data/spec/relaton/render_spec.rb +0 -568
- data/spec/requirements/requirement_components_spec.rb +0 -610
- data/spec/requirements/requirements_spec.rb +0 -1596
- data/spec/requirements/xref_spec.rb +0 -1211
- data/spec/spec_helper.rb +0 -313
- data/spec/vcr_cassettes/docrels.yml +0 -385
- data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -10,23 +10,28 @@ module IsoDoc
|
|
10
10
|
def warning_for_missing_metadata(docxml)
|
11
11
|
return unless @meta.get[:unpublished]
|
12
12
|
|
13
|
+
ret = warning_for_missing_metadata_create(docxml)
|
14
|
+
return if ret.empty?
|
15
|
+
|
16
|
+
warning_for_missing_metadata_post(docxml, ret)
|
17
|
+
end
|
18
|
+
|
19
|
+
def warning_for_missing_metadata_create(docxml)
|
13
20
|
ret = ""
|
14
21
|
docxml.at(ns("//bibdata/ext//secretariat")) or
|
15
22
|
ret += "<p>Secretariat is missing.</p>"
|
16
23
|
docxml.at(ns("//bibdata/ext//editorialgroup")) or
|
17
24
|
ret += "<p>Editorial groups are missing.</p>"
|
18
|
-
docxml.at(ns("//bibdata/date[@type = 'published' or @type = 'issued' "\
|
25
|
+
docxml.at(ns("//bibdata/date[@type = 'published' or @type = 'issued' " \
|
19
26
|
"or @type = 'created']")) ||
|
20
27
|
docxml.at(ns("//bibdata/version/revision-date")) or
|
21
28
|
ret += "<p>Document date is missing.</p>"
|
22
|
-
|
23
|
-
|
24
|
-
warning_for_missing_metadata1(docxml, ret)
|
29
|
+
ret
|
25
30
|
end
|
26
31
|
|
27
|
-
def
|
32
|
+
def warning_for_missing_metadata_post(docxml, ret)
|
28
33
|
id = UUIDTools::UUID.random_create
|
29
|
-
ret = "<review date='#{Date.today}' reviewer='Metanorma' id='_#{id}'>"\
|
34
|
+
ret = "<review date='#{Date.today}' reviewer='Metanorma' id='_#{id}'>" \
|
30
35
|
"<p><strong>Metadata warnings:<strong></p> #{ret}</review>"
|
31
36
|
ins = docxml.at(ns("//sections//title")) or return
|
32
37
|
ins.children.first.previous = ret
|
@@ -65,9 +70,8 @@ module IsoDoc
|
|
65
70
|
i18n.get["stage_dict"][stage.text].is_a?(Hash) or
|
66
71
|
return hash_translate(bib, i18n.get["stage_dict"],
|
67
72
|
"./status/stage", lang)
|
68
|
-
i18n.get["stage_dict"][stage.text][type&.text] and
|
69
|
-
tag_translate(stage, lang,
|
70
|
-
i18n.get["stage_dict"][stage.text][type&.text])
|
73
|
+
stagetype = i18n.get["stage_dict"][stage.text][type&.text] and
|
74
|
+
tag_translate(stage, lang, stagetype)
|
71
75
|
end
|
72
76
|
end
|
73
77
|
end
|
@@ -76,9 +76,11 @@ module IsoDoc
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def clause(docxml)
|
79
|
-
docxml.xpath(ns("//clause[not(ancestor::annex)] | "\
|
80
|
-
"//terms | //definitions | //references | "\
|
79
|
+
docxml.xpath(ns("//clause[not(ancestor::annex)] | " \
|
80
|
+
"//terms | //definitions | //references | " \
|
81
81
|
"//preface/introduction[clause]")).each do |f|
|
82
|
+
f.parent.name == "annex" &&
|
83
|
+
@xrefs.klass.single_term_clause?(f.parent) and next
|
82
84
|
clause1(f)
|
83
85
|
end
|
84
86
|
end
|
@@ -133,7 +135,7 @@ module IsoDoc
|
|
133
135
|
i = display_order_at(docxml, "//clause[@type = 'scope']", i)
|
134
136
|
i = display_order_at(docxml, @xrefs.klass.norm_ref_xpath, i)
|
135
137
|
i = display_order_xpath(docxml,
|
136
|
-
"//sections/clause[not(@type = 'scope')] | "\
|
138
|
+
"//sections/clause[not(@type = 'scope')] | " \
|
137
139
|
"//sections/terms | //sections/definitions", i)
|
138
140
|
i = display_order_xpath(docxml, "//annex", i)
|
139
141
|
i = display_order_xpath(docxml, @xrefs.klass.bibliography_xpath, i)
|
@@ -17,9 +17,11 @@ module IsoDoc
|
|
17
17
|
init_dis(options)
|
18
18
|
end
|
19
19
|
|
20
|
-
def init_dis(
|
21
|
-
@wordtemplate =
|
22
|
-
|
20
|
+
def init_dis(opt)
|
21
|
+
@wordtemplate = opt[:isowordtemplate]
|
22
|
+
opt[:isowordbgstripcolor] ||= "true"
|
23
|
+
@dis = ::IsoDoc::Iso::WordDISConvert.new(opt)
|
24
|
+
@dis.bgstripcolor = opt[:isowordbgstripcolor]
|
23
25
|
end
|
24
26
|
|
25
27
|
def font_choice(options)
|
@@ -80,7 +82,7 @@ module IsoDoc
|
|
80
82
|
stage = @meta.get[:stage_int]
|
81
83
|
return if !stage.nil? && stage < 60
|
82
84
|
|
83
|
-
body.br **{ clear: "all", style: "page-break-before:left;"\
|
85
|
+
body.br **{ clear: "all", style: "page-break-before:left;" \
|
84
86
|
"mso-break-type:section-break" }
|
85
87
|
body.div **{ class: "colophon" } do |div|
|
86
88
|
end
|
@@ -10,7 +10,7 @@ module IsoDoc
|
|
10
10
|
admonition: "Admonition",
|
11
11
|
admonitiontitle: "AdmonitionTitle",
|
12
12
|
sourcetitle: "SourceTitle",
|
13
|
-
|
13
|
+
TableTitle: "Tabletitle",
|
14
14
|
titlepagesbhead: "TablePageSubhead",
|
15
15
|
NormRef: "RefNorm",
|
16
16
|
Biblio: "BiblioEntry",
|
@@ -43,11 +43,32 @@ module IsoDoc
|
|
43
43
|
example_style(docxml)
|
44
44
|
dis_style_interactions(docxml)
|
45
45
|
quote_style(docxml)
|
46
|
+
stripbgcolor(docxml)
|
47
|
+
end
|
48
|
+
|
49
|
+
def stripbgcolor(docxml)
|
50
|
+
@bgstripcolor == "true" or return
|
51
|
+
%w(aucollab audeg aufname aurole ausuffix ausurname bibarticle bibetal
|
52
|
+
bibfname bibfpage bibissue bibjournal biblpage bibnumber
|
53
|
+
biborganization bibsuppl bibsurname biburl bibvolume bibyear
|
54
|
+
citebib citeen citefig citefn citetbl bibextlink citeeq citetfn
|
55
|
+
auprefix citeapp citesec stddocNumber stddocPartNumber
|
56
|
+
stddocTitle aumember stdfootnote stdpublisher stdsection stdyear
|
57
|
+
stddocumentType bibalt-year bibbook bbichapterno bibchaptertitle
|
58
|
+
bibed-etal bibed-fname bibeditionno bibed-organization bibed-suffix
|
59
|
+
bibed-surname bibinstitution bibisbn biblocation bibpagecount
|
60
|
+
bibpatent bibpublisher bibreportnum bibschool bibseries bibseriesno
|
61
|
+
bibtrans stdsuppl citesection).each do |t|
|
62
|
+
docxml.xpath("//span[@class = '#{t}']").each do |s|
|
63
|
+
s["style"] ||= ""
|
64
|
+
s["style"] = "mso-pattern:none;#{s['style']}"
|
65
|
+
end
|
66
|
+
end
|
46
67
|
end
|
47
68
|
|
48
69
|
def dis_style_interactions(docxml)
|
49
|
-
docxml.xpath("//p[@class = 'Code' or @class = 'Code-' or "\
|
50
|
-
"@class = 'Code--']"\
|
70
|
+
docxml.xpath("//p[@class = 'Code' or @class = 'Code-' or " \
|
71
|
+
"@class = 'Code--']" \
|
51
72
|
"[following::p[@class = 'Examplecontinued']]").each do |p|
|
52
73
|
p["style"] ||= ""
|
53
74
|
p["style"] = "margin-bottom:12pt;#{p['style']}"
|
@@ -184,7 +205,7 @@ module IsoDoc
|
|
184
205
|
docxml.xpath("//p[@id = 'boilerplate-address']")&.each do |p|
|
185
206
|
p["class"] = "zzCopyright"
|
186
207
|
p["style"] = "text-indent:20.15pt;"
|
187
|
-
p.replace(p.to_xml.gsub(%r{<br/>}, "</p>\n<p class='zzCopyright' "\
|
208
|
+
p.replace(p.to_xml.gsub(%r{<br/>}, "</p>\n<p class='zzCopyright' " \
|
188
209
|
"style='text-indent:20.15pt;'>"))
|
189
210
|
end
|
190
211
|
docxml.xpath("//p[@class = 'zzCopyrightHdr']")&.each do |p|
|
@@ -219,12 +240,13 @@ module IsoDoc
|
|
219
240
|
end
|
220
241
|
end
|
221
242
|
|
222
|
-
def
|
223
|
-
|
243
|
+
def table_toc_class
|
244
|
+
["Table title", "Tabletitle", "Annex Table Title", "AnnexTableTitle"] +
|
245
|
+
super
|
224
246
|
end
|
225
247
|
|
226
|
-
def
|
227
|
-
|
248
|
+
def figure_toc_class
|
249
|
+
["Figure Title", "Annex Figure Title", "AnnexFigureTitle"] + super
|
228
250
|
end
|
229
251
|
end
|
230
252
|
end
|
@@ -3,6 +3,8 @@ require_relative "word_dis_cleanup"
|
|
3
3
|
module IsoDoc
|
4
4
|
module Iso
|
5
5
|
class WordDISConvert < WordConvert
|
6
|
+
attr_accessor :bgstripcolor
|
7
|
+
|
6
8
|
def default_file_locations(_options)
|
7
9
|
{ wordstylesheet: html_doc_path("wordstyle-dis.scss"),
|
8
10
|
standardstylesheet: html_doc_path("isodoc-dis.scss"),
|
@@ -19,7 +21,8 @@ module IsoDoc
|
|
19
21
|
super
|
20
22
|
end
|
21
23
|
|
22
|
-
def init_dis(
|
24
|
+
def init_dis(opt)
|
25
|
+
end
|
23
26
|
|
24
27
|
def convert1(docxml, filename, dir)
|
25
28
|
update_coverpage(docxml)
|
@@ -41,7 +44,7 @@ module IsoDoc
|
|
41
44
|
end
|
42
45
|
|
43
46
|
def table_title_attrs(_node)
|
44
|
-
{ class: "
|
47
|
+
{ class: "TableTitle", style: "text-align:center;" }
|
45
48
|
end
|
46
49
|
|
47
50
|
def span_parse(node, out)
|
data/lib/metanorma/iso/base.rb
CHANGED
@@ -30,7 +30,8 @@ module Metanorma
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def doc_extract_attributes(node)
|
33
|
-
super.merge(isowordtemplate: node.attr("iso-word-template")
|
33
|
+
super.merge(isowordtemplate: node.attr("iso-word-template"),
|
34
|
+
isowordbgstripcolor: node.attr("iso-word-bg-strip-color"))
|
34
35
|
end
|
35
36
|
|
36
37
|
def pdf_converter(node)
|
@@ -188,6 +188,11 @@
|
|
188
188
|
<value>adapter</value>
|
189
189
|
<value>translator</value>
|
190
190
|
<value>distributor</value>
|
191
|
+
<value>realizer</value>
|
192
|
+
<value>owner</value>
|
193
|
+
<value>authorizer</value>
|
194
|
+
<value>enabler</value>
|
195
|
+
<value>subject</value>
|
191
196
|
</choice>
|
192
197
|
</attribute>
|
193
198
|
<zeroOrMore>
|
@@ -177,11 +177,7 @@
|
|
177
177
|
</optional>
|
178
178
|
<optional>
|
179
179
|
<attribute name="style">
|
180
|
-
<
|
181
|
-
<value>basic</value>
|
182
|
-
<value>full</value>
|
183
|
-
<value>short</value>
|
184
|
-
</choice>
|
180
|
+
<ref name="XrefStyleType"/>
|
185
181
|
</attribute>
|
186
182
|
</optional>
|
187
183
|
<ref name="XrefBody"/>
|
@@ -1031,6 +1027,7 @@
|
|
1031
1027
|
<ref name="stem"/>
|
1032
1028
|
<ref name="index"/>
|
1033
1029
|
<ref name="eref"/>
|
1030
|
+
<ref name="erefstack"/>
|
1034
1031
|
<ref name="xref"/>
|
1035
1032
|
<ref name="hyperlink"/>
|
1036
1033
|
</choice>
|
@@ -1045,6 +1042,7 @@
|
|
1045
1042
|
<ref name="stem"/>
|
1046
1043
|
<ref name="index"/>
|
1047
1044
|
<ref name="eref"/>
|
1045
|
+
<ref name="erefstack"/>
|
1048
1046
|
<ref name="xref"/>
|
1049
1047
|
<ref name="hyperlink"/>
|
1050
1048
|
</choice>
|
@@ -1058,6 +1056,7 @@
|
|
1058
1056
|
<ref name="PureTextElement"/>
|
1059
1057
|
<ref name="index"/>
|
1060
1058
|
<ref name="eref"/>
|
1059
|
+
<ref name="erefstack"/>
|
1061
1060
|
<ref name="xref"/>
|
1062
1061
|
<ref name="hyperlink"/>
|
1063
1062
|
</choice>
|
@@ -1153,7 +1152,7 @@
|
|
1153
1152
|
<data type="boolean"/>
|
1154
1153
|
</attribute>
|
1155
1154
|
</optional>
|
1156
|
-
<ref name="
|
1155
|
+
<ref name="ReducedBibliographicItem"/>
|
1157
1156
|
</element>
|
1158
1157
|
</define>
|
1159
1158
|
<define name="image" combine="choice">
|
@@ -1195,6 +1194,7 @@
|
|
1195
1194
|
<ref name="add"/>
|
1196
1195
|
<ref name="del"/>
|
1197
1196
|
<ref name="span"/>
|
1197
|
+
<ref name="erefstack"/>
|
1198
1198
|
</choice>
|
1199
1199
|
</define>
|
1200
1200
|
<define name="add">
|
@@ -1202,6 +1202,7 @@
|
|
1202
1202
|
<choice>
|
1203
1203
|
<ref name="PureTextElement"/>
|
1204
1204
|
<ref name="eref"/>
|
1205
|
+
<ref name="erefstack"/>
|
1205
1206
|
<ref name="stem"/>
|
1206
1207
|
<ref name="keyword"/>
|
1207
1208
|
<ref name="xref"/>
|
@@ -1214,6 +1215,7 @@
|
|
1214
1215
|
<choice>
|
1215
1216
|
<ref name="PureTextElement"/>
|
1216
1217
|
<ref name="eref"/>
|
1218
|
+
<ref name="erefstack"/>
|
1217
1219
|
<ref name="stem"/>
|
1218
1220
|
<ref name="keyword"/>
|
1219
1221
|
<ref name="xref"/>
|
@@ -1278,6 +1280,7 @@
|
|
1278
1280
|
</optional>
|
1279
1281
|
<choice>
|
1280
1282
|
<ref name="eref"/>
|
1283
|
+
<ref name="erefstack"/>
|
1281
1284
|
<ref name="xref"/>
|
1282
1285
|
<ref name="termref"/>
|
1283
1286
|
</choice>
|
@@ -1970,6 +1973,7 @@
|
|
1970
1973
|
</element>
|
1971
1974
|
<choice>
|
1972
1975
|
<ref name="eref"/>
|
1976
|
+
<ref name="erefstack"/>
|
1973
1977
|
<ref name="xref"/>
|
1974
1978
|
<ref name="termref"/>
|
1975
1979
|
</choice>
|
@@ -2525,6 +2529,7 @@
|
|
2525
2529
|
<ref name="xref"/>
|
2526
2530
|
<ref name="hyperlink"/>
|
2527
2531
|
<ref name="eref"/>
|
2532
|
+
<ref name="erefstack"/>
|
2528
2533
|
</choice>
|
2529
2534
|
<oneOrMore>
|
2530
2535
|
<element name="coords">
|
@@ -2572,6 +2577,7 @@
|
|
2572
2577
|
<ref name="xref"/>
|
2573
2578
|
<ref name="hyperlink"/>
|
2574
2579
|
<ref name="eref"/>
|
2580
|
+
<ref name="erefstack"/>
|
2575
2581
|
</choice>
|
2576
2582
|
</element>
|
2577
2583
|
</zeroOrMore>
|
@@ -2620,6 +2626,15 @@
|
|
2620
2626
|
<ref name="PureTextElement"/>
|
2621
2627
|
</oneOrMore>
|
2622
2628
|
</define>
|
2629
|
+
<define name="XrefConnectiveType">
|
2630
|
+
<choice>
|
2631
|
+
<value>and</value>
|
2632
|
+
<value>or</value>
|
2633
|
+
<value>from</value>
|
2634
|
+
<value>to</value>
|
2635
|
+
<value/>
|
2636
|
+
</choice>
|
2637
|
+
</define>
|
2623
2638
|
<define name="XrefTarget">
|
2624
2639
|
<element name="location">
|
2625
2640
|
<attribute name="target">
|
@@ -2628,16 +2643,35 @@
|
|
2628
2643
|
</data>
|
2629
2644
|
</attribute>
|
2630
2645
|
<attribute name="connective">
|
2631
|
-
<
|
2632
|
-
<value>and</value>
|
2633
|
-
<value>or</value>
|
2634
|
-
<value>from</value>
|
2635
|
-
<value>to</value>
|
2636
|
-
<value/>
|
2637
|
-
</choice>
|
2646
|
+
<ref name="XrefConnectiveType"/>
|
2638
2647
|
</attribute>
|
2639
2648
|
</element>
|
2640
2649
|
</define>
|
2650
|
+
<define name="XrefStyleType">
|
2651
|
+
<choice>
|
2652
|
+
<value>basic</value>
|
2653
|
+
<value>full</value>
|
2654
|
+
<value>short</value>
|
2655
|
+
<value>id</value>
|
2656
|
+
</choice>
|
2657
|
+
</define>
|
2658
|
+
<define name="erefTypeWithConnective">
|
2659
|
+
<optional>
|
2660
|
+
<attribute name="connective">
|
2661
|
+
<ref name="XrefConnectiveType"/>
|
2662
|
+
</attribute>
|
2663
|
+
</optional>
|
2664
|
+
<ref name="erefType"/>
|
2665
|
+
</define>
|
2666
|
+
<define name="erefstack">
|
2667
|
+
<element name="erefstack">
|
2668
|
+
<oneOrMore>
|
2669
|
+
<element name="eref">
|
2670
|
+
<ref name="erefTypeWithConnective"/>
|
2671
|
+
</element>
|
2672
|
+
</oneOrMore>
|
2673
|
+
</element>
|
2674
|
+
</define>
|
2641
2675
|
<start>
|
2642
2676
|
<ref name="standard-document"/>
|
2643
2677
|
</start>
|
@@ -36,10 +36,10 @@ module Metanorma
|
|
36
36
|
/\b(see| refer to)\s*\Z/mi.match(preceding)
|
37
37
|
|
38
38
|
(target = root.at("//*[@id = '#{t['target']}']")) || next
|
39
|
-
|
39
|
+
target.at("./ancestor-or-self::*[@obligation = 'normative']") &&
|
40
|
+
!target.at("./ancestor::sections") and
|
40
41
|
@log.add("Style", t,
|
41
42
|
"'see #{t['target']}' is pointing to a normative section")
|
42
|
-
end
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
data/metanorma-iso.gemspec
CHANGED
@@ -25,9 +25,12 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.bindir = "bin"
|
27
27
|
spec.require_paths = ["lib"]
|
28
|
-
spec.files = `git ls-files`.split("\
|
28
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
29
|
+
f.match(%r{^(test|spec|features|bin|.github)/}) \
|
30
|
+
|| f.match(%r{Rakefile|bin/rspec})
|
31
|
+
end
|
29
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
30
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
33
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
31
34
|
|
32
35
|
spec.add_dependency "metanorma-standoc", "~> 2.2.4"
|
33
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -289,10 +289,6 @@ extensions: []
|
|
289
289
|
extra_rdoc_files: []
|
290
290
|
files:
|
291
291
|
- ".gitattributes"
|
292
|
-
- ".github/workflows/automerge.yml"
|
293
|
-
- ".github/workflows/rake.yml"
|
294
|
-
- ".github/workflows/release.yml"
|
295
|
-
- ".github/workflows/ubuntu.yml"
|
296
292
|
- ".gitignore"
|
297
293
|
- ".hound.yml"
|
298
294
|
- ".oss-guides.rubocop.yml"
|
@@ -303,8 +299,6 @@ files:
|
|
303
299
|
- LICENSE
|
304
300
|
- Makefile
|
305
301
|
- README.adoc
|
306
|
-
- Rakefile
|
307
|
-
- bin/rspec
|
308
302
|
- lib/asciidoctor/iso/base.rb
|
309
303
|
- lib/asciidoctor/iso/cleanup.rb
|
310
304
|
- lib/asciidoctor/iso/converter.rb
|
@@ -402,83 +396,6 @@ files:
|
|
402
396
|
- lib/relaton/render/config.yml
|
403
397
|
- lib/relaton/render/general.rb
|
404
398
|
- metanorma-iso.gemspec
|
405
|
-
- spec/assets/header.html
|
406
|
-
- spec/assets/html.css
|
407
|
-
- spec/assets/htmlcover.html
|
408
|
-
- spec/assets/htmlintro.html
|
409
|
-
- spec/assets/i18n.yaml
|
410
|
-
- spec/assets/iso.adoc
|
411
|
-
- spec/assets/iso.headless.html
|
412
|
-
- spec/assets/iso.xml
|
413
|
-
- spec/assets/rice_image1.png
|
414
|
-
- spec/assets/scripts.html
|
415
|
-
- spec/assets/std.css
|
416
|
-
- spec/assets/word.css
|
417
|
-
- spec/assets/wordcover.html
|
418
|
-
- spec/assets/wordintro.html
|
419
|
-
- spec/examples/103_01_02.html
|
420
|
-
- spec/examples/english.yaml
|
421
|
-
- spec/examples/iso_123_.xml
|
422
|
-
- spec/examples/iso_123_all_parts.xml
|
423
|
-
- spec/examples/iso_123_no_year_note.xml
|
424
|
-
- spec/examples/iso_124_.xml
|
425
|
-
- spec/examples/iso_216_.xml
|
426
|
-
- spec/examples/iso_iec_12382_.xml
|
427
|
-
- spec/examples/rice.adoc
|
428
|
-
- spec/examples/rice.preview.html
|
429
|
-
- spec/examples/rice.sh
|
430
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig1a.png
|
431
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig1b.png
|
432
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig2.png
|
433
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig3.png
|
434
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig4.png
|
435
|
-
- spec/examples/rice_img/1000-1_ed2amd3fig5_f.png
|
436
|
-
- spec/examples/rice_img/1000-1_ed2amd3figA.png
|
437
|
-
- spec/examples/rice_img/1000-1_ed2amd3figA1.png
|
438
|
-
- spec/examples/rice_img/1000-1_ed2amd3figA2.png
|
439
|
-
- spec/examples/rice_img/1000-1_ed2amd3figTab1.png
|
440
|
-
- spec/examples/rice_img/1000-1_ed2amd3figTab2.png
|
441
|
-
- spec/examples/rice_img/1001_ed2amd3fig1.png
|
442
|
-
- spec/examples/rice_img/ISO_1213_1.png
|
443
|
-
- spec/examples/rice_img/SL1000-1_ed2amd3fig1.png
|
444
|
-
- spec/examples/rice_img/rice_image1.png
|
445
|
-
- spec/examples/rice_img/rice_image2.png
|
446
|
-
- spec/examples/rice_img/rice_image3_1.png
|
447
|
-
- spec/examples/rice_img/rice_image3_2.png
|
448
|
-
- spec/examples/rice_img/rice_image3_3.png
|
449
|
-
- spec/isodoc/amd_spec.rb
|
450
|
-
- spec/isodoc/blocks_spec.rb
|
451
|
-
- spec/isodoc/i18n_spec.rb
|
452
|
-
- spec/isodoc/inline_spec.rb
|
453
|
-
- spec/isodoc/iso_spec.rb
|
454
|
-
- spec/isodoc/metadata_spec.rb
|
455
|
-
- spec/isodoc/postproc_spec.rb
|
456
|
-
- spec/isodoc/ref_spec.rb
|
457
|
-
- spec/isodoc/section_spec.rb
|
458
|
-
- spec/isodoc/table_spec.rb
|
459
|
-
- spec/isodoc/terms_spec.rb
|
460
|
-
- spec/isodoc/word_dis_spec.rb
|
461
|
-
- spec/isodoc/xref_spec.rb
|
462
|
-
- spec/metanorma/amd_spec.rb
|
463
|
-
- spec/metanorma/base_spec.rb
|
464
|
-
- spec/metanorma/blank_spec.rb
|
465
|
-
- spec/metanorma/blocks_spec.rb
|
466
|
-
- spec/metanorma/cleanup_spec.rb
|
467
|
-
- spec/metanorma/inline_spec.rb
|
468
|
-
- spec/metanorma/lists_spec.rb
|
469
|
-
- spec/metanorma/macros_spec.rb
|
470
|
-
- spec/metanorma/processor_spec.rb
|
471
|
-
- spec/metanorma/refs_spec.rb
|
472
|
-
- spec/metanorma/section_spec.rb
|
473
|
-
- spec/metanorma/table_spec.rb
|
474
|
-
- spec/metanorma/validate_spec.rb
|
475
|
-
- spec/relaton/render_spec.rb
|
476
|
-
- spec/requirements/requirement_components_spec.rb
|
477
|
-
- spec/requirements/requirements_spec.rb
|
478
|
-
- spec/requirements/xref_spec.rb
|
479
|
-
- spec/spec_helper.rb
|
480
|
-
- spec/vcr_cassettes/docrels.yml
|
481
|
-
- spec/vcr_cassettes/withdrawn_iso.yml
|
482
399
|
homepage: https://github.com/metanorma/metanorma-iso
|
483
400
|
licenses:
|
484
401
|
- BSD-2-Clause
|
@@ -491,14 +408,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
491
408
|
requirements:
|
492
409
|
- - ">="
|
493
410
|
- !ruby/object:Gem::Version
|
494
|
-
version: 2.
|
411
|
+
version: 2.7.0
|
495
412
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
496
413
|
requirements:
|
497
414
|
- - ">="
|
498
415
|
- !ruby/object:Gem::Version
|
499
416
|
version: '0'
|
500
417
|
requirements: []
|
501
|
-
rubygems_version: 3.
|
418
|
+
rubygems_version: 3.3.7
|
502
419
|
signing_key:
|
503
420
|
specification_version: 4
|
504
421
|
summary: metanorma-iso lets you write ISO standards in AsciiDoc.
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
# source: https://github.com/marketplace/actions/merge-pull-requests#usage
|
4
|
-
name: automerge
|
5
|
-
on:
|
6
|
-
pull_request:
|
7
|
-
types:
|
8
|
-
- labeled
|
9
|
-
- unlabeled
|
10
|
-
- synchronize
|
11
|
-
- opened
|
12
|
-
- edited
|
13
|
-
- ready_for_review
|
14
|
-
- reopened
|
15
|
-
- unlocked
|
16
|
-
pull_request_review:
|
17
|
-
types:
|
18
|
-
- submitted
|
19
|
-
check_suite:
|
20
|
-
types:
|
21
|
-
- completed
|
22
|
-
status: {}
|
23
|
-
jobs:
|
24
|
-
automerge:
|
25
|
-
runs-on: ubuntu-latest
|
26
|
-
steps:
|
27
|
-
- id: automerge
|
28
|
-
name: automerge
|
29
|
-
uses: "pascalgn/automerge-action@v0.15.3"
|
30
|
-
env:
|
31
|
-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
data/.github/workflows/rake.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: rake
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master, main ]
|
8
|
-
tags: [ v* ]
|
9
|
-
pull_request:
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
rake:
|
13
|
-
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
14
|
-
secrets:
|
15
|
-
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: release
|
4
|
-
|
5
|
-
on:
|
6
|
-
workflow_dispatch:
|
7
|
-
inputs:
|
8
|
-
next_version:
|
9
|
-
description: |
|
10
|
-
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
11
|
-
required: true
|
12
|
-
default: 'skip'
|
13
|
-
push:
|
14
|
-
tags: [ v* ]
|
15
|
-
|
16
|
-
jobs:
|
17
|
-
release:
|
18
|
-
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
19
|
-
with:
|
20
|
-
next_version: ${{ github.event.inputs.next_version }}
|
21
|
-
secrets:
|
22
|
-
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
|
23
|
-
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
24
|
-
|
@@ -1,41 +0,0 @@
|
|
1
|
-
name: ubuntu
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
build:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
|
15
|
-
- name: Setup prerequisites
|
16
|
-
run: |
|
17
|
-
sudo apt-get update
|
18
|
-
sudo apt-get -y install xsltproc
|
19
|
-
|
20
|
-
- run: make xsd_doc
|
21
|
-
env:
|
22
|
-
GITHUB_USERNAME: ${{ github.actor }}
|
23
|
-
GITHUB_TOKEN: ${{ github.token }}
|
24
|
-
|
25
|
-
- uses: actions/upload-artifact@master
|
26
|
-
with:
|
27
|
-
name: xsd_doc
|
28
|
-
path: xsd_doc
|
29
|
-
|
30
|
-
deploy-gh-pages:
|
31
|
-
if: github.ref == 'refs/heads/main'
|
32
|
-
runs-on: ubuntu-latest
|
33
|
-
needs: build
|
34
|
-
steps:
|
35
|
-
- uses: actions/checkout@master
|
36
|
-
|
37
|
-
- uses: actions/download-artifact@master
|
38
|
-
with:
|
39
|
-
name: xsd_doc
|
40
|
-
path: xsd_doc
|
41
|
-
|