metanorma-iso 1.3.22 → 1.3.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -7
  3. data/.github/workflows/ubuntu.yml +8 -7
  4. data/.github/workflows/windows.yml +8 -8
  5. data/Gemfile +2 -0
  6. data/lib/asciidoctor/iso/base.rb +22 -0
  7. data/lib/asciidoctor/iso/biblio.rng +89 -32
  8. data/lib/asciidoctor/iso/cleanup.rb +20 -3
  9. data/lib/asciidoctor/iso/front.rb +16 -107
  10. data/lib/asciidoctor/iso/front_id.rb +196 -0
  11. data/lib/asciidoctor/iso/isodoc.rng +475 -2
  12. data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
  13. data/lib/asciidoctor/iso/isostandard.rng +12 -1
  14. data/lib/asciidoctor/iso/macros.rb +21 -0
  15. data/lib/asciidoctor/iso/reqt.rng +23 -0
  16. data/lib/asciidoctor/iso/section.rb +18 -32
  17. data/lib/asciidoctor/iso/term_lookup_cleanup.rb +87 -0
  18. data/lib/asciidoctor/iso/validate.rb +41 -25
  19. data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
  20. data/lib/asciidoctor/iso/validate_section.rb +2 -2
  21. data/lib/asciidoctor/iso/validate_style.rb +6 -5
  22. data/lib/asciidoctor/iso/validate_title.rb +1 -1
  23. data/lib/isodoc/iso/base_convert.rb +77 -107
  24. data/lib/isodoc/iso/html/header.html +10 -6
  25. data/lib/isodoc/iso/html/html_iso_titlepage.html +27 -18
  26. data/lib/isodoc/iso/html/isodoc.scss +53 -28
  27. data/lib/isodoc/iso/html/scripts.html +23 -21
  28. data/lib/isodoc/iso/html/style-human.scss +23 -0
  29. data/lib/isodoc/iso/html/style-iso.scss +18 -0
  30. data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
  31. data/lib/isodoc/iso/html/word_iso_titlepage.html +23 -2
  32. data/lib/isodoc/iso/html/wordstyle.scss +80 -39
  33. data/lib/isodoc/iso/html_convert.rb +7 -9
  34. data/lib/isodoc/iso/iso.amendment.xsl +4597 -0
  35. data/lib/isodoc/iso/iso.international-standard.xsl +4597 -0
  36. data/lib/isodoc/iso/metadata.rb +71 -23
  37. data/lib/isodoc/iso/pdf_convert.rb +39 -0
  38. data/lib/isodoc/iso/sections.rb +66 -0
  39. data/lib/isodoc/iso/sts_convert.rb +29 -0
  40. data/lib/isodoc/iso/xref.rb +105 -0
  41. data/lib/metanorma-iso.rb +2 -0
  42. data/lib/metanorma/iso/processor.rb +16 -1
  43. data/lib/metanorma/iso/version.rb +1 -1
  44. data/metanorma-iso.gemspec +4 -1
  45. data/spec/asciidoctor-iso/amd_spec.rb +726 -0
  46. data/spec/asciidoctor-iso/base_spec.rb +38 -21
  47. data/spec/asciidoctor-iso/blocks_spec.rb +6 -6
  48. data/spec/asciidoctor-iso/cleanup_spec.rb +195 -174
  49. data/spec/asciidoctor-iso/inline_spec.rb +2 -1
  50. data/spec/asciidoctor-iso/macros_spec.rb +289 -0
  51. data/spec/asciidoctor-iso/refs_spec.rb +8 -5
  52. data/spec/asciidoctor-iso/section_spec.rb +8 -8
  53. data/spec/assets/iso.xml +64 -1
  54. data/spec/isodoc/amd_spec.rb +652 -0
  55. data/spec/isodoc/blocks_spec.rb +112 -27
  56. data/spec/isodoc/i18n_spec.rb +12 -20
  57. data/spec/isodoc/inline_spec.rb +4 -4
  58. data/spec/isodoc/iso_spec.rb +1 -1
  59. data/spec/isodoc/metadata_spec.rb +92 -4
  60. data/spec/isodoc/postproc_spec.rb +21 -120
  61. data/spec/isodoc/ref_spec.rb +9 -9
  62. data/spec/isodoc/section_spec.rb +36 -13
  63. data/spec/isodoc/table_spec.rb +30 -30
  64. data/spec/isodoc/terms_spec.rb +6 -6
  65. data/spec/isodoc/xref_spec.rb +43 -37
  66. data/spec/metanorma/processor_spec.rb +2 -2
  67. data/spec/spec_helper.rb +11 -0
  68. metadata +58 -5
  69. data/asciidoctor-iso.gemspec.old +0 -50
