metanorma-iso 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2241f70d9971c46ab77a6eafd9dc9569111b88b2a949961f5a4e8450f93c273a
4
- data.tar.gz: dcbe613d07eb914598794c66d3291391fc01820c85ee9332d74f20ed892e3ae7
3
+ metadata.gz: 291654144418257ce85f6e706e00aef3bf5b3f94c756d1dab58a4ab367778324
4
+ data.tar.gz: 55b5b74fab210b29de23d0fbbaec7c686186cfdc4fe69bb30a5e9eff820dbe31
5
5
  SHA512:
6
- metadata.gz: ca150d0a8b852937ef4acdd684dd5ea341143d5e2696491324b22f1222b8e51a53e2ff12e4d087e7a2d00aab53b97b2cfd3f49e8e5c028ad5b5fb35ee55f61bf
7
- data.tar.gz: 02a38f34015a38879c103316bcd28a6742b6eee4560bff7a19bacfbbf556bc4ee615e2a3d45a944c73f646ebefb829885fc24c06d0b67fa80862dd359c5bec9d
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"><p>{{ stageabbr }} stage</p></div>
25
+ <div class="coverpage_docstage">
26
+ {% if unpublished %}
27
+ <p>{{ stageabbr }} stage</p>
28
+ {% endif %}
29
+ </div>
26
30
 
27
- {% if stage and stage_int < 60 %}
31
+ {% if unpublished %}
28
32
  <div class="coverpage_warning">
29
33
 
30
34
  <p>Warning for WDs
@@ -18,7 +18,6 @@
18
18
  return $heading[0].tagName.toLowerCase();
19
19
  }
20
20
  });
21
-
22
21
  </script>
23
22
 
24
23
  <script>
@@ -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>&nbsp;</o:p></span></p>
41
41
 
42
- {% if stage and stage_int < 60 %}
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;
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.0.10".freeze
3
+ VERSION = "1.0.11".freeze
4
4
  end
5
5
  end
data/spec/assets/iso.doc CHANGED
@@ -1,7 +1,7 @@
1
1
  MIME-Version: 1.0
2
- Content-Type: multipart/related; boundary="----=_NextPart_0e69eebe.33ff.4624"
2
+ Content-Type: multipart/related; boundary="----=_NextPart_0262872e.6d12.4917"
3
3
 
4
- ------=_NextPart_0e69eebe.33ff.4624
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;&#10;mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;&#10;margin-left:4.25pt;margin-right:4.25pt">
782
782
 
783
- <p class="MsoNormal" align="center" style="text-align:center;border:none;&#10;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"> stage<p class="MsoNormal"></p></span></p>
783
+ <p class="MsoNormal" align="center" style="text-align:center;border:none;&#10;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">&#xA0;</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="#_Toc365979697">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
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 _Toc365979697 \h </span>
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
- ------=_NextPart_0e69eebe.33ff.4624
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
- ------=_NextPart_0e69eebe.33ff.4624
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
- ------=_NextPart_0e69eebe.33ff.4624--
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
- <p> stage</p>
41
+
42
42
  </div>
43
43
 
44
44
 
@@ -126,7 +126,6 @@ at the address below or ISO&#x2019;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>
@@ -14,7 +14,7 @@
14
14
  :title-main-fr: Spécification et méthodes d'essai
15
15
  :title-part-fr: Riz
16
16
  :doctype: international-standard
17
- :docstage: 60
17
+ :docstage: 30
18
18
  :docsubstage: 92
19
19
  :draft:
20
20
  :technical-committee-number: 34
@@ -1847,7 +1847,7 @@ end</code></pre>
1847
1847
  </div>
1848
1848
  <div id="footer">
1849
1849
  <div id="footer-text">
1850
- Last updated 2018-09-22 20:44:36 +1000
1850
+ Last updated 2018-11-26 22:27:17 +1100
1851
1851
  </div>
1852
1852
  </div>
1853
1853
  <script type="text/x-mathjax-config">
@@ -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&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;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&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;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>30</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&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1&ndash;3: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1&ndash;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=>"30", :stage_int=>30, :stageabbr=>"CD", :tc=>"ABC 34", :tc_docnumber=>"17301", :updateddate=>"XXX", :wg=>"GHI 3"}
150
+ {:accesseddate=>"XXX", :agency=>"ISO/IEC", :confirmeddate=>"XXX", :createddate=>"XXX", :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1&ndash;3: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1&ndash;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.10
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-19 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor