metanorma-standoc 1.10.3 → 1.10.5
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 +4 -4
- data/lib/asciidoctor/standoc/base.rb +15 -5
- data/lib/asciidoctor/standoc/blocks.rb +37 -31
- data/lib/asciidoctor/standoc/cleanup.rb +12 -69
- data/lib/asciidoctor/standoc/cleanup_block.rb +6 -3
- data/lib/asciidoctor/standoc/cleanup_maths.rb +113 -21
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +60 -14
- data/lib/asciidoctor/standoc/cleanup_section.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +31 -14
- data/lib/asciidoctor/standoc/cleanup_text.rb +70 -0
- data/lib/asciidoctor/standoc/converter.rb +2 -0
- data/lib/asciidoctor/standoc/isodoc.rng +29 -9
- data/lib/asciidoctor/standoc/lists.rb +9 -6
- data/lib/asciidoctor/standoc/reqt.rb +39 -27
- data/lib/asciidoctor/standoc/reqt.rng +15 -4
- data/lib/asciidoctor/standoc/table.rb +22 -20
- data/lib/asciidoctor/standoc/validate_section.rb +2 -1
- data/lib/isodoc/base.standard.xsl +6003 -0
- data/lib/isodoc/pdf_convert.rb +20 -0
- data/lib/metanorma/standoc/processor.rb +5 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/lib/metanorma-standoc.rb +1 -0
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor/base_spec.rb +6 -0
- data/spec/asciidoctor/blocks_spec.rb +43 -23
- data/spec/asciidoctor/cleanup_sections_spec.rb +67 -1
- data/spec/asciidoctor/cleanup_spec.rb +148 -21
- data/spec/asciidoctor/isobib_cache_spec.rb +8 -8
- data/spec/asciidoctor/macros_spec.rb +114 -1
- data/spec/asciidoctor/refs_dl_spec.rb +1 -1
- data/spec/asciidoctor/refs_spec.rb +218 -442
- data/spec/asciidoctor/section_spec.rb +1 -1
- data/spec/asciidoctor/validate_spec.rb +4 -0
- data/spec/examples/datamodel/address_class_profile.adoc +1 -0
- data/spec/examples/datamodel/address_component_profile.adoc +1 -0
- data/spec/examples/datamodel/blank_definition_profile.adoc +1 -0
- data/spec/examples/datamodel/common_models_diagram.adoc +2 -1
- data/spec/examples/datamodel/top_down_diagram.adoc +2 -1
- data/spec/fixtures/datamodel_description_sections_tree.xml +326 -0
- data/spec/fixtures/test.xmi +9250 -0
- data/spec/metanorma/processor_spec.rb +50 -50
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +231 -143
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +152 -0
- data/spec/vcr_cassettes/isobib_get_123.yml +51 -35
- data/spec/vcr_cassettes/isobib_get_123_1.yml +103 -71
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +112 -80
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +51 -35
- data/spec/vcr_cassettes/isobib_get_124.yml +51 -35
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +49 -47
- 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
|
-
|
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)
|
data/lib/metanorma-standoc.rb
CHANGED
data/metanorma-standoc.gemspec
CHANGED
@@ -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.
|
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
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
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 & 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:/,
|
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'>“A” ‘B’</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))" 
|
328
|
+
|
329
|
+
....
|
330
|
+
((ppm))",
|
331
|
+
....
|
326
332
|
INPUT
|
327
333
|
output = <<~OUTPUT
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
334
|
+
#{BLANK_HDR}
|
335
|
+
<sections>
|
336
|
+
<p id='_'>
|
337
|
+
“ppt”,
|
338
|
+
<index>
|
339
|
+
<primary>ppt</primary>
|
340
|
+
</index>
|
341
|
+
</p>
|
342
|
+
<p id='_'>
|
343
|
+
“ppm”,
|
344
|
+
<index>
|
345
|
+
<primary>ppm</primary>
|
346
|
+
</index>
|
347
|
+
“ppt”
|
348
|
+
<index>
|
349
|
+
<primary>ppt</primary>
|
350
|
+
</index>
|
351
|
+
</p>
|
352
|
+
<p id='_'>
|
353
|
+
“ppm
|
354
|
+
<index>
|
355
|
+
<primary>ppm</primary>
|
356
|
+
</index>
|
357
|
+
“ 
|
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>
|
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 & /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 & /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&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}
|