@@ -8,12 +8,10 @@ RSpec.describe IsoDoc do
8
8
  <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
9
9
  <stem type="AsciiMath">r = 1 %</stem>
10
10
  <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
11
- <dt>
12
- <stem type="AsciiMath">r</stem>
13
- </dt>
14
- <dd>
15
- <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
16
- </dd>
11
+ <dt> <stem type="AsciiMath">r</stem> </dt>
12
+ <dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p> </dd>
13
+ <dt> <stem type="AsciiMath">s_1</stem> </dt>
14
+ <dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p> </dd>
17
15
  </dl>
18
16
  <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
19
17
  <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
@@ -26,29 +24,55 @@ RSpec.describe IsoDoc do
26
24
  </iso-standard>
27
25
  INPUT
28
26
  #{HTML_HDR}
29
- <br/>
30
- <div>
31
- <h1 class="ForewordTitle">Foreword</h1>
32
- <div id="_be9158af-7e93-4ee2-90c5-26d31c181934" class="formula"><p><span class="stem">(#(r = 1 %)#)</span></p></div><p style='page-break-after:avoid;'>where</p><dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d" class='formula_dl'><dt>
33
- <span class="stem">(#(r)#)</span>
34
- </dt><dd>
35
- <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
36
- </dd></dl>
37
-
38
-
39
- <div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note"><p><span class="note_label">NOTE</span>&#160; [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p></div>
40
-
41
- <div id="_be9158af-7e93-4ee2-90c5-26d31c181935" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div>
42
- </div>
43
- <p class="zzSTDTitle1"/>
44
- </div>
45
- </body>
46
- </html>
27
+ <br/>
28
+ <div>
29
+ <h1 class='ForewordTitle'>Foreword</h1>
30
+ <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
31
+ <p>
32
+ <span class='stem'>(#(r = 1 %)#)</span>
33
+ </p>
34
+ </div>
35
+ <p style='page-break-after:avoid;'>where</p>
36
+ <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d' class='formula_dl'>
37
+ <dt>
38
+ <span class='stem'>(#(r)#)</span>
39
+ </dt>
40
+ <dd>
41
+ <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
42
+ </dd>
43
+ <dt>
44
+ <span class='stem'>(#(s_1)#)</span>
45
+ </dt>
46
+ <dd>
47
+ <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
48
+ </dd>
49
+ </dl>
50
+ <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
51
+ <p>
52
+ <span class='note_label'>NOTE</span>
53
+ &#160; [durationUnits] is essentially a duration statement without
54
+ the "P" prefix. "P" is unnecessary because between "G" and "U"
55
+ duration is always expressed.
56
+ </p>
57
+ </div>
58
+ </div>
59
+ <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
60
+ <p>
61
+ <span class='stem'>(#(r = 1 %)#)</span>
62
+ &#160; (1)
63
+ </p>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ <p class='zzSTDTitle1'/>
68
+ </div>
69
+ </body>
70
+ </html>
47
71
  OUTPUT
48
72
  end
49
73
 
50
74
  it "processes formulae (Word)" do
51
- expect((IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">').sub(%r{<p>\&#160;</p>\s*</div>.*$}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
75
+ expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">').sub(%r{<p>\&#160;</p>\s*</div>.*$}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
52
76
  <iso-standard xmlns="http://riboseinc.com/isoxml">
53
77
  <preface><foreword>
54
78
  <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
@@ -60,6 +84,8 @@ RSpec.describe IsoDoc do
60
84
  <dd>
61
85
  <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
62
86
  </dd>
87
+ <dt> <stem type="AsciiMath">s_1</stem> </dt>
88
+ <dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p> </dd>
63
89
  </dl>
64
90
  <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
65
91
  <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
@@ -73,7 +99,7 @@ RSpec.describe IsoDoc do
73
99
  INPUT
74
100
  <div>
75
101
  <h1 class='ForewordTitle'>Foreword</h1>
76
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181934' class='formula'>
102
+ <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
77
103
  <p>
78
104
  <span class='stem'>(#(r = 1 %)#)</span>
79
105
  </p>
@@ -90,6 +116,16 @@ RSpec.describe IsoDoc do
90
116
  <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
91
117
  </td>
92
118
  </tr>
119
+ <tr>
120
+ <td valign='top' align='left'>
121
+ <p align='left' style='margin-left:0pt;text-align:left;'>
122
+ <span class='stem'>(#(s_1)#)</span>
123
+ </p>
124
+ </td>
125
+ <td valign='top'>
126
+ <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
127
+ </td>
128
+ </tr>
93
129
  </table>
94
130
  <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
95
131
  <p class='Note'>
@@ -100,16 +136,65 @@ RSpec.describe IsoDoc do
100
136
  always expressed.
101
137
  </p>
102
138
  </div>
103
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181935' class='formula'>
139
+ </div>
140
+ <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
104
141
  <p>
105
142
  <span class='stem'>(#(r = 1 %)#)</span>
106
143
  <span style='mso-tab-count:1'>&#160; </span>
107
144
  (1)
108
145
  </p>
109
146
  </div>
147
+ </div>
110
148
  </div>
111
149
  OUTPUT
112
150
  end
113
151
 
152
+ it "processes formulae with single definition list entry" do
153
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
154
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
155
+ <preface><foreword>
156
+ <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
157
+ <stem type="AsciiMath">r = 1 %</stem>
158
+ <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
159
+ <dt>
160
+ <stem type="AsciiMath">r</stem>
161
+ </dt>
162
+ <dd>
163
+ <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
164
+ </dd>
165
+ </dl>
166
+ <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
167
+ <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
168
+ </note>
169
+ </formula>
170
+ <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
171
+ <stem type="AsciiMath">r = 1 %</stem>
172
+ </formula>
173
+ </foreword></preface>
174
+ </iso-standard>
175
+ INPUT
176
+ #{HTML_HDR}
177
+ <br/>
178
+ <div>
179
+ <h1 class="ForewordTitle">Foreword</h1>
180
+ <div id="_be9158af-7e93-4ee2-90c5-26d31c181934"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span></p></div>
181
+ <span class='zzMoveToFollowing'>
182
+ where
183
+ <span class='stem'>(#(r)#)</span>
184
+ </span>
185
+ <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
186
+
187
+ <div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note"><p><span class="note_label">NOTE</span>&#160; [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p></div>
188
+ </div>
189
+
190
+ <div id="_be9158af-7e93-4ee2-90c5-26d31c181935"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div></div>
191
+ </div>
192
+ <p class="zzSTDTitle1"/>
193
+ </div>
194
+ </body>
195
+ </html>
196
+ OUTPUT
197
+ end
198
+
114
199
 
115
200
  end
@@ -15,16 +15,14 @@ RSpec.describe IsoDoc do
15
15
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
16
16
  <title>Introduction Subsection</title>
17
17
  </clause>
18
- <patent-notice>
19
18
  <p>This is patent boilerplate</p>
20
- </patent-notice>
21
19
  </introduction></preface><sections>
22
20
  <clause id="D" obligation="normative">
23
21
  <title>Scope</title>
24
22
  <p id="E">Text</p>
25
23
  </clause>
26
24
 
27
- <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
25
+ <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
28
26
  <title>Normal Terms</title>
29
27
  <term id="J">
30
28
  <preferred>Term2</preferred>
@@ -61,11 +59,11 @@ RSpec.describe IsoDoc do
61
59
  <appendix id="Q2" inline-header="false" obligation="normative">
62
60
  <title>An Appendix</title>
63
61
  </appendix>
64
- </annex><bibliography><references id="R" obligation="informative">
62
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
65
63
  <title>Normative References</title>
66
64
  </references><clause id="S" obligation="informative">
67
65
  <title>Bibliography</title>
68
- <references id="T" obligation="informative">
66
+ <references id="T" obligation="informative" normative="false">
69
67
  <title>Bibliography Subsection</title>
70
68
  </references>
71
69
  </clause>
@@ -161,16 +159,14 @@ RSpec.describe IsoDoc do
161
159
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
162
160
  <title>Introduction Subsection</title>
163
161
  </clause>
164
- <patent-notice>
165
162
  <p>This is patent boilerplate</p>
166
- </patent-notice>
167
163
  </introduction></preface><sections>
168
164
  <clause id="D" obligation="normative">
169
165
  <title>Scope</title>
170
166
  <p id="E">Text</p>
171
167
  </clause>
172
168
 
173
- <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
169
+ <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
174
170
  <title>Normal Terms</title>
175
171
  <term id="J">
176
172
  <preferred>Term2</preferred>
@@ -207,11 +203,11 @@ RSpec.describe IsoDoc do
207
203
  <appendix id="Q2" inline-header="false" obligation="normative">
208
204
  <title>An Appendix</title>
209
205
  </appendix>
210
- </annex><bibliography><references id="R" obligation="informative">
206
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
211
207
  <title>Normative References</title>
212
208
  </references><clause id="S" obligation="informative">
213
209
  <title>Bibliography</title>
214
- <references id="T" obligation="informative">
210
+ <references id="T" obligation="informative" normative="false">
215
211
  <title>Bibliography Subsection</title>
216
212
  </references>
217
213
  </clause>
@@ -307,16 +303,14 @@ RSpec.describe IsoDoc do
307
303
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
308
304
  <title>Introduction Subsection</title>
309
305
  </clause>
310
- <patent-notice>
311
306
  <p>This is patent boilerplate</p>
312
- </patent-notice>
313
307
  </introduction></preface><sections>
314
308
  <clause id="D" obligation="normative">
315
309
  <title>Scope</title>
316
310
  <p id="E">Text</p>
317
311
  </clause>
318
312
 
319
- <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
313
+ <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
320
314
  <title>Normal Terms</title>
321
315
  <term id="J">
322
316
  <preferred>Term2</preferred>
@@ -353,11 +347,11 @@ RSpec.describe IsoDoc do
353
347
  <appendix id="Q2" inline-header="false" obligation="normative">
354
348
  <title>An Appendix</title>
355
349
  </appendix>
356
- </annex><bibliography><references id="R" obligation="informative">
350
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
357
351
  <title>Normative References</title>
358
352
  </references><clause id="S" obligation="informative">
359
353
  <title>Bibliography</title>
360
- <references id="T" obligation="informative">
354
+ <references id="T" obligation="informative" normative="false">
361
355
  <title>Bibliography Subsection</title>
362
356
  </references>
363
357
  </clause>
@@ -454,16 +448,14 @@ RSpec.describe IsoDoc do
454
448
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
455
449
  <title>Introduction Subsection</title>
456
450
  </clause>
457
- <patent-notice>
458
451
  <p>This is patent boilerplate</p>
459
- </patent-notice>
460
452
  </introduction></preface><sections>
461
453
  <clause id="D" obligation="normative">
462
454
  <title>Scope</title>
463
455
  <p id="E"><eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality></eref></p>
464
456
  </clause>
465
457
 
466
- <clause id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
458
+ <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
467
459
  <title>Normal Terms</title>
468
460
  <term id="J">
469
461
  <preferred>Term2</preferred>
@@ -500,7 +492,7 @@ RSpec.describe IsoDoc do
500
492
  <appendix id="Q2" inline-header="false" obligation="normative">
501
493
  <title>An Appendix</title>
502
494
  </appendix>
503
- </annex><bibliography><references id="R" obligation="informative">
495
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
504
496
  <title>Normative References</title>
505
497
  <bibitem id="ISO712" type="standard">
506
498
  <title format="text/plain">Cereals and cereal products</title>
@@ -514,7 +506,7 @@ RSpec.describe IsoDoc do
514
506
  </bibitem>
515
507
  </references><clause id="S" obligation="informative">
516
508
  <title>Bibliography</title>
517
- <references id="T" obligation="informative">
509
+ <references id="T" obligation="informative" normative="false">
518
510
  <title>Bibliography Subsection</title>
519
511
  </references>
520
512
  </clause>
@@ -158,7 +158,7 @@ RSpec.describe IsoDoc do
158
158
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</stem>
159
159
  </p>
160
160
  </foreword></preface>
161
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
161
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
162
162
  <bibitem id="ISO712" type="standard">
163
163
  <title format="text/plain">Cereals and cereal products</title>
164
164
  <docidentifier>ISO 712</docidentifier>
@@ -213,7 +213,7 @@ RSpec.describe IsoDoc do
213
213
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
214
214
  </p>
215
215
  </foreword></preface>
216
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
216
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
217
217
  <bibitem id="ISO712" type="standard">
218
218
  <title format="text/plain">Cereals and cereal products</title>
219
219
  <docidentifier>ISO 712</docidentifier>
@@ -243,7 +243,7 @@ RSpec.describe IsoDoc do
243
243
  <a href="#ISO712">ISO 712, Clause 1</a>
244
244
  <a href="#ISO712">ISO 712, 1.5</a>
245
245
  <a href="#ISO712">A</a>
246
- <a href="#ISO712">ISO 712, </a>
246
+ <a href="#ISO712">ISO 712, Whole of text</a>
247
247
  <a href="#ISO712">ISO 712, Prelude 7</a>
248
248
  <a href="#ISO712">A</a>
249
249
  </p>
@@ -251,7 +251,7 @@ RSpec.describe IsoDoc do
251
251
  <p class="zzSTDTitle1"/>
252
252
  <div>
253
253
  <h1>1&#160; Normative references</h1>
254
- <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
254
+ <p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
255
255
  </div>
256
256
  </div>
257
257
  </body>
@@ -96,7 +96,7 @@ RSpec.describe IsoDoc::Iso do
96
96
  <eref bibitemid="ISO20483"/>
97
97
  </p>
98
98
  </foreword></preface>
99
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
99
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
100
100
  <bibitem type="international-standard" id="IEV">
101
101
  <title format="text/plain" language="en" script="Latn">Electropedia:
102
102
  The World's Online Electrotechnical Vocabulary</title>
@@ -16,7 +16,9 @@ RSpec.describe IsoDoc::Iso::Metadata do
16
16
  <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
17
17
  <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
18
18
  <title type="title-part" language="fr" format="text/plain">Riz</title>
19
- <docidentifier type="iso">ISO/PreCD3 17301-1</docidentifier>
19
+ <docidentifier type="ISO">ISO/PreCD3 17301-1</docidentifier>
20
+ <docidentifier type="iso-with-lang">ISO/PreCD3 17301-1 (E)</docidentifier>
21
+ <docidentifier type="iso-reference">ISO/PreCD3 17301-1:2000 (E)</docidentifier>
20
22
  <docidentifier type="iso-tc">17301</docidentifier>
21
23
  <docidentifier type="iso-tc">17302</docidentifier>
22
24
  <docnumber>1730</docnumber>
@@ -58,6 +60,8 @@ RSpec.describe IsoDoc::Iso::Metadata do
58
60
  </organization>
59
61
  </owner>
60
62
  </copyright>
63
+ <keyword>kw2</keyword>
64
+ <keyword>kw1</keyword>
61
65
  <ext>
62
66
  <doctype>international-standard</doctype>
63
67
  <editorialgroup>
@@ -74,7 +78,51 @@ RSpec.describe IsoDoc::Iso::Metadata do
74
78
  </bibdata>
75
79
  </iso-standard>
76
80
  INPUT
77
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docnumeric=>"1730", :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=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1", :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=>"Rice", :doctitlepartlabel=>"Part&nbsp;1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :publisher=>"International Organization for Standardization", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"CD", :statusabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>["17301", "17302"], :unpublished=>true, :wg=>"WG 3"}
81
+ {:accesseddate=>"2012",
82
+ :activateddate=>"2013",
83
+ :agency=>"ISO",
84
+ :authors=>[],
85
+ :authors_affiliations=>{},
86
+ :createddate=>"2010&ndash;2011",
87
+ :docnumber=>"ISO/PreCD3 17301-1",
88
+ :docnumber_lang=>"ISO/PreCD3 17301-1 (E)",
89
+ :docnumber_reference=>"ISO/PreCD3 17301-1:2000 (E)",
90
+ :docnumeric=>"1730",
91
+ :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",
92
+ :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
93
+ :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
94
+ :docsubtitlepart=>"Riz",
95
+ :docsubtitlepartlabel=>"Partie&nbsp;1",
96
+ :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice",
97
+ :doctitleintro=>"Cereals and pulses",
98
+ :doctitlemain=>"Specifications and test methods",
99
+ :doctitlepart=>"Rice",
100
+ :doctitlepartlabel=>"Part&nbsp;1",
101
+ :doctype=>"International Standard",
102
+ :docyear=>"2016",
103
+ :draft=>"0.4",
104
+ :draftinfo=>" (draft 0.4, 2016-05-01)",
105
+ :edition=>"2",
106
+ :editorialgroup=>["TC 34", "SC 4", "WG 3"],
107
+ :ics=>nil,
108
+ :keywords=>["kw2", "kw1"],
109
+ :obsoleteddate=>"2014",
110
+ :obsoletes=>nil,
111
+ :obsoletes_part=>nil,
112
+ :publisheddate=>"2011",
113
+ :publisher=>"International Organization for Standardization",
114
+ :revdate=>"2016-05-01",
115
+ :revdate_monthyear=>"May 2016",
116
+ :sc=>"SC 4",
117
+ :secretariat=>"GB",
118
+ :stage=>"30",
119
+ :stage_int=>30,
120
+ :stageabbr=>"CD",
121
+ :statusabbr=>"PreCD3",
122
+ :tc=>"TC 34",
123
+ :tc_docnumber=>["17301", "17302"],
124
+ :unpublished=>true,
125
+ :wg=>"WG 3"}
78
126
  OUTPUT
79
127
  end
80
128
 
@@ -96,7 +144,9 @@ OUTPUT
96
144
  <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
97
145
  <title type="title-part" language="fr" format="text/plain">Riz</title>
98
146
  </title>
99
- <docidentifier type="iso">ISO/IEC/CD 17301-1-3</docidentifier>
147
+ <docidentifier type="ISO">ISO/IEC/CD 17301-1-3</docidentifier>
148
+ <docidentifier type="iso-with-lang">ISO/IEC/CD 17301-1-3 (E)</docidentifier>
149
+ <docidentifier type="iso-reference">ISO/IEC/CD 17301-1-3 (E)</docidentifier>
100
150
  <docidentifier type="iso-tc">17301</docidentifier>
101
151
  <contributor>
102
152
  <role type="author"/>
@@ -153,7 +203,45 @@ OUTPUT
153
203
  </bibdata>
154
204
  </iso-standard>
155
205
  INPUT
156
- {:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docnumeric=>nil, :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=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3", :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=>"Rice", :doctitlepartlabel=>"Part&nbsp;1&ndash;3", :doctype=>"International Standard", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisher=>"International Organization for Standardization and International Electrotechnical Commission", :revdate=>nil, :revdate_monthyear=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :statusabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>["17301"], :unpublished=>false, :wg=>"GHI 3"}
206
+ {:agency=>"ISO/IEC",
207
+ :authors=>[],
208
+ :authors_affiliations=>{},
209
+ :docnumber=>"ISO/IEC/CD 17301-1-3",
210
+ :docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
211
+ :docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
212
+ :docnumeric=>nil,
213
+ :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",
214
+ :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
215
+ :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
216
+ :docsubtitlepart=>"Riz",
217
+ :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3",
218
+ :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice",
219
+ :doctitleintro=>"Cereals and pulses",
220
+ :doctitlemain=>"Specifications and test methods",
221
+ :doctitlepart=>"Rice",
222
+ :doctitlepartlabel=>"Part&nbsp;1&ndash;3",
223
+ :doctype=>"International Standard",
224
+ :docyear=>"2016",
225
+ :draft=>nil,
226
+ :draftinfo=>"",
227
+ :edition=>nil,
228
+ :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
229
+ :ics=>"1.2.3, 1.2.3",
230
+ :keywords=>[],
231
+ :obsoletes=>"IEC 8121",
232
+ :obsoletes_part=>"3.1",
233
+ :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
234
+ :revdate=>nil,
235
+ :revdate_monthyear=>nil,
236
+ :sc=>"DEF 4",
237
+ :secretariat=>"XXXX",
238
+ :stage=>"60",
239
+ :stage_int=>60,
240
+ :statusabbr=>"IS",
241
+ :tc=>"ABC 34",
242
+ :tc_docnumber=>["17301"],
243
+ :unpublished=>false,
244
+ :wg=>"GHI 3"}
157
245
  OUTPUT
158
246
  end
159
247