metanorma-iso 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +1 -0
- data/lib/asciidoctor/iso/isostandard.rng +8 -0
- data/lib/asciidoctor/iso/validate_section.rb +0 -19
- data/lib/isodoc/iso/html/html_iso_titlepage.html +6 -2
- data/lib/isodoc/iso/html/scripts.html +0 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +2 -2
- data/lib/isodoc/iso/metadata.rb +2 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/assets/iso.doc +8 -8
- data/spec/assets/iso.html +1 -2
- data/spec/examples/rice.adoc +1 -1
- data/spec/examples/rice.preview.html +1 -1
- data/spec/isodoc/metadata_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 291654144418257ce85f6e706e00aef3bf5b3f94c756d1dab58a4ab367778324
|
4
|
+
data.tar.gz: 55b5b74fab210b29de23d0fbbaec7c686186cfdc4fe69bb30a5e9eff820dbe31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 458f173ae5efb03bcde539daea3939f493d7e3cef5f0bd1bc9d8ddb6f9812172341c45666d8c55a203a5095f55eec3e55b10536d746632cd12256fda08e80e7e
|
7
|
+
data.tar.gz: bd7dcbc1efa5949bbc42bb0933ff913128e2a101862846e076f8adf9ba50371924e028505fee8e15384deba48e03f484850cce6e83575ddbc314f07f3dc61a83
|
data/README.adoc
CHANGED
@@ -160,6 +160,7 @@ For automated bibliography integration, see the https://github.com/riboseinc/met
|
|
160
160
|
|
161
161
|
The gem uses the document attributes defined for metanorma-standoc (see
|
162
162
|
the https://github.com/riboseinc/metanorma-model-standoc/blob/master/README.adoc[metanorma-standoc README]).
|
163
|
+
|
163
164
|
The following document attributes are specific to ISO:
|
164
165
|
|
165
166
|
`:tc-docnumber:`:: The document number assigned by the Technical committee
|
@@ -744,6 +744,9 @@
|
|
744
744
|
</define>
|
745
745
|
<define name="preface">
|
746
746
|
<element name="preface">
|
747
|
+
<optional>
|
748
|
+
<ref name="preface_abstract"/>
|
749
|
+
</optional>
|
747
750
|
<ref name="foreword"/>
|
748
751
|
<optional>
|
749
752
|
<ref name="introduction"/>
|
@@ -811,6 +814,11 @@
|
|
811
814
|
</optional>
|
812
815
|
</element>
|
813
816
|
</define>
|
817
|
+
<define name="preface_abstract">
|
818
|
+
<element name="abstract">
|
819
|
+
<ref name="Basic-Section"/>
|
820
|
+
</element>
|
821
|
+
</define>
|
814
822
|
<define name="foreword">
|
815
823
|
<element name="foreword">
|
816
824
|
<ref name="Basic-Section"/>
|
@@ -160,16 +160,6 @@ module Asciidoctor
|
|
160
160
|
scope.nil? || style_warning(scope, SCOPE_WARN, nil)
|
161
161
|
end
|
162
162
|
|
163
|
-
def sourcecode_style(root)
|
164
|
-
root.xpath("//sourcecode").each do |x|
|
165
|
-
callouts = x.elements.select { |e| e.name == "callout" }
|
166
|
-
annotations = x.elements.select { |e| e.name == "annotation" }
|
167
|
-
if callouts.size != annotations.size
|
168
|
-
warn "#{x['id']}: mismatch of callouts and annotations"
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
163
|
ASSETS_TO_STYLE =
|
174
164
|
"//termsource | //formula | //termnote | //p | //li[not(p)] | "\
|
175
165
|
"//dt | //dd[not(p)] | //td[not(p)] | //th[not(p)]".freeze
|
@@ -177,15 +167,6 @@ module Asciidoctor
|
|
177
167
|
NORM_BIBITEMS =
|
178
168
|
"//references[title = 'Normative References']/bibitem".freeze
|
179
169
|
|
180
|
-
def asset_title_style(root)
|
181
|
-
root.xpath("//figure[image][not(name)]").each do |node|
|
182
|
-
style_warning(node, "Figure should have title", nil)
|
183
|
-
end
|
184
|
-
root.xpath("//table[not(name)]").each do |node|
|
185
|
-
style_warning(node, "Table should have title", nil)
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
170
|
def norm_bibitem_style(root)
|
190
171
|
root.xpath(NORM_BIBITEMS).each do |b|
|
191
172
|
if b.at(Standoc::Converter::ISO_PUBLISHER_XPATH).nil?
|
@@ -22,9 +22,13 @@ name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
|
|
22
22
|
|
23
23
|
<div class="doctitle-fr"><span class="title">{{ docsubtitleintro }}</span> <span class="subtitle">{{ docsubtitlemain }}</span> <span class="part">{{ docsubtitlepart }}</span></div>
|
24
24
|
|
25
|
-
<div class="coverpage_docstage"
|
25
|
+
<div class="coverpage_docstage">
|
26
|
+
{% if unpublished %}
|
27
|
+
<p>{{ stageabbr }} stage</p>
|
28
|
+
{% endif %}
|
29
|
+
</div>
|
26
30
|
|
27
|
-
{% if
|
31
|
+
{% if unpublished %}
|
28
32
|
<div class="coverpage_warning">
|
29
33
|
|
30
34
|
<p>Warning for WDs
|
@@ -33,13 +33,13 @@ margin-left:4.25pt;margin-right:4.25pt'>
|
|
33
33
|
|
34
34
|
<p class="MsoNormal" align="center" style='text-align:center;border:none;
|
35
35
|
mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
|
36
|
-
lang="EN-GB" style='font-size:40.0pt'>{{ stageabbr }} stage<o:p></o:p></span></p>
|
36
|
+
lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ stageabbr }} stage{% endif %}<o:p></o:p></span></p>
|
37
37
|
|
38
38
|
</div>
|
39
39
|
|
40
40
|
<p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p> </o:p></span></p>
|
41
41
|
|
42
|
-
{% if
|
42
|
+
{% if unpublished %}
|
43
43
|
|
44
44
|
<div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
|
45
45
|
mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
|
data/lib/isodoc/iso/metadata.rb
CHANGED
@@ -29,9 +29,11 @@ module IsoDoc
|
|
29
29
|
|
30
30
|
def docstatus(isoxml, _out)
|
31
31
|
docstatus = isoxml.at(ns("//bibdata/status/stage"))
|
32
|
+
set(:unpublished, false)
|
32
33
|
if docstatus
|
33
34
|
set(:stage, docstatus.text)
|
34
35
|
set(:stage_int, docstatus.text.to_i)
|
36
|
+
set(:unpublished, docstatus.text.to_i > 0 && docstatus.text.to_i < 60)
|
35
37
|
abbr = stage_abbrev(docstatus.text, isoxml&.at(ns("//bibdata/status/iteration"))&.text,
|
36
38
|
isoxml&.at(ns("//version/draft"))&.text)
|
37
39
|
set(:stageabbr, abbr)
|
data/spec/assets/iso.doc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
MIME-Version: 1.0
|
2
|
-
Content-Type: multipart/related; boundary="----=
|
2
|
+
Content-Type: multipart/related; boundary="----=_NextPart_0262872e.6d12.4917"
|
3
3
|
|
4
|
-
------=
|
4
|
+
------=_NextPart_0262872e.6d12.4917
|
5
5
|
Content-Location: file:///C:/Doc/iso.htm
|
6
6
|
Content-Type: text/html; charset="utf-8"
|
7
7
|
|
@@ -780,7 +780,7 @@ span.note_label, span.example_label, td.example_label, td.note_label {
|
|
780
780
|
|
781
781
|
<div style="mso-element:para-border-div;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt; margin-left:4.25pt;margin-right:4.25pt">
|
782
782
|
|
783
|
-
<p class="MsoNormal" align="center" style="text-align:center;border:none; mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt"><span lang="EN-GB" style="font-size:40.0pt" xml:lang="EN-GB"
|
783
|
+
<p class="MsoNormal" align="center" style="text-align:center;border:none; mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt"><span lang="EN-GB" style="font-size:40.0pt" xml:lang="EN-GB"><p class="MsoNormal"></p></span></p>
|
784
784
|
|
785
785
|
</div>
|
786
786
|
|
@@ -834,11 +834,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
834
834
|
<p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes"> </span>TOC
|
835
835
|
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
|
836
836
|
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
837
|
-
<a href="#
|
837
|
+
<a href="#_Toc987694138">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
838
838
|
<span style="mso-tab-count:1 dotted">. </span>
|
839
839
|
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
840
840
|
<span style="mso-element:field-begin"></span></span>
|
841
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF
|
841
|
+
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc987694138 \h </span>
|
842
842
|
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
|
843
843
|
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>
|
844
844
|
|
@@ -871,7 +871,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
871
871
|
</html>
|
872
872
|
|
873
873
|
|
874
|
-
------=
|
874
|
+
------=_NextPart_0262872e.6d12.4917
|
875
875
|
Content-Location: file:///C:/Doc/iso_files/filelist.xml
|
876
876
|
Content-Transfer-Encoding: base64
|
877
877
|
Content-Type: application/xml
|
@@ -881,7 +881,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
|
|
881
881
|
bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
|
882
882
|
L3htbD4K
|
883
883
|
|
884
|
-
------=
|
884
|
+
------=_NextPart_0262872e.6d12.4917
|
885
885
|
Content-Location: file:///C:/Doc/iso_files/header.html
|
886
886
|
Content-Transfer-Encoding: base64
|
887
887
|
Content-Type: text/html charset="utf-8"
|
@@ -1074,4 +1074,4 @@ cD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQtc2l6
|
|
1074
1074
|
ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpwPjwv
|
1075
1075
|
bzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=
|
1076
1076
|
|
1077
|
-
------=
|
1077
|
+
------=_NextPart_0262872e.6d12.4917--
|
data/spec/assets/iso.html
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
<div class="doctitle-fr"><span class="title"></span> <span class="subtitle"></span> <span class="part"></span></div>
|
39
39
|
|
40
40
|
<div class="coverpage_docstage">
|
41
|
-
|
41
|
+
|
42
42
|
</div>
|
43
43
|
|
44
44
|
|
@@ -126,7 +126,6 @@ at the address below or ISO’s member body in the country of the requester
|
|
126
126
|
return $heading[0].tagName.toLowerCase();
|
127
127
|
}
|
128
128
|
});
|
129
|
-
|
130
129
|
</script>
|
131
130
|
|
132
131
|
<script>
|
data/spec/examples/rice.adoc
CHANGED
@@ -70,7 +70,7 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
70
70
|
</version>
|
71
71
|
</iso-standard>
|
72
72
|
INPUT
|
73
|
-
{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010–2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Partie 1: Riz", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part 1: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :updateddate=>"XXX", :wg=>"WG 3"}
|
73
|
+
{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010–2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Partie 1: Riz", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part 1: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :receiveddate=>"XXX", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :unpublished=>true, :updateddate=>"XXX", :wg=>"WG 3"}
|
74
74
|
OUTPUT
|
75
75
|
end
|
76
76
|
|
@@ -118,7 +118,7 @@ OUTPUT
|
|
118
118
|
<language>en</language>
|
119
119
|
<script>Latn</script>
|
120
120
|
<status>
|
121
|
-
<stage>
|
121
|
+
<stage>60</stage>
|
122
122
|
<substage>92</substage>
|
123
123
|
</status>
|
124
124
|
<copyright>
|
@@ -147,7 +147,7 @@ OUTPUT
|
|
147
147
|
</version>
|
148
148
|
</iso-standard>
|
149
149
|
INPUT
|
150
|
-
{:accesseddate=>"XXX", :agency=>"ISO/IEC", :confirmeddate=>"XXX", :createddate=>"XXX", :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Partie 1–3: Riz", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part 1–3: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05-01)", :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisheddate=>"XXX", :revdate=>"2016-05-01", :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"
|
150
|
+
{:accesseddate=>"XXX", :agency=>"ISO/IEC", :confirmeddate=>"XXX", :createddate=>"XXX", :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Partie 1–3: Riz", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part 1–3: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05-01)", :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisheddate=>"XXX", :receiveddate=>"XXX", :revdate=>"2016-05-01", :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>"17301", :unpublished=>false, :updateddate=>"XXX", :wg=>"GHI 3"}
|
151
151
|
OUTPUT
|
152
152
|
end
|
153
153
|
|
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: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|