metanorma-standoc 1.11.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -31
  3. data/.gitignore +23 -0
  4. data/Gemfile +2 -0
  5. data/lib/asciidoctor/standoc/base.rb +2 -241
  6. data/lib/asciidoctor/standoc/blocks.rb +2 -238
  7. data/lib/asciidoctor/standoc/blocks_notes.rb +2 -100
  8. data/lib/asciidoctor/standoc/cleanup.rb +2 -207
  9. data/lib/asciidoctor/standoc/cleanup_amend.rb +2 -53
  10. data/lib/asciidoctor/standoc/cleanup_block.rb +2 -173
  11. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +2 -204
  12. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +2 -108
  13. data/lib/asciidoctor/standoc/cleanup_image.rb +2 -69
  14. data/lib/asciidoctor/standoc/cleanup_inline.rb +2 -179
  15. data/lib/asciidoctor/standoc/cleanup_maths.rb +2 -221
  16. data/lib/asciidoctor/standoc/cleanup_ref.rb +2 -169
  17. data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +2 -93
  18. data/lib/asciidoctor/standoc/cleanup_reqt.rb +2 -110
  19. data/lib/asciidoctor/standoc/cleanup_section.rb +2 -184
  20. data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -91
  21. data/lib/asciidoctor/standoc/cleanup_symbols.rb +2 -47
  22. data/lib/asciidoctor/standoc/cleanup_table.rb +2 -67
  23. data/lib/asciidoctor/standoc/cleanup_terms.rb +2 -113
  24. data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +2 -161
  25. data/lib/asciidoctor/standoc/cleanup_text.rb +2 -95
  26. data/lib/asciidoctor/standoc/cleanup_toc.rb +3 -0
  27. data/lib/asciidoctor/standoc/cleanup_xref.rb +2 -106
  28. data/lib/asciidoctor/standoc/converter.rb +2 -123
  29. data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +2 -56
  30. data/lib/asciidoctor/standoc/datamodel/diagram_preprocessor.rb +2 -102
  31. data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +3 -404
  32. data/lib/asciidoctor/standoc/deprecated.rb +5 -0
  33. data/lib/asciidoctor/standoc/front.rb +2 -219
  34. data/lib/asciidoctor/standoc/front_contributor.rb +2 -191
  35. data/lib/asciidoctor/standoc/inline.rb +2 -229
  36. data/lib/asciidoctor/standoc/lists.rb +2 -119
  37. data/lib/asciidoctor/standoc/macros.rb +2 -203
  38. data/lib/asciidoctor/standoc/macros_form.rb +2 -62
  39. data/lib/asciidoctor/standoc/macros_note.rb +2 -44
  40. data/lib/asciidoctor/standoc/macros_plantuml.rb +2 -112
  41. data/lib/asciidoctor/standoc/macros_terms.rb +2 -180
  42. data/lib/asciidoctor/standoc/ref.rb +2 -225
  43. data/lib/asciidoctor/standoc/ref_sect.rb +2 -143
  44. data/lib/asciidoctor/standoc/ref_utility.rb +2 -0
  45. data/lib/asciidoctor/standoc/render.rb +3 -0
  46. data/lib/asciidoctor/standoc/reqt.rb +2 -89
  47. data/lib/asciidoctor/standoc/section.rb +2 -190
  48. data/lib/asciidoctor/standoc/table.rb +2 -84
  49. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +2 -178
  50. data/lib/asciidoctor/standoc/terms.rb +2 -153
  51. data/lib/asciidoctor/standoc/utils.rb +2 -116
  52. data/lib/asciidoctor/standoc/validate.rb +2 -157
  53. data/lib/asciidoctor/standoc/validate_section.rb +2 -54
  54. data/lib/isodoc/html/htmlstyle.css +20 -11
  55. data/lib/isodoc/html/htmlstyle.scss +11 -11
  56. data/lib/metanorma/standoc/base.rb +149 -0
  57. data/lib/{asciidoctor → metanorma}/standoc/basicdoc.rng +0 -0
  58. data/lib/{asciidoctor → metanorma}/standoc/biblio.rng +0 -0
  59. data/lib/metanorma/standoc/blocks.rb +239 -0
  60. data/lib/metanorma/standoc/blocks_notes.rb +101 -0
  61. data/lib/metanorma/standoc/cleanup.rb +146 -0
  62. data/lib/metanorma/standoc/cleanup_amend.rb +54 -0
  63. data/lib/metanorma/standoc/cleanup_block.rb +173 -0
  64. data/lib/metanorma/standoc/cleanup_boilerplate.rb +213 -0
  65. data/lib/metanorma/standoc/cleanup_footnotes.rb +109 -0
  66. data/lib/metanorma/standoc/cleanup_image.rb +70 -0
  67. data/lib/metanorma/standoc/cleanup_inline.rb +190 -0
  68. data/lib/metanorma/standoc/cleanup_maths.rb +222 -0
  69. data/lib/metanorma/standoc/cleanup_ref.rb +170 -0
  70. data/lib/metanorma/standoc/cleanup_ref_dl.rb +104 -0
  71. data/lib/metanorma/standoc/cleanup_reqt.rb +111 -0
  72. data/lib/metanorma/standoc/cleanup_section.rb +212 -0
  73. data/lib/metanorma/standoc/cleanup_section_names.rb +92 -0
  74. data/lib/metanorma/standoc/cleanup_symbols.rb +48 -0
  75. data/lib/metanorma/standoc/cleanup_table.rb +68 -0
  76. data/lib/metanorma/standoc/cleanup_terms.rb +140 -0
  77. data/lib/metanorma/standoc/cleanup_terms_designations.rb +199 -0
  78. data/lib/metanorma/standoc/cleanup_text.rb +96 -0
  79. data/lib/metanorma/standoc/cleanup_toc.rb +98 -0
  80. data/lib/metanorma/standoc/cleanup_xref.rb +107 -0
  81. data/lib/metanorma/standoc/converter.rb +124 -0
  82. data/lib/metanorma/standoc/datamodel/attributes_table_preprocessor.rb +57 -0
  83. data/lib/metanorma/standoc/datamodel/diagram_preprocessor.rb +103 -0
  84. data/lib/metanorma/standoc/datamodel/plantuml_renderer.rb +409 -0
  85. data/lib/metanorma/standoc/front.rb +224 -0
  86. data/lib/metanorma/standoc/front_contributor.rb +192 -0
  87. data/lib/metanorma/standoc/inline.rb +232 -0
  88. data/lib/{asciidoctor → metanorma}/standoc/isodoc.rng +90 -18
  89. data/lib/metanorma/standoc/lists.rb +120 -0
  90. data/lib/metanorma/standoc/macros.rb +204 -0
  91. data/lib/metanorma/standoc/macros_form.rb +63 -0
  92. data/lib/metanorma/standoc/macros_note.rb +45 -0
  93. data/lib/metanorma/standoc/macros_plantuml.rb +113 -0
  94. data/lib/metanorma/standoc/macros_terms.rb +181 -0
  95. data/lib/metanorma/standoc/ref.rb +243 -0
  96. data/lib/metanorma/standoc/ref_sect.rb +153 -0
  97. data/lib/metanorma/standoc/ref_utility.rb +129 -0
  98. data/lib/metanorma/standoc/render.rb +115 -0
  99. data/lib/metanorma/standoc/reqt.rb +90 -0
  100. data/lib/{asciidoctor → metanorma}/standoc/reqt.rng +0 -0
  101. data/lib/metanorma/standoc/section.rb +209 -0
  102. data/lib/metanorma/standoc/table.rb +85 -0
  103. data/lib/metanorma/standoc/term_lookup_cleanup.rb +179 -0
  104. data/lib/metanorma/standoc/terms.rb +160 -0
  105. data/lib/metanorma/standoc/utils.rb +101 -0
  106. data/lib/metanorma/standoc/validate.rb +158 -0
  107. data/lib/metanorma/standoc/validate_section.rb +55 -0
  108. data/lib/metanorma/standoc/version.rb +1 -1
  109. data/lib/{asciidoctor → metanorma}/standoc/views/datamodel/model_representation.adoc.erb +0 -0
  110. data/lib/{asciidoctor → metanorma}/standoc/views/datamodel/plantuml_representation.adoc.erb +0 -0
  111. data/lib/metanorma-standoc.rb +1 -1
  112. data/metanorma-standoc.gemspec +4 -4
  113. data/spec/{asciidoctor → metanorma}/base_spec.rb +73 -8
  114. data/spec/{asciidoctor → metanorma}/blank_spec.rb +1 -1
  115. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +49 -20
  116. data/spec/{asciidoctor → metanorma}/cleanup_blocks_spec.rb +25 -1
  117. data/spec/{asciidoctor → metanorma}/cleanup_sections_spec.rb +2 -2
  118. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +9 -9
  119. data/spec/{asciidoctor → metanorma}/cleanup_terms_spec.rb +528 -91
  120. data/spec/{asciidoctor → metanorma}/datamodel/attributes_table_preprocessor_spec.rb +22 -22
  121. data/spec/{asciidoctor → metanorma}/datamodel/diagram_preprocessor_spec.rb +17 -17
  122. data/spec/{asciidoctor → metanorma}/inline_spec.rb +175 -6
  123. data/spec/{asciidoctor → metanorma}/isobib_cache_spec.rb +5 -9
  124. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  125. data/spec/{asciidoctor → metanorma}/macros_json2text_spec.rb +0 -0
  126. data/spec/{asciidoctor → metanorma}/macros_plantuml_spec.rb +3 -3
  127. data/spec/{asciidoctor → metanorma}/macros_spec.rb +8 -8
  128. data/spec/{asciidoctor → metanorma}/macros_yaml2text_spec.rb +0 -0
  129. data/spec/metanorma/refs_dl_spec.rb +863 -0
  130. data/spec/{asciidoctor → metanorma}/refs_spec.rb +1277 -687
  131. data/spec/{asciidoctor → metanorma}/section_spec.rb +90 -3
  132. data/spec/{asciidoctor → metanorma}/table_spec.rb +1 -1
  133. data/spec/{asciidoctor → metanorma}/validate_spec.rb +2 -2
  134. data/spec/spec_helper.rb +0 -1
  135. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +179 -179
  136. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
  137. data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
  138. data/spec/vcr_cassettes/isobib_get_123_1.yml +98 -98
  139. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +111 -111
  140. data/spec/vcr_cassettes/isobib_get_123_2001.yml +13 -13
  141. data/spec/vcr_cassettes/isobib_get_124.yml +14 -14
  142. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  143. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
  144. metadata +89 -38
  145. data/lib/asciidoctor/standoc/ref_date_id.rb +0 -62
  146. data/spec/asciidoctor/refs_dl_spec.rb +0 -864
