metanorma-standoc 1.10.3 → 1.10.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/standoc/base.rb +15 -5
  3. data/lib/asciidoctor/standoc/blocks.rb +37 -31
  4. data/lib/asciidoctor/standoc/cleanup.rb +12 -69
  5. data/lib/asciidoctor/standoc/cleanup_block.rb +6 -3
  6. data/lib/asciidoctor/standoc/cleanup_maths.rb +113 -21
  7. data/lib/asciidoctor/standoc/cleanup_reqt.rb +60 -14
  8. data/lib/asciidoctor/standoc/cleanup_section.rb +1 -0
  9. data/lib/asciidoctor/standoc/cleanup_section_names.rb +31 -14
  10. data/lib/asciidoctor/standoc/cleanup_text.rb +70 -0
  11. data/lib/asciidoctor/standoc/converter.rb +2 -0
  12. data/lib/asciidoctor/standoc/isodoc.rng +29 -9
  13. data/lib/asciidoctor/standoc/lists.rb +9 -6
  14. data/lib/asciidoctor/standoc/reqt.rb +39 -27
  15. data/lib/asciidoctor/standoc/reqt.rng +15 -4
  16. data/lib/asciidoctor/standoc/table.rb +22 -20
  17. data/lib/asciidoctor/standoc/validate_section.rb +2 -1
  18. data/lib/isodoc/base.standard.xsl +6003 -0
  19. data/lib/isodoc/pdf_convert.rb +20 -0
  20. data/lib/metanorma/standoc/processor.rb +5 -1
  21. data/lib/metanorma/standoc/version.rb +1 -1
  22. data/lib/metanorma-standoc.rb +1 -0
  23. data/metanorma-standoc.gemspec +1 -1
  24. data/spec/asciidoctor/base_spec.rb +6 -0
  25. data/spec/asciidoctor/blocks_spec.rb +43 -23
  26. data/spec/asciidoctor/cleanup_sections_spec.rb +67 -1
  27. data/spec/asciidoctor/cleanup_spec.rb +148 -21
  28. data/spec/asciidoctor/isobib_cache_spec.rb +8 -8
  29. data/spec/asciidoctor/macros_spec.rb +114 -1
  30. data/spec/asciidoctor/refs_dl_spec.rb +1 -1
  31. data/spec/asciidoctor/refs_spec.rb +218 -442
  32. data/spec/asciidoctor/section_spec.rb +1 -1
  33. data/spec/asciidoctor/validate_spec.rb +4 -0
  34. data/spec/examples/datamodel/address_class_profile.adoc +1 -0
  35. data/spec/examples/datamodel/address_component_profile.adoc +1 -0
  36. data/spec/examples/datamodel/blank_definition_profile.adoc +1 -0
  37. data/spec/examples/datamodel/common_models_diagram.adoc +2 -1
  38. data/spec/examples/datamodel/top_down_diagram.adoc +2 -1
  39. data/spec/fixtures/datamodel_description_sections_tree.xml +326 -0
  40. data/spec/fixtures/test.xmi +9250 -0
  41. data/spec/metanorma/processor_spec.rb +50 -50
  42. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +231 -143
  43. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +152 -0
  44. data/spec/vcr_cassettes/isobib_get_123.yml +51 -35
  45. data/spec/vcr_cassettes/isobib_get_123_1.yml +103 -71
  46. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +112 -80
  47. data/spec/vcr_cassettes/isobib_get_123_2001.yml +51 -35
  48. data/spec/vcr_cassettes/isobib_get_124.yml +51 -35
  49. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  50. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +49 -47
  51. metadata +10 -4
@@ -0,0 +1,20 @@
1
+ require "isodoc"
2
+
3
+ module IsoDoc
4
+ module Standoc
5
+
6
+ # A {Converter} implementation that generates HTML output, and a document
7
+ # schema encapsulation of the document for validation
8
+ #
9
+ class PdfConvert < IsoDoc::XslfoPdfConvert
10
+ def initialize(options)
11
+ @libdir = File.dirname(__FILE__)
12
+ super
13
+ end
14
+
15
+ def pdf_stylesheet(docxml)
16
+ "base.standard.xsl"
17
+ end
18
+ end
19
+ end
20
+ end
@@ -13,6 +13,7 @@ module Metanorma
13
13
  super.merge(
14
14
  html: "html",
15
15
  doc: "doc",
16
+ pdf: "pdf",
16
17
  )
