metanorma-iso 2.2.4 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/lib/isodoc/iso/base_convert.rb +9 -3
- data/lib/isodoc/iso/html/isodoc-dis.css +4 -4
- data/lib/isodoc/iso/html/isodoc-dis.scss +4 -4
- data/lib/isodoc/iso/html/isodoc.css +4 -4
- data/lib/isodoc/iso/html/isodoc.scss +4 -4
- data/lib/isodoc/iso/html_convert.rb +1 -1
- data/lib/isodoc/iso/index.rb +2 -2
- data/lib/isodoc/iso/init.rb +12 -1
- data/lib/isodoc/iso/iso.amendment.xsl +300 -227
- data/lib/isodoc/iso/iso.international-standard.xsl +300 -227
- data/lib/isodoc/iso/isosts_convert.rb +8 -3
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -5
- data/lib/isodoc/iso/presentation_xref.rb +23 -21
- data/lib/isodoc/iso/word_cleanup.rb +4 -0
- data/lib/isodoc/iso/word_convert.rb +1 -1
- data/lib/isodoc/iso/word_dis_cleanup.rb +7 -3
- data/lib/isodoc/iso/word_dis_convert.rb +1 -7
- data/lib/isodoc/iso/xref.rb +13 -9
- data/lib/isodoc/iso/xref_section.rb +3 -4
- data/lib/metanorma/iso/basicdoc.rng +3 -0
- data/lib/metanorma/iso/biblio-standoc.rng +1 -1
- data/lib/metanorma/iso/isodoc.rng +11 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma/requirements/modspec.rb +3 -54
- data/lib/relaton/render/config.yml +1 -0
- data/metanorma-iso.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d83fb927cb8bc71790dd2b644f00ef5e55605fc0a4c12865b406f3107c29e365
|
4
|
+
data.tar.gz: 19ee55451fd8f24e839fd23a0aea32d0927fb20ebccaa75b045f82113eac3b57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e861221a56a29ab07d1d47516fb39d13626f2c6cb844783c2030b38a5be4f3f04a4a1ca6d55855eb9f1fc2dc4f772b10f089bd96ae91b741b85f865d4bdba9
|
7
|
+
data.tar.gz: b987964c53cee70a3fa4fffa4487fa9e89e3e1bc4d3358928f661c72dd59f462d0148a1a45ef401fa4bad29b8141b55fe38c1f0589685c0699e4f1eedcec9fc9
|
data/.gitignore
CHANGED
@@ -88,9 +88,9 @@ module IsoDoc
|
|
88
88
|
|
89
89
|
def formula_where(dlist, out)
|
90
90
|
return if dlist.nil?
|
91
|
-
return super unless dlist
|
92
|
-
dlist
|
93
|
-
dlist
|
91
|
+
return super unless dlist.xpath(ns("./dt"))&.size == 1 &&
|
92
|
+
dlist.at(ns("./dd"))&.elements&.size == 1 &&
|
93
|
+
dlist.at(ns("./dd/p"))
|
94
94
|
|
95
95
|
out.span **{ class: "zzMoveToFollowing" } do |s|
|
96
96
|
s << "#{@i18n.where} "
|
@@ -187,6 +187,12 @@ module IsoDoc
|
|
187
187
|
def ol_attrs(node)
|
188
188
|
super.merge(start: node["start"]).compact
|
189
189
|
end
|
190
|
+
|
191
|
+
def render_identifier(ident)
|
192
|
+
ret = super
|
193
|
+
ret[:sdo] = std_docid_semantic(ret[:sdo])
|
194
|
+
ret
|
195
|
+
end
|
190
196
|
end
|
191
197
|
end
|
192
198
|
end
|
@@ -220,7 +220,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle {
|
|
220
220
|
text-align: center;
|
221
221
|
text-indent: 0cm;
|
222
222
|
line-height: 12.0pt;
|
223
|
-
page-break-before:
|
223
|
+
/*page-break-before:always;*/
|
224
224
|
mso-pagination: widow-orphan;
|
225
225
|
page-break-after: avoid;
|
226
226
|
/* mso-list:l4 level1 lfo15; */
|
@@ -246,7 +246,7 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
|
|
246
246
|
text-align: center;
|
247
247
|
text-indent: 0cm;
|
248
248
|
line-height: 12.0pt;
|
249
|
-
page-break-before:
|
249
|
+
/*page-break-before:always;*/
|
250
250
|
mso-pagination: widow-orphan;
|
251
251
|
page-break-after: avoid;
|
252
252
|
/* mso-list:l4 level1 lfo15; */
|
@@ -272,7 +272,7 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
|
|
272
272
|
text-align: center;
|
273
273
|
text-indent: 0cm;
|
274
274
|
line-height: 12.0pt;
|
275
|
-
page-break-before:
|
275
|
+
/*page-break-before:always;*/
|
276
276
|
mso-pagination: widow-orphan;
|
277
277
|
page-break-after: avoid;
|
278
278
|
/* mso-list:l4 level1 lfo15; */
|
@@ -301,7 +301,7 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
|
|
301
301
|
text-align: center;
|
302
302
|
text-indent: 0cm;
|
303
303
|
line-height: 12.0pt;
|
304
|
-
page-break-before:
|
304
|
+
/*page-break-before:always;*/
|
305
305
|
mso-pagination: widow-orphan;
|
306
306
|
page-break-after: avoid;
|
307
307
|
/* mso-list:l4 level1 lfo15; */
|
@@ -209,7 +209,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle
|
|
209
209
|
text-align:center;
|
210
210
|
text-indent:0cm;
|
211
211
|
line-height:12.0pt;
|
212
|
-
page-break-before:always
|
212
|
+
/*page-break-before:always;*/
|
213
213
|
mso-pagination:widow-orphan;
|
214
214
|
page-break-after:avoid;
|
215
215
|
/* mso-list:l4 level1 lfo15; */
|
@@ -234,7 +234,7 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
|
|
234
234
|
text-align:center;
|
235
235
|
text-indent:0cm;
|
236
236
|
line-height:12.0pt;
|
237
|
-
page-break-before:always
|
237
|
+
/*page-break-before:always;*/
|
238
238
|
mso-pagination:widow-orphan;
|
239
239
|
page-break-after:avoid;
|
240
240
|
/* mso-list:l4 level1 lfo15; */
|
@@ -259,7 +259,7 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
|
|
259
259
|
text-align:center;
|
260
260
|
text-indent:0cm;
|
261
261
|
line-height:12.0pt;
|
262
|
-
page-break-before:always
|
262
|
+
/*page-break-before:always;*/
|
263
263
|
mso-pagination:widow-orphan;
|
264
264
|
page-break-after:avoid;
|
265
265
|
/* mso-list:l4 level1 lfo15; */
|
@@ -287,7 +287,7 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
|
|
287
287
|
text-align:center;
|
288
288
|
text-indent:0cm;
|
289
289
|
line-height:12.0pt;
|
290
|
-
page-break-before:always
|
290
|
+
/*page-break-before:always;*/
|
291
291
|
mso-pagination:widow-orphan;
|
292
292
|
page-break-after:avoid;
|
293
293
|
/* mso-list:l4 level1 lfo15; */
|
@@ -217,7 +217,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle {
|
|
217
217
|
text-align: center;
|
218
218
|
text-indent: 0cm;
|
219
219
|
line-height: 12.0pt;
|
220
|
-
page-break-before:
|
220
|
+
/*page-break-before:always;*/
|
221
221
|
mso-pagination: widow-orphan;
|
222
222
|
page-break-after: avoid;
|
223
223
|
/* mso-list:l4 level1 lfo15; */
|
@@ -243,7 +243,7 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
|
|
243
243
|
text-align: center;
|
244
244
|
text-indent: 0cm;
|
245
245
|
line-height: 12.0pt;
|
246
|
-
page-break-before:
|
246
|
+
/*page-break-before:always;*/
|
247
247
|
mso-pagination: widow-orphan;
|
248
248
|
page-break-after: avoid;
|
249
249
|
/* mso-list:l4 level1 lfo15; */
|
@@ -269,7 +269,7 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
|
|
269
269
|
text-align: center;
|
270
270
|
text-indent: 0cm;
|
271
271
|
line-height: 12.0pt;
|
272
|
-
page-break-before:
|
272
|
+
/*page-break-before:always;*/
|
273
273
|
mso-pagination: widow-orphan;
|
274
274
|
page-break-after: avoid;
|
275
275
|
/* mso-list:l4 level1 lfo15; */
|
@@ -298,7 +298,7 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
|
|
298
298
|
text-align: center;
|
299
299
|
text-indent: 0cm;
|
300
300
|
line-height: 12.0pt;
|
301
|
-
page-break-before:
|
301
|
+
/*page-break-before:always;*/
|
302
302
|
mso-pagination: widow-orphan;
|
303
303
|
page-break-after: avoid;
|
304
304
|
/* mso-list:l4 level1 lfo15; */
|
@@ -207,7 +207,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle
|
|
207
207
|
text-align:center;
|
208
208
|
text-indent:0cm;
|
209
209
|
line-height:12.0pt;
|
210
|
-
page-break-before:always
|
210
|
+
/*page-break-before:always;*/
|
211
211
|
mso-pagination:widow-orphan;
|
212
212
|
page-break-after:avoid;
|
213
213
|
/* mso-list:l4 level1 lfo15; */
|
@@ -232,7 +232,7 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
|
|
232
232
|
text-align:center;
|
233
233
|
text-indent:0cm;
|
234
234
|
line-height:12.0pt;
|
235
|
-
page-break-before:always
|
235
|
+
/*page-break-before:always;*/
|
236
236
|
mso-pagination:widow-orphan;
|
237
237
|
page-break-after:avoid;
|
238
238
|
/* mso-list:l4 level1 lfo15; */
|
@@ -257,7 +257,7 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
|
|
257
257
|
text-align:center;
|
258
258
|
text-indent:0cm;
|
259
259
|
line-height:12.0pt;
|
260
|
-
page-break-before:always
|
260
|
+
/*page-break-before:always;*/
|
261
261
|
mso-pagination:widow-orphan;
|
262
262
|
page-break-after:avoid;
|
263
263
|
/* mso-list:l4 level1 lfo15; */
|
@@ -285,7 +285,7 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
|
|
285
285
|
text-align:center;
|
286
286
|
text-indent:0cm;
|
287
287
|
line-height:12.0pt;
|
288
|
-
page-break-before:always
|
288
|
+
/*page-break-before:always;*/
|
289
289
|
mso-pagination:widow-orphan;
|
290
290
|
page-break-after:avoid;
|
291
291
|
/* mso-list:l4 level1 lfo15; */
|
@@ -58,7 +58,7 @@ module IsoDoc
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def html_toc_entry(level, header)
|
61
|
-
content = header.at("./following-sibling::p"\
|
61
|
+
content = header.at("./following-sibling::p" \
|
62
62
|
"[@class = 'variant-title-toc']") || header
|
63
63
|
if level == "h1" &&
|
64
64
|
header.parent.at(".//h2#{toc_exclude_class}")
|
data/lib/isodoc/iso/index.rb
CHANGED
@@ -127,7 +127,7 @@ module IsoDoc
|
|
127
127
|
terms.each_with_object(val) do |t, v|
|
128
128
|
term, term2, term3 = extract_indexterms_init(t)
|
129
129
|
term_hash_init(v, term, term2, term3, label)
|
130
|
-
v[term][term2][term3][label] << t
|
130
|
+
v[term][term2][term3][label] << to_xml(t.at(ns("./target"))&.children)
|
131
131
|
t.remove
|
132
132
|
end
|
133
133
|
end
|
@@ -154,7 +154,7 @@ module IsoDoc
|
|
154
154
|
|
155
155
|
def extract_indexterms_init(term)
|
156
156
|
%w(primary secondary tertiary).each_with_object([]) do |x, m|
|
157
|
-
m << term
|
157
|
+
m << to_xml(term.at(ns("./#{x}"))&.children)
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
data/lib/isodoc/iso/init.rb
CHANGED
@@ -34,9 +34,20 @@ module IsoDoc
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def std_docid_semantic(id)
|
37
|
-
|
37
|
+
id.nil? and return nil
|
38
|
+
ret = Nokogiri::XML.fragment(id)
|
39
|
+
ret.traverse do |x|
|
40
|
+
x.text? or next
|
41
|
+
x.replace(std_docid_semantic1(x.text))
|
42
|
+
end
|
43
|
+
to_xml(ret)
|
44
|
+
end
|
38
45
|
|
46
|
+
def std_docid_semantic1(id)
|
39
47
|
ids = id.split(/ /)
|
48
|
+
%w(ISO IEC ITU IETF NIST OGC IEEE BIPM BSI IANA UN W3C IEV)
|
49
|
+
.include?(ids[0].sub(/\/.*$/, "")) or
|
50
|
+
return id
|
40
51
|
ids.map! do |i|
|
41
52
|
if %w(GUIDE TR TS DIR).include?(i)
|
42
53
|
"<span class='stddocNumber'>#{i}</span>"
|