@@ -1,864 +0,0 @@
1
- require "spec_helper"
2
- require "relaton_iso"
3
-
4
- RSpec.describe Asciidoctor::Standoc do
5
- it "processes simple dl reference" do
6
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
7
- #{ASCIIDOC_BLANK_HDR}
8
- [bibliography]
9
- == Normative References
10
-
11
- [%bibitem]
12
- === Standard
13
- id:: iso123
14
- docid::
15
- type::: ISO
16
- id::: ISO 123
17
- type:: standard
18
- contributor::
19
- role::: publisher
20
- organization:::
21
- name:::: ISO
22
- contributor::
23
- role::: author
24
- person:::
25
- name::::
26
- +
27
- --
28
- completename::
29
- language::: en
30
- content::: Fred
31
- --
32
- contributor::
33
- role::: author
34
- person:::
35
- name::::
36
- completename::::: Jack
37
-
38
- INPUT
39
- #{BLANK_HDR}
40
- <sections>
41
- </sections><bibliography><references id="_" obligation="informative" normative="true">
42
- <title>Normative references</title>
43
- #{NORM_REF_BOILERPLATE}
44
- <bibitem id="iso123" type="standard">
45
- <fetched/>
46
- <title type='title-main' format='text/plain'>Standard</title>
47
- <title type='main' format='text/plain'>Standard</title>
48
- <docidentifier type="ISO">ISO 123</docidentifier>
49
- <contributor>
50
- <role type="publisher"/>
51
- <organization>
52
- <name>ISO</name>
53
- </organization>
54
- </contributor>
55
- <contributor>
56
- <role type="author"/>
57
- <person>
58
- <name><completename language="en">Fred</completename></name>
59
- </person>
60
- </contributor>
61
- <contributor>
62
- <role type="author"/>
63
- <person>
64
- <name><completename>Jack</completename></name>
65
- </person>
66
- </contributor>
67
- </bibitem>
68
- </references>
69
- </bibliography>
70
- </standard-document>
71
- OUTPUT
72
- end
73
-
74
- it "processes complex dl reference" do
75
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
76
- #{ASCIIDOC_BLANK_HDR}
77
-
78
- == Clause
79
-
80
- <<ISOTC211>>
81
-
82
- [bibliography]
83
- == Normative References
84
-
85
- [[ISOTC211]]
86
- [%bibitem]
87
- === Other Title
88
- fetched:: 2019-06-30
89
- title::
90
- type::: main
91
- content::: Geographic information
92
- title::
93
- type::: subtitle
94
- content::: Geographic information subtitle
95
- language::: en
96
- script::: Latn
97
- format::: text/plain
98
- type:: standard
99
- docid::
100
- type::: ISO
101
- id::: TC211
102
- docnumber:: 211
103
- edition:: 1
104
- language::
105
- . en
106
- . fr
107
- script:: Latn
108
- version::
109
- revision_date::: 2019-04-01
110
- draft::: draft
111
- biblionote::
112
- type::: bibnote
113
- content:::
114
- +
115
- --
116
- Mark set a major league
117
- home run record in 1998.
118
- --
119
- docstatus::
120
- stage::: stage
121
- substage::: substage
122
- iteration::: iteration
123
- date::
124
- type::: issued
125
- value::: 2014
126
- date::
127
- type::: published
128
- from::: 2014-04
129
- to::: 2014-05
130
- date::
131
- type::: accessed
132
- value::: 2015-05-20
133
- abstract::
134
- content:::
135
- +
136
- --
137
- ISO 19115-1:2014 defines the schema required for ...
138
- --
139
- abstract::
140
- content::: L'ISO 19115-1:2014 définit le schéma requis pour ...
141
- language::: fr
142
- script::: Latn
143
- format::: text/plain
144
- copyright::
145
- owner:::
146
- name:::: International Organization for Standardization
147
- abbreviation:::: ISO
148
- url:::: www.iso.org
149
- from::: 2014
150
- to::: #{Time.now.year}
151
- link::
152
- type::: src
153
- content::: https://www.iso.org/standard/53798.html
154
- link::
155
- type::: obp
156
- content::: https://www.iso.org/obp/ui/#!iso:std:53798:en
157
- link::
158
- type::: rss
159
- content::: https://www.iso.org/contents/data/standard/05/37/53798.detail.rss
160
- medium::
161
- form::: medium form
162
- size::: medium size
163
- scale::: medium scale
164
- place:: bib place
165
- extent::
166
- type::: section
167
- reference_from::: 7
168
- accesslocation::
169
- . accesslocation1
170
- . accesslocation2
171
- classification::
172
- type::: type
173
- value::: value
174
- validity::
175
- begins::: 2010-10-10 12:21
176
- ends::: 2011-02-03 18:30
177
-
178
-
179
- ==== Contributor
180
- organization::
181
- name::: International Organization for Standardization
182
- url::: www.iso.org
183
- abbreviation::: ISO
184
- subdivision::: division
185
- role::
186
- type::: publisher
187
- description::: Publisher role
188
-
189
- ==== Contributor
190
- person::
191
- name:::
192
- completename::::
193
- +
194
- --
195
- content:: A. Bierman
196
- language:: en
197
- --
198
- affiliation:::
199
- organization::::
200
- +
201
- --
202
- name:: IETF
203
- abbreviation:: IETF
204
- identifier::
205
- type::: uri
206
- id::: www.ietf.org
207
- --
208
- description:::: Affiliation description
209
- contact:::
210
- street::::
211
- . 8 Street St
212
- city:::: City
213
- postcode:::: 123456
214
- country:::: Country
215
- state:::: State
216
- contact:::
217
- type:::: phone
218
- value:::: 223322
219
- role:: author
220
-
221
- ==== Contributor
222
- organization::
223
- name::: IETF
224
- abbreviation::: IETF
225
- identifier:::
226
- type:::: uri
227
- id:::: www.ietf.org
228
- role:: publisher
229
-
230
- ==== Contributor
231
- person::
232
- name:::
233
- language:::: en
234
- initial:::: A.
235
- surname:::: Bierman
236
- affiliation:::
237
- +
238
- --
239
- organization::
240
- name::: IETF
241
- abbreviation::: IETF
242
- description::
243
- content::: Affiliation description
244
- language::: en
245
- script::: Latn
246
- --
247
- identifier:::
248
- type:::: uri
249
- id:::: www.person.com
250
- role:: author
251
-
252
- ==== Relation
253
- type:: updates
254
- bibitem::
255
- formattedref::: ISO 19115:2003
256
- bib_locality:::
257
- type:::: page
258
- reference_from:::: 7
259
- reference_to:::: 10
260
-
261
- ==== Relation
262
- type:: updates
263
- bibitem::
264
- type::: standard
265
- formattedref::: ISO 19115:2003/Cor 1:2006
266
-
267
- ==== Series
268
- type:: main
269
- title::
270
- type::: original
271
- content::: ISO/IEC FDIS 10118-3
272
- language::: en
273
- script::: Latn
274
- format::: text/plain
275
- place:: Serie's place
276
- organization:: Serie's organization
277
- abbreviation::
278
- content::: ABVR
279
- language::: en
280
- script::: Latn
281
- from:: 2009-02-01
282
- to:: 2010-12-20
283
- number:: serie1234
284
- partnumber:: part5678
285
-
286
- ==== Series
287
- type:: alt
288
- formattedref::
289
- content::: serieref
290
- language::: en
291
- script::: Latn
292
-
293
- INPUT
294
- #{BLANK_HDR}
295
- <sections>
296
- <clause id='_' inline-header='false' obligation='normative'>
297
- <title>Clause</title>
298
- <p id='_'>
299
- <eref type='inline' bibitemid='ISOTC211' citeas='TC211'/>
300
- </p>
301
- </clause>
302
- </sections>
303
- <bibliography><references id="_" obligation="informative" normative="true">
304
- <title>Normative references</title>
305
- #{NORM_REF_BOILERPLATE}
306
- <bibitem id="ISOTC211" type="standard">
307
- <fetched/>
308
- <title type="main" format="text/plain">Geographic information</title>
309
- <title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
310
- <title type='title-main' format='text/plain'>Other Title</title>
311
- <title type='main' format='text/plain'>Other Title</title>
312
- <uri type="src">https://www.iso.org/standard/53798.html</uri>
313
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
314
- <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
315
- <docidentifier type="ISO">TC211</docidentifier>
316
- <docnumber>211</docnumber>
317
- <date type="issued">
318
- <on>2014</on>
319
- </date>
320
- <date type="published">
321
- <from>2014-04</from>
322
- <to>2014-05</to>
323
- </date>
324
- <date type="accessed">
325
- <on>2015-05-20</on>
326
- </date>
327
- <contributor>
328
- <role type="publisher"><description>Publisher role</description></role>
329
- <organization>
330
- <name>International Organization for Standardization</name>
331
- <subdivision>division</subdivision>
332
- <abbreviation>ISO</abbreviation>
333
- <uri>www.iso.org</uri>
334
- </organization>
335
- </contributor>
336
- <contributor>
337
- <role type="author"/>
338
- <person>
339
- <name>
340
- <completename language="en">A. Bierman</completename>
341
- </name>
342
- <affiliation>
343
- <description format="text/plain">Affiliation description</description>
344
- <organization>
345
- <name>IETF</name>
346
- <abbreviation>IETF</abbreviation>
347
- <identifier type="uri">www.ietf.org</identifier>
348
- </organization>
349
- </affiliation>
350
- <address>
351
- <street>8 Street St</street>
352
- <city>City</city>
353
- <state>State</state>
354
- <country>Country</country>
355
- <postcode>123456</postcode>
356
- </address>
357
- <phone>223322</phone>
358
- </person>
359
- </contributor>
360
- <contributor>
361
- <role type="publisher"/>
362
- <organization>
363
- <name>IETF</name>
364
- <abbreviation>IETF</abbreviation>
365
- <identifier type="uri">www.ietf.org</identifier>
366
- </organization>
367
- </contributor>
368
- <contributor>
369
- <role type="author"/>
370
- <person>
371
- <name>
372
- <initial language="en">A.</initial>
373
- <surname language="en">Bierman</surname>
374
- </name>
375
- <affiliation>
376
- <description language="en" script="Latn">Affiliation description</description>
377
- <organization>
378
- <name>IETF</name>
379
- <abbreviation>IETF</abbreviation>
380
- </organization>
381
- </affiliation>
382
- <identifier type="uri">www.person.com</identifier>
383
- </person>
384
- </contributor>
385
- <edition>1</edition>
386
- <version>
387
- <revision-date>2019-04-01</revision-date>
388
- <draft>draft</draft>
389
- </version>
390
- <note type="bibnote">Mark set a major league
391
- home run record in 1998.</note>
392
- <language>en</language>
393
- <language>fr</language>
394
- <script>Latn</script>
395
- <abstract format="text/plain">ISO 19115-1:2014 defines the schema required for …​</abstract>
396
- <abstract format="text/plain" language="fr" script="Latn">L’ISO 19115-1:2014 définit le schéma requis pour …​</abstract>
397
- <status>
398
- <stage>stage</stage>
399
- <substage>substage</substage>
400
- <iteration>iteration</iteration>
401
- </status>
402
- <copyright>
403
- <from>2014</from>
404
- <to>#{Time.now.year}</to>
405
- <owner>
406
- <organization>
407
- <name>International Organization for Standardization</name>
408
- <abbreviation>ISO</abbreviation>
409
- <uri>www.iso.org</uri>
410
- </organization>
411
- </owner>
412
- </copyright>
413
- <relation type="updates">
414
- <bibitem>
415
- <formattedref format="text/plain">ISO 19115:2003</formattedref>
416
- </bibitem>
417
- </relation>
418
- <relation type="updates">
419
- <bibitem type="standard">
420
- <formattedref format="text/plain">ISO 19115:2003/Cor 1:2006</formattedref>
421
- </bibitem>
422
- </relation>
423
- <series type="main">
424
- <title type="original" format="text/plain" language="en" script="Latn">ISO/IEC FDIS 10118-3</title>
425
- <place>Serie’s place</place>
426
- <organization>Serie’s organization</organization>
427
- <abbreviation language="en" script="Latn">ABVR</abbreviation>
428
- <from>2009-02-01</from>
429
- <to>2010-12-20</to>
430
- <number>serie1234</number>
431
- <partnumber>part5678</partnumber>
432
- </series>
433
- <series type="alt">
434
- <formattedref format="text/plain" language="en" script="Latn">serieref</formattedref>
435
- </series>
436
- <medium>
437
- <form>medium form</form>
438
- <size>medium size</size>
439
- <scale>medium scale</scale>
440
- </medium>
441
- <place>bib place</place>
442
- <extent type="section">
443
- <referenceFrom>7</referenceFrom>
444
- </extent>
445
- <accesslocation>accesslocation1</accesslocation>
446
- <accesslocation>accesslocation2</accesslocation>
447
- <classification type="type">value</classification>
448
- <validity>
449
- <validityBegins>2010-10-10 12:21</validityBegins>
450
- <validityEnds>2011-02-03 18:30</validityEnds>
451
- </validity>
452
- </bibitem></references></bibliography>
453
- </standard-document>
454
- OUTPUT
455
- end
456
-
457
- it "processes complex dl reference with dot path keys" do
458
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
459
- #{ASCIIDOC_BLANK_HDR}
460
- [bibliography]
461
- == Normative References
462
-
463
- [[ISOTC211]]
464
- [%bibitem]
465
- === {blank}
466
- fetched:: 2019-06-30
467
- title::
468
- title.type:: main
469
- title.content:: Geographic information
470
- title::
471
- title.type:: subtitle
472
- title.content:: Geographic information subtitle
473
- title.language:: en
474
- title.script:: Latn
475
- title.format:: text/plain
476
- type:: standard
477
- docid::
478
- docid.type:: ISO
479
- docid.id:: TC211
480
- docnumber:: 211
481
- edition:: 1
482
- language:: en
483
- language:: fr
484
- script:: Latn
485
- version.revision_date:: 2019-04-01
486
- version.draft:: draft
487
- biblionote.type:: bibnote
488
- biblionote.content::
489
- +
490
- --
491
- Mark set a major league
492
- home run record in 1998.
493
- --
494
- docstatus.stage:: stage
495
- docstatus.substage:: substage
496
- docstatus.iteration:: iteration
497
- date::
498
- date.type:: issued
499
- date.value:: 2014
500
- date::
501
- date.type:: published
502
- date.from:: 2014-04
503
- date.to:: 2014-05
504
- date::
505
- date.type:: accessed
506
- date.value:: 2015-05-20
507
- abstract::
508
- abstract.content::
509
- +
510
- --
511
- ISO 19115-1:2014 defines the schema required for ...
512
- --
513
- abstract::
514
- abstract.content:: L'ISO 19115-1:2014 définit le schéma requis pour ...
515
- abstract.language:: fr
516
- abstract.script:: Latn
517
- abstract.format:: text/plain
518
- copyright.owner.name:: International Organization for Standardization
519
- copyright.owner.abbreviation:: ISO
520
- copyright.owner.url:: www.iso.org
521
- copyright.from:: 2014
522
- copyright.to:: #{Time.now.year}
523
- link::
524
- link.type:: src
525
- link.content:: https://www.iso.org/standard/53798.html
526
- link::
527
- link.type:: obp
528
- link.content:: https://www.iso.org/obp/ui/#!iso:std:53798:en
529
- link::
530
- link.type:: rss
531
- link.content:: https://www.iso.org/contents/data/standard/05/37/53798.detail.rss
532
- medium::
533
- medium.form:: medium form
534
- medium.size:: medium size
535
- medium.scale:: medium scale
536
- place:: bib place
537
- extent.type:: section
538
- extent.reference_from:: 7
539
- accesslocation:: accesslocation1
540
- accesslocation:: accesslocation2
541
- classification.type:: type
542
- classification.value:: value
543
- validity.begins:: 2010-10-10 12:21
544
- validity.ends:: 2011-02-03 18:30
545
- contributor::
546
- contributor.organization.name:: International Organization for Standardization
547
- contributor.organization.url:: www.iso.org
548
- contributor.organization.abbreviation:: ISO
549
- contributor.organization.subdivision:: division
550
- contributor.role.type:: publisher
551
- contributor.role.description:: Publisher role
552
- contributor::
553
- contributor.person.name.completename.content:: A. Bierman
554
- contributor.person.name.completename.language:: en
555
- contributor.person.affiliation.organization.name:: IETF
556
- contributor.person.affiliation.organization.abbreviation:: IETF
557
- contributor.person.affiliation.organization.identifier.type:: uri
558
- contributor.person.affiliation.organization.identifier.id:: www.ietf.org
559
- contributor.person.affiliation.description:: Affiliation description
560
- contributor.person.contact::
561
- contributor.person.contact.street:: 8 Street St
562
- contributor.person.contact.city:: City
563
- contributor.person.contact.postcode:: 123456
564
- contributor.person.contact.country:: Country
565
- contributor.person.contact.state:: State
566
- contributor.person.contact::
567
- contributor.person.contact.type:: phone
568
- contributor.person.contact.value:: 223322
569
- contributor.role:: author
570
- contributor::
571
- contributor.organization.name:: IETF
572
- contributor.organization.abbreviation:: IETF
573
- contributor.organization.identifier.type:: uri
574
- contributor.organization.identifier.id:: www.ietf.org
575
- contributor.role:: publisher
576
- contributor::
577
- contributor.person.name.language:: en
578
- contributor.person.name.initial:: A.
579
- contributor.person.name.surname:: Bierman
580
- contributor.person.affiliation.organization.name:: IETF
581
- contributor.person.affiliation.organization.abbreviation:: IETF
582
- contributor.person.affiliation.description.content:: Affiliation description
583
- contributor.person.affiliation.description.language:: en
584
- contributor.person.affiliation.description.script:: Latn
585
- contributor.person.identifier.type:: uri
586
- contributor.person.identifier.id:: www.person.com
587
- contributor.role:: author
588
- relation::
589
- relation.type:: updates
590
- relation.bibitem.formattedref:: ISO 19115:2003
591
- relation.bibitem.bib_locality.type:: page
592
- relation.bibitem.bib_locality.reference_from:: 7
593
- relation.bibitem.bib_locality.reference_to:: 10
594
- relation::
595
- relation.type:: updates
596
- relation.bibitem.type:: standard
597
- relation.bibitem.formattedref:: ISO 19115:2003/Cor 1:2006
598
- series::
599
- series.type:: main
600
- series.title.type:: original
601
- series.title.content:: ISO/IEC FDIS 10118-3
602
- series.title.language:: en
603
- series.title.script:: Latn
604
- series.title.format:: text/plain
605
- series.place:: Serie's place
606
- series.organization:: Serie's organization
607
- series.abbreviation.content:: ABVR
608
- series.abbreviation.language:: en
609
- series.abbreviation.script:: Latn
610
- series.from:: 2009-02-01
611
- series.to:: 2010-12-20
612
- series.number:: serie1234
613
- series.partnumber:: part5678
614
- series::
615
- series.type:: alt
616
- series.formattedref.content:: serieref
617
- series.formattedref.language:: en
618
- series.formattedref.script:: Latn
619
-
620
- INPUT
621
- #{BLANK_HDR}
622
- <sections>
623
- </sections><bibliography><references id="_" obligation="informative" normative="true">
624
- <title>Normative references</title>
625
- #{NORM_REF_BOILERPLATE}
626
- <bibitem id="ISOTC211" type="standard">
627
- <fetched/>
628
- <title type="main" format="text/plain">Geographic information</title>
629
- <title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
630
- <uri type="src">https://www.iso.org/standard/53798.html</uri>
631
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
632
- <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
633
- <docidentifier type="ISO">TC211</docidentifier>
634
- <docnumber>211</docnumber>
635
- <date type="issued">
636
- <on>2014</on>
637
- </date>
638
- <date type="published">
639
- <from>2014-04</from>
640
- <to>2014-05</to>
641
- </date>
642
- <date type="accessed">
643
- <on>2015-05-20</on>
644
- </date>
645
- <contributor>
646
- <role type="publisher"><description>Publisher role</description></role>
647
- <organization>
648
- <name>International Organization for Standardization</name>
649
- <subdivision>division</subdivision>
650
- <abbreviation>ISO</abbreviation>
651
- <uri>www.iso.org</uri>
652
- </organization>
653
- </contributor>
654
- <contributor>
655
- <role type="author"/>
656
- <person>
657
- <name>
658
- <completename language="en">A. Bierman</completename>
659
- </name>
660
- <affiliation>
661
- <description format="text/plain">Affiliation description</description>
662
- <organization>
663
- <name>IETF</name>
664
- <abbreviation>IETF</abbreviation>
665
- <identifier type="uri">www.ietf.org</identifier>
666
- </organization>
667
- </affiliation>
668
- <address>
669
- <street>8 Street St</street>
670
- <city>City</city>
671
- <state>State</state>
672
- <country>Country</country>
673
- <postcode>123456</postcode>
674
- </address>
675
- <phone>223322</phone>
676
- </person>
677
- </contributor>
678
- <contributor>
679
- <role type="publisher"/>
680
- <organization>
681
- <name>IETF</name>
682
- <abbreviation>IETF</abbreviation>
683
- <identifier type="uri">www.ietf.org</identifier>
684
- </organization>
685
- </contributor>
686
- <contributor>
687
- <role type="author"/>
688
- <person>
689
- <name>
690
- <initial language="en">A.</initial>
691
- <surname language="en">Bierman</surname>
692
- </name>
693
- <affiliation>
694
- <description language="en" script="Latn">Affiliation description</description>
695
- <organization>
696
- <name>IETF</name>
697
- <abbreviation>IETF</abbreviation>
698
- </organization>
699
- </affiliation>
700
- <identifier type="uri">www.person.com</identifier>
701
- </person>
702
- </contributor>
703
- <edition>1</edition>
704
- <version>
705
- <revision-date>2019-04-01</revision-date>
706
- <draft>draft</draft>
707
- </version>
708
- <note type="bibnote">Mark set a major league
709
- home run record in 1998.</note>
710
- <language>en</language>
711
- <language>fr</language>
712
- <script>Latn</script>
713
- <abstract format="text/plain">ISO 19115-1:2014 defines the schema required for …​</abstract>
714
- <abstract format="text/plain" language="fr" script="Latn">L’ISO 19115-1:2014 définit le schéma requis pour …​</abstract>
715
- <status>
716
- <stage>stage</stage>
717
- <substage>substage</substage>
718
- <iteration>iteration</iteration>
719
- </status>
720
- <copyright>
721
- <from>2014</from>
722
- <to>#{Time.now.year}</to>
723
- <owner>
724
- <organization>
725
- <name>International Organization for Standardization</name>
726
- <abbreviation>ISO</abbreviation>
727
- <uri>www.iso.org</uri>
728
- </organization>
729
- </owner>
730
- </copyright>
731
- <relation type="updates">
732
- <bibitem>
733
- <formattedref format="text/plain">ISO 19115:2003</formattedref>
734
- </bibitem>
735
- </relation>
736
- <relation type="updates">
737
- <bibitem type="standard">
738
- <formattedref format="text/plain">ISO 19115:2003/Cor 1:2006</formattedref>
739
- </bibitem>
740
- </relation>
741
- <series type="main">
742
- <title type="original" format="text/plain" language="en" script="Latn">ISO/IEC FDIS 10118-3</title>
743
- <place>Serie’s place</place>
744
- <organization>Serie’s organization</organization>
745
- <abbreviation language="en" script="Latn">ABVR</abbreviation>
746
- <from>2009-02-01</from>
747
- <to>2010-12-20</to>
748
- <number>serie1234</number>
749
- <partnumber>part5678</partnumber>
750
- </series>
751
- <series type="alt">
752
- <formattedref format="text/plain" language="en" script="Latn">serieref</formattedref>
753
- </series>
754
- <medium>
755
- <form>medium form</form>
756
- <size>medium size</size>
757
- <scale>medium scale</scale>
758
- </medium>
759
- <place>bib place</place>
760
- <extent type="section">
761
- <referenceFrom>7</referenceFrom>
762
- </extent>
763
- <accesslocation>accesslocation1</accesslocation>
764
- <accesslocation>accesslocation2</accesslocation>
765
- <classification type="type">value</classification>
766
- <validity>
767
- <validityBegins>2010-10-10 12:21</validityBegins>
768
- <validityEnds>2011-02-03 18:30</validityEnds>
769
- </validity>
770
- </bibitem></references></bibliography>
771
- </standard-document>
772
- OUTPUT
773
- end
774
-
775
- it "processes mix of dl and default references" do
776
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
777
- #{ASCIIDOC_BLANK_HDR}
778
-
779
- == Section
780
-
781
- === Subsection
782
-
783
- [bibliography]
784
- === Normative References
785
-
786
- * [[[A, B]]], Title
787
-
788
- [%bibitem]
789
- ==== Standard
790
- id:: iso123
791
- docid::
792
- type::: ISO
793
- id::: ISO 123
794
- type:: standard
795
- contributor::
796
- role::: publisher
797
- organization:::
798
- name:::: ISO
799
- contributor::
800
- role::: author
801
- person:::
802
- name::::
803
- +
804
- --
805
- completename::
806
- language::: en
807
- content::: Fred
808
- --
809
- contributor::
810
- role::: author
811
- person:::
812
- name::::
813
- completename::::: Jack
814
-
815
- INPUT
816
- #{BLANK_HDR}
817
- <sections>
818
- <clause id='_' inline-header='false' obligation='normative'>
819
- <title>Section</title>
820
- <clause id='_' inline-header='false' obligation='normative'>
821
- <title>Subsection</title>
822
- </clause>
823
- <references id='_' obligation='informative' normative="true">
824
- <title>Normative References</title>
825
- <bibitem id='A'>
826
- <formattedref format='application/x-isodoc+xml'>Title</formattedref>
827
- <docidentifier>B</docidentifier>
828
- </bibitem>
829
- <bibitem id='iso123' type='standard'>
830
- <fetched/>
831
- <title type='title-main' format='text/plain'>Standard</title>
832
- <title type='main' format='text/plain'>Standard</title>
833
- <docidentifier type='ISO'>ISO 123</docidentifier>
834
- <contributor>
835
- <role type='publisher'/>
836
- <organization>
837
- <name>ISO</name>
838
- </organization>
839
- </contributor>
840
- <contributor>
841
- <role type='author'/>
842
- <person>
843
- <name>
844
- <completename language='en'>Fred</completename>
845
- </name>
846
- </person>
847
- </contributor>
848
- <contributor>
849
- <role type='author'/>
850
- <person>
851
- <name>
852
- <completename>Jack</completename>
853
- </name>
854
- </person>
855
- </contributor>
856
- </bibitem>
857
- </references>
858
- </clause>
859
- </sections>
860
- </standard-document>
861
- OUTPUT
862
-
863
- end
864
- end