17
18
  end
18
19
 
@@ -29,12 +30,15 @@ module Metanorma
29
30
  when :html
30
31
  options = options
31
32
  .merge(htmlstylesheet: html_path("htmlstyle.scss"),
32
- htmlcoverpage: html_path("html_titlepage.html"))
33
+ htmlcoverpage: html_path("html_titlepage.html"))
33
34
  IsoDoc::HtmlConvert.new(options)
34
35
  .convert(inname, isodoc_node, nil, outname)
35
36
  when :doc
36
37
  IsoDoc::WordConvert.new(options)
37
38
  .convert(inname, isodoc_node, nil, outname)
39
+ when :pdf
40
+ IsoDoc::Standoc::PdfConvert.new(options)
41
+ .convert(inname, isodoc_node, nil, outname)
38
42
  when :presentation
39
43
  IsoDoc::PresentationXMLConvert.new(options)
40
44
  .convert(inname, isodoc_node, nil, outname)
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.10.3".freeze
22
+ VERSION = "1.10.5".freeze
23
23
  end
24
24
  end
@@ -1,4 +1,5 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
+ require_relative "isodoc/pdf_convert"
2
3
  require_relative "asciidoctor/standoc/converter"
3
4
  require_relative "metanorma/standoc/version"
4
5
  require "asciidoctor/extensions"
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_dependency "latexmath"
39
39
  spec.add_dependency "mathml2asciimath"
40
40
  spec.add_dependency "metanorma-utils", "~> 1.2.0"
41
- spec.add_dependency "relaton-cli", "~> 1.8.0"
41
+ spec.add_dependency "relaton-cli", "~> 1.9.0"
42
42
  spec.add_dependency "relaton-iev", "~> 1.1.0"
43
43
  spec.add_dependency "unicode2latex", "~> 0.0.1"
44
44
 
@@ -35,6 +35,7 @@ RSpec.describe Asciidoctor::Standoc do
35
35
  expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
36
36
  .to be_equivalent_to xmlpp(output)
37
37
  expect(File.exist?("test.doc")).to be true
38
+ expect(File.exist?("test.pdf")).to be true
38
39
  expect(File.exist?("htmlstyle.css")).to be false
39
40
  end
40
41
 
@@ -45,6 +46,7 @@ RSpec.describe Asciidoctor::Standoc do
45
46
  Author
46
47
  :docfile: test.adoc
47
48
  :novalid:
49
+ :no-pdf:
48
50
  :language: ar
49
51
  INPUT
50
52
  output = <<~OUTPUT
@@ -887,6 +889,7 @@ RSpec.describe Asciidoctor::Standoc do
887
889
  Author
888
890
  :docfile: test.adoc
889
891
  :novalid:
892
+ :no-pdf:
890
893
  :scripts: spec/assets/scripts.html
891
894
  INPUT
892
895
  html = File.read("test.html", encoding: "utf-8")
@@ -899,6 +902,7 @@ RSpec.describe Asciidoctor::Standoc do
899
902
  = Document title
900
903
  Author
901
904
  :docfile: test.adoc
905
+ :no-pdf:
902
906
  :novalid:
903
907
  :script: Hans
904
908
  :body-font: Zapf Chancery
@@ -934,6 +938,7 @@ RSpec.describe Asciidoctor::Standoc do
934
938
  Author
935
939
  :docfile: test.adoc
936
940
  :novalid:
941
+ :no-pdf:
937
942
  :script: Hans
938
943
  :body-font: Zapf Chancery
939
944
  :header-font: Comic Sans
@@ -974,6 +979,7 @@ QU1FOiB0ZXN0Cgo=
974
979
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
975
980
  = Document title
976
981
  Author
982
+ :no-pdf:
977
983
  :docfile: test.adoc
978
984
  :doctype: standard
979
985
  :encoding: utf-8
@@ -264,6 +264,8 @@ RSpec.describe Asciidoctor::Standoc do
264
264
  </sections>
265
265
  </standard-document>
266
266
  OUTPUT
267
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
268
+ .to be_equivalent_to xmlpp(output)
267
269
  end
268
270
 
269
271
  it "processes review blocks if document is in draft mode" do
@@ -1173,7 +1175,7 @@ RSpec.describe Asciidoctor::Standoc do
1173
1175
  it "processes recommendation" do
1174
1176
  input = <<~"INPUT"
1175
1177
  #{ASCIIDOC_BLANK_HDR}
1176
- [.recommendation,label="/ogc/recommendation/wfs/2",subject="user",inherit="/ss/584/2015/level/1; /ss/584/2015/level/2",options="unnumbered",type=verification,model=ogc]
1178
+ [.recommendation,label="/ogc/recommendation/wfs/2",subject="user;developer, implementer",inherit="/ss/584/2015/level/1; /ss/584/2015/level/2",options="unnumbered",type=verification,model=ogc]
1177
1179
  ====
1178
1180
  I recommend this
1179
1181
  ====
@@ -1184,6 +1186,7 @@ RSpec.describe Asciidoctor::Standoc do
1184
1186
  <recommendation id="_" unnumbered="true" type="verification" model="ogc">
1185
1187
  <label>/ogc/recommendation/wfs/2</label>
1186
1188
  <subject>user</subject>
1189
+ <subject>developer, implementer</subject>
1187
1190
  <inherit>/ss/584/2015/level/1</inherit>
1188
1191
  <inherit>/ss/584/2015/level/2</inherit>
1189
1192
  <description><p id="_">I recommend this</p></description>
@@ -1330,31 +1333,48 @@ RSpec.describe Asciidoctor::Standoc do
1330
1333
  success-response()
1331
1334
  ----
1332
1335
  --
1336
+
1337
+ [.component]
1338
+ --
1339
+ Hello
1340
+ --
1341
+
1342
+ [.component,class=condition]
1343
+ --
1344
+ If this be thus
1345
+ --
1333
1346
  ====
1334
1347
  INPUT
1335
1348
  output = <<~"OUTPUT"
1336
- #{BLANK_HDR}
1337
- <sections>
1338
- <recommendation id="ABC" obligation="permission,recommendation" filename="reqt1.rq"><label>/ogc/recommendation/wfs/2</label><subject>user</subject>
1339
- <classification><tag>control-class</tag><value>Technical</value></classification><classification><tag>priority</tag><value>P0</value></classification><classification><tag>family</tag><value>System &amp; Communications Protection</value></classification><classification><tag>family</tag><value>System and Communications Protocols</value></classification>
1340
- <description><p id="_">I recommend <em>this</em>.</p>
1341
- </description><specification exclude="false" type="tabular" keep-with-next="true" keep-lines-together="true"><p id="_">This is the object of the recommendation:</p><table id="_"> <tbody> <tr> <td valign="top" align="left">Object</td> <td valign="top" align="left">Value</td> </tr> <tr> <td valign="top" align="left">Mission</td> <td valign="top" align="left">Accomplished</td> </tr> </tbody></table></specification><description>
1342
- <p id="_">As for the measurement targets,</p>
1343
- </description><measurement-target exclude="false"><p id="_">The measurement target shall be measured as:</p><formula id="_"> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
1344
- <mrow>
1345
- <mi>r</mi>
1346
- </mrow>
1347
- <mrow>
1348
- <mn>1</mn>
1349
- </mrow>
1350
- </mfrac><mo>=</mo><mn>0</mn></math></stem></formula></measurement-target>
1351
- <verification exclude="false"><p id="_">The following code will be run for verification:</p><sourcecode lang="CoreRoot" id="_">CoreRoot(success): HttpResponse
1352
- if (success)
1353
- recommendation(label: success-response)
1354
- end</sourcecode></verification>
1355
- <import exclude="true"> <sourcecode lang="CoreRoot" id="_">success-response()</sourcecode></import></recommendation>
1356
- </sections>
1357
- </standard-document>
1349
+ #{BLANK_HDR}
1350
+ <sections>
1351
+ <recommendation id="ABC" obligation="permission,recommendation" filename="reqt1.rq"><label>/ogc/recommendation/wfs/2</label><subject>user</subject>
1352
+ <classification><tag>control-class</tag><value>Technical</value></classification><classification><tag>priority</tag><value>P0</value></classification><classification><tag>family</tag><value>System &amp; Communications Protection</value></classification><classification><tag>family</tag><value>System and Communications Protocols</value></classification>
1353
+ <description><p id="_">I recommend <em>this</em>.</p>
1354
+ </description><specification exclude="false" type="tabular" keep-with-next="true" keep-lines-together="true"><p id="_">This is the object of the recommendation:</p><table id="_"> <tbody> <tr> <td valign="top" align="left">Object</td> <td valign="top" align="left">Value</td> </tr> <tr> <td valign="top" align="left">Mission</td> <td valign="top" align="left">Accomplished</td> </tr> </tbody></table></specification><description>
1355
+ <p id="_">As for the measurement targets,</p>
1356
+ </description><measurement-target exclude="false"><p id="_">The measurement target shall be measured as:</p><formula id="_"> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
1357
+ <mrow>
1358
+ <mi>r</mi>
1359
+ </mrow>
1360
+ <mrow>
1361
+ <mn>1</mn>
1362
+ </mrow>
1363
+ </mfrac><mo>=</mo><mn>0</mn></math></stem></formula></measurement-target>
1364
+ <verification exclude="false"><p id="_">The following code will be run for verification:</p><sourcecode lang="CoreRoot" id="_">CoreRoot(success): HttpResponse
1365
+ if (success)
1366
+ recommendation(label: success-response)
1367
+ end</sourcecode></verification>
1368
+ <import exclude="true"> <sourcecode lang="CoreRoot" id="_">success-response()</sourcecode></import>
1369
+ <component exclude='false' class='component'>
1370
+ <p id='_'>Hello</p>
1371
+ </component>
1372
+ <component exclude='false' class='condition'>
1373
+ <p id='_'>If this be thus</p>
1374
+ </component>
1375
+ </recommendation>
1376
+ </sections>
1377
+ </standard-document>
1358
1378
  OUTPUT
1359
1379
 
1360
1380
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
@@ -1357,7 +1357,7 @@ RSpec.describe Asciidoctor::Standoc do
1357
1357
 
1358
1358
  it "processes section names, internationalisation file" do
1359
1359
  input = <<~INPUT
1360
- #{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ':i18nyaml: spec/assets/i18n.yaml')}
1360
+ #{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":no-pdf:\n:i18nyaml: spec/assets/i18n.yaml")}
1361
1361
  .Foreword
1362
1362
 
1363
1363
  Text
@@ -1588,4 +1588,70 @@ RSpec.describe Asciidoctor::Standoc do
1588
1588
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1589
1589
  .to be_equivalent_to xmlpp(output)
1590
1590
  end
1591
+
1592
+ it "adds variant titles" do
1593
+ input = <<~INPUT
1594
+ #{ASCIIDOC_BLANK_HDR}
1595
+
1596
+ == Clause
1597
+ Text
1598
+
1599
+ === Subclause
1600
+
1601
+ [.variant-title,type=toc]
1602
+ Clause _A_ stem:[x]
1603
+
1604
+ [.variant-title,type=sub]
1605
+ "A" 'B'
1606
+
1607
+ Text
1608
+
1609
+ [appendix]
1610
+ == Clause
1611
+
1612
+ [.variant-title,type=toc]
1613
+ Clause _A_ stem:[x]
1614
+
1615
+ Text
1616
+ INPUT
1617
+ output = <<~OUTPUT
1618
+ #{BLANK_HDR}
1619
+ <sections>
1620
+ <clause id='_' inline-header='false' obligation='normative'>
1621
+ <title>Clause</title>
1622
+ <p id='_'>Text</p>
1623
+ <clause id='_' inline-header='false' obligation='normative'>
1624
+ <title>Subclause</title>
1625
+ <variant-title variant_title='true' type='sub'>&#8220;A&#8221; &#8216;B&#8217;</variant-title>
1626
+ <variant-title variant_title='true' type='toc'>
1627
+ Clause
1628
+ <em>A</em>
1629
+ <stem type='MathML'>
1630
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1631
+ <mi>x</mi>
1632
+ </math>
1633
+ </stem>
1634
+ </variant-title>
1635
+ <p id='_'>Text</p>
1636
+ </clause>
1637
+ </clause>
1638
+ </sections>
1639
+ <annex id='_' inline-header='false' obligation='normative'>
1640
+ <title>Clause</title>
1641
+ <variant-title variant_title='true' type='toc'>
1642
+ Clause
1643
+ <em>A</em>
1644
+ <stem type='MathML'>
1645
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1646
+ <mi>x</mi>
1647
+ </math>
1648
+ </stem>
1649
+ </variant-title>
1650
+ <p id='_'>Text</p>
1651
+ </annex>
1652
+ </standard-document>
1653
+ OUTPUT
1654
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1655
+ .to be_equivalent_to xmlpp(output)
1656
+ end
1591
1657
  end
@@ -323,28 +323,44 @@ RSpec.describe Asciidoctor::Standoc do
323
323
  "((ppt))",
324
324
 
325
325
  "((ppm))", "((ppt))"
326
+
327
+ "((ppm))"&#xa0;
328
+
329
+ ....
330
+ ((ppm))",
331
+ ....
326
332
  INPUT
327
333
  output = <<~OUTPUT
328
- #{BLANK_HDR}
329
- <sections>
330
- <p id='_'>
331
- &#8220;ppt&#8221;,
332
- <index>
333
- <primary>ppt</primary>
334
- </index>
335
- </p>
336
- <p id='_'>
337
- &#8220;ppm&#8221;,
338
- <index>
339
- <primary>ppm</primary>
340
- </index>
341
- &#8220;ppt&#8221;
342
- <index>
343
- <primary>ppt</primary>
344
- </index>
345
- </p>
346
- </sections>
347
- </standard-document>
334
+ #{BLANK_HDR}
335
+ <sections>
336
+ <p id='_'>
337
+ &#8220;ppt&#8221;,
338
+ <index>
339
+ <primary>ppt</primary>
340
+ </index>
341
+ </p>
342
+ <p id='_'>
343
+ &#8220;ppm&#8221;,
344
+ <index>
345
+ <primary>ppm</primary>
346
+ </index>
347
+ &#8220;ppt&#8221;
348
+ <index>
349
+ <primary>ppt</primary>
350
+ </index>
351
+ </p>
352
+ <p id='_'>
353
+ &#8220;ppm
354
+ <index>
355
+ <primary>ppm</primary>
356
+ </index>
357
+ &#8220;&#160;
358
+ </p>
359
+ <figure id='_'>
360
+ <pre id='_'>((ppm))",</pre>
361
+ </figure>
362
+ </sections>
363
+ </standard-document>
348
364
  OUTPUT
349
365
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
350
366
  .to be_equivalent_to xmlpp(output)
@@ -1523,7 +1539,7 @@ RSpec.describe Asciidoctor::Standoc do
1523
1539
  <abstract format="text/plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
1524
1540
  <status>
1525
1541
  <stage>60</stage>
1526
- <substage>60</substage>
1542
+ <substage>00</substage>
1527
1543
  </status>
1528
1544
  <copyright>
1529
1545
  <from>2009</from>
@@ -1663,6 +1679,33 @@ RSpec.describe Asciidoctor::Standoc do
1663
1679
  .to be_equivalent_to xmlpp(output)
1664
1680
  end
1665
1681
 
1682
+ it "cleans up nested mathvariant instances" do
1683
+ input = <<~INPUT
1684
+ #{ASCIIDOC_BLANK_HDR}
1685
+
1686
+ stem:[sf "unitsml(cd)"]
1687
+ INPUT
1688
+ output = <<~OUTPUT
1689
+ <sections>
1690
+ <p id='_'>
1691
+ <stem type='MathML'>
1692
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1693
+ <mstyle mathvariant='sans-serif'>
1694
+ <mrow xref='U_NISTu7'>
1695
+ <mi mathvariant='sans-serif'>cd</mi>
1696
+ </mrow>
1697
+ </mstyle>
1698
+ </math>
1699
+ </stem>
1700
+ </p>
1701
+ </sections>
1702
+ OUTPUT
1703
+ expect(xmlpp(strip_guid(Nokogiri::XML(
1704
+ Asciidoctor.convert(input, *OPTIONS),
1705
+ ).at("//xmlns:sections").to_xml)))
1706
+ .to be_equivalent_to xmlpp(output)
1707
+ end
1708
+
1666
1709
  it "removes nested bibitem IDs" do
1667
1710
  input = <<~INPUT
1668
1711
  #{BLANK_HDR}
@@ -2084,6 +2127,90 @@ RSpec.describe Asciidoctor::Standoc do
2084
2127
  .to be_equivalent_to xmlpp(output)
2085
2128
  end
2086
2129
 
2130
+ it "moves metadata deflist to correct location" do
2131
+ input = <<~INPUT
2132
+ #{ASCIIDOC_BLANK_HDR}
2133
+
2134
+ == Clause
2135
+
2136
+ [.requirement,subsequence="A",inherit="/ss/584/2015/level/1 &amp; /ss/584/2015/level/2"]
2137
+ ====
2138
+ [%metadata]
2139
+ model:: ogc
2140
+ type:: class
2141
+ label:: http://www.opengis.net/spec/waterml/2.0/req/xsd-xml-rules[*req/core*]
2142
+ subject:: Encoding of logical models
2143
+ inherit:: urn:iso:dis:iso:19156:clause:7.2.2
2144
+ inherit:: urn:iso:dis:iso:19156:clause:8
2145
+ inherit:: http://www.opengis.net/doc/IS/GML/3.2/clause/2.4
2146
+ inherit:: O&M Abstract model, OGC 10-004r3, clause D.3.4
2147
+ inherit:: http://www.opengis.net/spec/SWE/2.0/req/core/core-concepts-used
2148
+ inherit:: <<ref2>>
2149
+ inherit:: <<ref3>>
2150
+ classification:: priority:P0
2151
+ classification:: domain:Hydrology,Groundwater
2152
+ classification:: control-class:Technical
2153
+ obligation:: recommendation,requirement
2154
+
2155
+ I recommend this
2156
+ ====
2157
+ INPUT
2158
+ output = <<~OUTPUT
2159
+ #{BLANK_HDR}
2160
+ <sections>
2161
+ <clause id='_' inline-header='false' obligation='normative'>
2162
+ <title>Clause</title>
2163
+ <requirement id='_' subsequence='A'>
2164
+ <label>
2165
+ <link target='http://www.opengis.net/spec/waterml/2.0/req/xsd-xml-rules'>
2166
+ <strong>req/core</strong>
2167
+ </link>
2168
+ </label>
2169
+ <subject>Encoding of logical models</subject>
2170
+ <inherit>/ss/584/2015/level/1 &amp; /ss/584/2015/level/2</inherit>
2171
+ <inherit>urn:iso:dis:iso:19156:clause:7.2.2</inherit>
2172
+ <inherit>urn:iso:dis:iso:19156:clause:8</inherit>
2173
+ <inherit>
2174
+ <link target='http://www.opengis.net/doc/IS/GML/3.2/clause/2.4'/>
2175
+ </inherit>
2176
+ <inherit>O&amp;M Abstract model, OGC 10-004r3, clause D.3.4</inherit>
2177
+ <inherit>
2178
+ <link target='http://www.opengis.net/spec/SWE/2.0/req/core/core-concepts-used'/>
2179
+ </inherit>
2180
+ <inherit>
2181
+ <xref target='ref2'/>
2182
+ </inherit>
2183
+ <inherit>
2184
+ <xref target='ref3'/>
2185
+ </inherit>
2186
+ <classification>
2187
+ <tag>control-class</tag>
2188
+ <value>Technical</value>
2189
+ </classification>
2190
+ <classification>
2191
+ <tag>domain</tag>
2192
+ <value>Groundwater</value>
2193
+ </classification>
2194
+ <classification>
2195
+ <tag>domain</tag>
2196
+ <value>Hydrology</value>
2197
+ </classification>
2198
+ <classification>
2199
+ <tag>priority</tag>
2200
+ <value>P0</value>
2201
+ </classification>
2202
+ <description>
2203
+ <p id='_'>I recommend this</p>
2204
+ </description>
2205
+ </requirement>
2206
+ </clause>
2207
+ </sections>
2208
+ </standard-document>
2209
+ OUTPUT
2210
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
2211
+ .to be_equivalent_to xmlpp(output)
2212
+ end
2213
+
2087
2214
  it "moves inherit macros to correct location" do
2088
2215
  input = <<~INPUT
2089
2216
  #{ASCIIDOC_BLANK_HDR}