metanorma-iso 2.2.1 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iso/html/header-dis.html +111 -29
  3. data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
  4. data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
  5. data/lib/isodoc/iso/html/style-human.css +2 -3
  6. data/lib/isodoc/iso/html/style-human.scss +0 -1
  7. data/lib/isodoc/iso/html/style-iso.css +2 -3
  8. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +10 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +10 -4
  11. data/lib/isodoc/iso/i18n-en.yaml +13 -8
  12. data/lib/isodoc/iso/i18n-fr.yaml +9 -3
  13. data/lib/isodoc/iso/i18n-ru.yaml +9 -2
  14. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -2
  15. data/lib/isodoc/iso/iso.amendment.xsl +226 -40
  16. data/lib/isodoc/iso/iso.international-standard.xsl +226 -40
  17. data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
  18. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
  19. data/lib/isodoc/iso/presentation_xref.rb +10 -7
  20. data/lib/isodoc/iso/sections.rb +1 -1
  21. data/lib/isodoc/iso/word_convert.rb +6 -4
  22. data/lib/isodoc/iso/word_dis_cleanup.rb +24 -3
  23. data/lib/isodoc/iso/word_dis_convert.rb +4 -1
  24. data/lib/metanorma/iso/base.rb +2 -1
  25. data/lib/metanorma/iso/basicdoc.rng +0 -27
  26. data/lib/metanorma/iso/biblio-standoc.rng +164 -0
  27. data/lib/metanorma/iso/biblio.rng +50 -18
  28. data/lib/metanorma/iso/isodoc.rng +68 -206
  29. data/lib/metanorma/iso/isostandard-amd.rng +3 -54
  30. data/lib/metanorma/iso/isostandard-compile.rng +7 -0
  31. data/lib/metanorma/iso/isostandard.rng +1 -195
  32. data/lib/metanorma/iso/relaton-iso.rng +225 -0
  33. data/lib/metanorma/iso/validate.rb +6 -6
  34. data/lib/metanorma/iso/version.rb +1 -1
  35. data/lib/metanorma/requirements/modspec.rb +22 -38
  36. data/metanorma-iso.gemspec +5 -2
  37. metadata +7 -86
  38. data/.github/workflows/rake.yml +0 -15
  39. data/.github/workflows/release.yml +0 -24
  40. data/.github/workflows/ubuntu.yml +0 -41
  41. data/Rakefile +0 -8
  42. data/bin/rspec +0 -17
  43. data/spec/assets/header.html +0 -7
  44. data/spec/assets/html.css +0 -2
  45. data/spec/assets/htmlcover.html +0 -4
  46. data/spec/assets/htmlintro.html +0 -5
  47. data/spec/assets/i18n.yaml +0 -2
  48. data/spec/assets/iso.adoc +0 -10
  49. data/spec/assets/iso.headless.html +0 -33
  50. data/spec/assets/iso.xml +0 -71
  51. data/spec/assets/rice_image1.png +0 -0
  52. data/spec/assets/scripts.html +0 -3
  53. data/spec/assets/std.css +0 -2
  54. data/spec/assets/word.css +0 -2
  55. data/spec/assets/wordcover.html +0 -3
  56. data/spec/assets/wordintro.html +0 -4
  57. data/spec/examples/103_01_02.html +0 -247
  58. data/spec/examples/english.yaml +0 -69
  59. data/spec/examples/iso_123_.xml +0 -45
  60. data/spec/examples/iso_123_all_parts.xml +0 -45
  61. data/spec/examples/iso_123_no_year_note.xml +0 -46
  62. data/spec/examples/iso_124_.xml +0 -41
  63. data/spec/examples/iso_216_.xml +0 -47
  64. data/spec/examples/iso_iec_12382_.xml +0 -48
  65. data/spec/examples/rice.adoc +0 -714
  66. data/spec/examples/rice.preview.html +0 -1870
  67. data/spec/examples/rice.sh +0 -4
  68. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  69. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  70. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  71. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  72. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  73. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  74. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  75. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  76. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  77. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  78. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  79. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  80. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  81. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  82. data/spec/examples/rice_img/rice_image1.png +0 -0
  83. data/spec/examples/rice_img/rice_image2.png +0 -0
  84. data/spec/examples/rice_img/rice_image3_1.png +0 -0
  85. data/spec/examples/rice_img/rice_image3_2.png +0 -0
  86. data/spec/examples/rice_img/rice_image3_3.png +0 -0
  87. data/spec/isodoc/amd_spec.rb +0 -986
  88. data/spec/isodoc/blocks_spec.rb +0 -1174
  89. data/spec/isodoc/i18n_spec.rb +0 -1579
  90. data/spec/isodoc/inline_spec.rb +0 -1060
  91. data/spec/isodoc/iso_spec.rb +0 -255
  92. data/spec/isodoc/metadata_spec.rb +0 -701
  93. data/spec/isodoc/postproc_spec.rb +0 -1089
  94. data/spec/isodoc/ref_spec.rb +0 -439
  95. data/spec/isodoc/section_spec.rb +0 -998
  96. data/spec/isodoc/table_spec.rb +0 -420
  97. data/spec/isodoc/terms_spec.rb +0 -314
  98. data/spec/isodoc/word_dis_spec.rb +0 -2064
  99. data/spec/isodoc/xref_spec.rb +0 -1747
  100. data/spec/metanorma/amd_spec.rb +0 -724
  101. data/spec/metanorma/base_spec.rb +0 -1384
  102. data/spec/metanorma/blank_spec.rb +0 -38
  103. data/spec/metanorma/blocks_spec.rb +0 -624
  104. data/spec/metanorma/cleanup_spec.rb +0 -1645
  105. data/spec/metanorma/inline_spec.rb +0 -203
  106. data/spec/metanorma/lists_spec.rb +0 -197
  107. data/spec/metanorma/macros_spec.rb +0 -99
  108. data/spec/metanorma/processor_spec.rb +0 -161
  109. data/spec/metanorma/refs_spec.rb +0 -672
  110. data/spec/metanorma/section_spec.rb +0 -492
  111. data/spec/metanorma/table_spec.rb +0 -329
  112. data/spec/metanorma/validate_spec.rb +0 -2153
  113. data/spec/relaton/render_spec.rb +0 -568
  114. data/spec/requirements/requirement_components_spec.rb +0 -622
  115. data/spec/requirements/requirements_spec.rb +0 -1681
  116. data/spec/requirements/xref_spec.rb +0 -1211
  117. data/spec/spec_helper.rb +0 -313
  118. data/spec/vcr_cassettes/docrels.yml +0 -385
  119. data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,1681 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe Metanorma::Requirements::Iso::Modspec do
4
- it "treates Modspec requirements as tables for cross-referencing" do
5
- input = <<~INPUT
6
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
7
- <preface><foreword id="A"><title>Preface</title>
8
- <table id="A0"/>
9
- <permission model="ogc" id="A1">
10
- <title>First</title>
11
- <identifier>/ogc/recommendation/wfs/2</identifier>
12
- </permission>
13
- <table id="A2"/>
14
- </foreword>
15
- <introduction id="B"><title>Introduction</title>
16
- <p><xref target="A0"/><xref target="A1"/><xref target="A2"/></p>
17
- </introduction>
18
- </preface>
19
- </ogc-standard>
20
- INPUT
21
- presxml = <<~OUTPUT
22
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
23
- <preface>
24
- <foreword id='A' displayorder='1'>
25
- <title>Preface</title>
26
- <table id='A0'>
27
- <name>Table 1</name>
28
- </table>
29
- <table id='A1' class='modspec' type='recommend'>
30
- <name>Table 2 — Permission 1: First</name>
31
- <tbody>
32
- <tr>
33
- <td>Identifier</td>
34
- <td>
35
- <tt>/ogc/recommendation/wfs/2</tt>
36
- </td>
37
- </tr>
38
- </tbody>
39
- </table>
40
- <table id='A2'>
41
- <name>Table 3</name>
42
- </table>
43
- </foreword>
44
- <introduction id='B' displayorder='2'>
45
- <title>Introduction</title>
46
- <p>
47
- <xref target='A0'>
48
- <span class='citetbl'>Table 1</span>
49
- </xref>
50
- <xref target='A1'>
51
- <span class='citetbl'>Table 2, Permission 1</span>
52
- </xref>
53
- <xref target='A2'>
54
- <span class='citetbl'>Table 3</span>
55
- </xref>
56
- </p>
57
- </introduction>
58
- </preface>
59
- </ogc-standard>
60
- OUTPUT
61
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
62
- .convert("test", input, true)
63
- .gsub(%r{^.*<body}m, "<body")
64
- .gsub(%r{</body>.*}m, "</body>")))
65
- .to be_equivalent_to xmlpp(presxml)
66
- end
67
-
68
- it "processes permissions" do
69
- input = <<~INPUT
70
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
71
- <preface><foreword id="A"><title>Preface</title>
72
- <permission model="ogc" id="A1">
73
- <title>First</title>
74
- <identifier>/ogc/recommendation/wfs/2</identifier>
75
- <inherit>/ss/584/2015/level/1</inherit>
76
- <inherit><eref type="inline" bibitemid="rfc2616" citeas="RFC 2616">RFC 2616 (HTTP/1.1)</eref></inherit>
77
- <subject>user</subject>
78
- <classification> <tag>control-class</tag> <value>Technical</value> </classification><classification> <tag>priority</tag> <value>P0</value> </classification><classification> <tag>family</tag> <value>System and Communications Protection</value> </classification><classification> <tag>family</tag> <value>System and Communications Protocols</value> </classification>
79
- <description>
80
- <p id="_">I recommend <em>this</em>.</p>
81
- </description>
82
- <specification exclude="true" type="tabular">
83
- <p id="_">This is the object of the recommendation:</p>
84
- <table id="_">
85
- <tbody>
86
- <tr>
87
- <td style="text-align:left;">Object</td>
88
- <td style="text-align:left;">Value</td>
89
- <td style="text-align:left;">Accomplished</td>
90
- </tr>
91
- </tbody>
92
- </table>
93
- </specification>
94
- <description>
95
- <dl>
96
- <dt>A</dt><dd>B</dd>
97
- <dt>C</dt><dd>D</dd>
98
- </dl>
99
- </description>
100
- <measurement-target exclude="false">
101
- <p id="_">The measurement target shall be measured as:</p>
102
- <formula id="_">
103
- <stem type="AsciiMath">r/1 = 0</stem>
104
- </formula>
105
- </measurement-target>
106
- <verification exclude="false">
107
- <p id="_">The following code will be run for verification:</p>
108
- <sourcecode id="_">CoreRoot(success): HttpResponse
109
- if (success)
110
- recommendation(label: success-response)
111
- end
112
- </sourcecode>
113
- </verification>
114
- <import exclude="true">
115
- <sourcecode id="_">success-response()</sourcecode>
116
- </import>
117
- <component class="test-purpose"><p>TEST PURPOSE</p></component>
118
- <component class="test-method"><p>TEST METHOD</p></component>
119
- <component class="conditions"><p>CONDITIONS</p></component>
120
- <component class="part"><p>FIRST PART</p></component>
121
- <component class="part"><p>SECOND PART</p></component>
122
- <component class="part"><p>THIRD PART</p></component>
123
- <component class="reference"><p>REFERENCE PART</p></component>
124
- <component class="panda GHz express"><p>PANDA PART</p></component>
125
- </permission>
126
- </foreword></preface>
127
- <bibliography><references id="_bibliography" obligation="informative" normative="false">
128
- <title>Bibliography</title>
129
- <bibitem id="rfc2616" type="standard"> <fetched>2020-03-27</fetched> <title format="text/plain" language="en" script="Latn">Hypertext Transfer Protocol — HTTP/1.1</title> <uri type="xml">https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml</uri> <uri type="src">https://www.rfc-editor.org/info/rfc2616</uri> <docidentifier type="IETF">RFC 2616</docidentifier> <docidentifier type="IETF" scope="anchor">RFC2616</docidentifier> <docidentifier type="DOI">10.17487/RFC2616</docidentifier> <date type="published"> <on>1999-06</on> </date> <contributor> <role type="author"/> <person> <name> <completename language="en">R. Fielding</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Gettys</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">J. Mogul</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">H. Frystyk</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">L. Masinter</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">P. Leach</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <contributor> <role type="author"/> <person> <name> <completename language="en">T. Berners-Lee</completename> </name> <affiliation> <organization> <name>IETF</name> <abbreviation>IETF</abbreviation> </organization> </affiliation> </person> </contributor> <language>en</language> <script>Latn</script> <abstract format="text/plain" language="en" script="Latn">HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068. [STANDARDS-TRACK]</abstract> <series type="main"> <title format="text/plain" language="en" script="Latn">RFC</title> <number>2616</number> </series> <place>Fremont, CA</place></bibitem>
130
- </references></bibliography>
131
- </ogc-standard>
132
- INPUT
133
-
134
- presxml = <<~OUTPUT
135
- <ogc-standard xmlns="https://standards.opengeospatial.org/document" type="presentation">
136
- <preface><foreword id="A" displayorder="1"><title>Preface</title>
137
- <table id="A1" class="modspec" type="recommend">
138
- <name>Table 1 — Permission 1: First</name>
139
- <tbody>
140
- <tr><td>Identifier</td><td><tt>/ogc/recommendation/wfs/2</tt></td></tr>
141
- <tr><td>Subject</td><td>user</td></tr><tr><td>Dependency</td><td>/ss/584/2015/level/1</td></tr><tr><td>Dependency</td><td><eref type="inline" bibitemid="rfc2616" citeas="RFC 2616">RFC 2616 (HTTP/1.1)</eref></td></tr>
142
- <tr>
143
- <td>Control-class</td>
144
- <td>Technical</td>
145
- </tr>
146
- <tr>
147
- <td>Priority</td>
148
- <td>P0</td>
149
- </tr>
150
- <tr>
151
- <td>Family</td>
152
- <td>System and Communications Protection</td>
153
- </tr>
154
- <tr>
155
- <td>Family</td>
156
- <td>System and Communications Protocols</td>
157
- </tr>
158
- <tr>
159
- <td>Statement</td><td>
160
- <p id='_'>
161
- I recommend
162
- <em>this</em>
163
- .
164
- </p>
165
- </td>
166
- </tr>
167
- <tr>
168
- <td>Statement</td>
169
- <td>
170
- <dl>
171
- <dt>A</dt>
172
- <dd>B</dd>
173
- <dt>C</dt>
174
- <dd>D</dd>
175
- </dl>
176
- </td>
177
- </tr>
178
- <tr>
179
- <td colspan='2'>
180
- <p id='_'>The measurement target shall be measured as:</p>
181
- <formula id='_'>
182
- <name>1</name>
183
- <stem type='AsciiMath'>r/1 = 0</stem>
184
- </formula>
185
- </td>
186
- </tr>
187
- <tr>
188
- <td colspan='2'>
189
- <p id='_'>The following code will be run for verification:</p>
190
- <sourcecode id='_'>
191
- CoreRoot(success): HttpResponse if (success)
192
- recommendation(label: success-response) end
193
- </sourcecode>
194
- </td>
195
- </tr>
196
- <tr>
197
- <td>Test purpose</td>
198
- <td>
199
- <p>TEST PURPOSE</p>
200
- </td>
201
- </tr>
202
- <tr>
203
- <td>Test method</td>
204
- <td>
205
- <p>TEST METHOD</p>
206
- </td>
207
- </tr>
208
- <tr>
209
- <td>Conditions</td>
210
- <td>
211
- <p>CONDITIONS</p>
212
- </td>
213
- </tr>
214
- <tr>
215
- <td>A</td>
216
- <td>
217
- <p>FIRST PART</p>
218
- </td>
219
- </tr>
220
- <tr>
221
- <td>B</td>
222
- <td>
223
- <p>SECOND PART</p>
224
- </td>
225
- </tr>
226
- <tr>
227
- <td>C</td>
228
- <td>
229
- <p>THIRD PART</p>
230
- </td>
231
- </tr>
232
- <tr>
233
- <td>Reference</td>
234
- <td>
235
- <p>REFERENCE PART</p>
236
- </td>
237
- </tr>
238
- <tr>
239
- <td>Panda GHz express</td>
240
- <td>
241
- <p>PANDA PART</p>
242
- </td>
243
- </tr>
244
- </tbody></table>
245
- </foreword></preface>
246
- <bibliography><references id="_bibliography" obligation="informative" normative="false" displayorder="2">
247
- <title depth="1">Bibliography</title>
248
- <bibitem id="rfc2616" type="standard">
249
- <formattedref> <em>
250
- <span class='stddocTitle'>Hypertext Transfer Protocol — HTTP/1.1</span>
251
- </em>
252
- </formattedref>
253
- <uri type='xml'>https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml</uri>
254
- <uri type='src'>https://www.rfc-editor.org/info/rfc2616</uri>
255
- <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
256
- <docidentifier type='IETF'>IETF RFC 2616</docidentifier>
257
- <docidentifier type='IETF' scope='anchor'>IETF RFC2616</docidentifier>
258
- <docidentifier type='DOI'>DOI 10.17487/RFC2616</docidentifier>
259
- </bibitem>
260
- </references></bibliography>
261
- </ogc-standard>
262
- OUTPUT
263
-
264
- html = <<~OUTPUT
265
- <body lang='en'>
266
- <div class='title-section'>
267
- <p> </p>
268
- </div>
269
- <br/>
270
- <div class='prefatory-section'>
271
- <p> </p>
272
- </div>
273
- <br/>
274
- <div class='main-section'>
275
- <br/>
276
- <div id='A'>
277
- <h1 class='ForewordTitle'>Preface</h1>
278
- <p class='TableTitle' style='text-align:center;'>Table 1 — Permission 1: First</p>
279
- <table id='A1' class='modspec' style='border-width:1px;border-spacing:0;'>
280
- <tbody>
281
- <tr>
282
- <td style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>Identifier</td>
283
- <td style='border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>
284
- <tt>/ogc/recommendation/wfs/2</tt>
285
- </td>
286
- </tr>
287
- <tr>
288
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Subject</td>
289
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>user</td>
290
- </tr>
291
- <tr>
292
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Dependency</td>
293
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>/ss/584/2015/level/1</td>
294
- </tr>
295
- <tr>
296
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Dependency</td>
297
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
298
- <a href='#rfc2616'>RFC 2616 (HTTP/1.1)</a>
299
- </td>
300
- </tr>
301
- <tr>
302
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Control-class</td>
303
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Technical</td>
304
- </tr>
305
- <tr>
306
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Priority</td>
307
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>P0</td>
308
- </tr>
309
- <tr>
310
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Family</td>
311
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>System and Communications Protection</td>
312
- </tr>
313
- <tr>
314
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Family</td>
315
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>System and Communications Protocols</td>
316
- </tr>
317
- <tr>
318
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Statement</td>
319
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
320
- <p id='_'>
321
- I recommend
322
- <i>this</i>
323
- .
324
- </p>
325
- </td>
326
- </tr>
327
- <tr>
328
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Statement</td>
329
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
330
- <dl>
331
- <dt>
332
- <p>A</p>
333
- </dt>
334
- <dd>B</dd>
335
- <dt>
336
- <p>C</p>
337
- </dt>
338
- <dd>D</dd>
339
- </dl>
340
- </td>
341
- </tr>
342
- <tr>
343
- <td colspan='2' style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
344
- <p id='_'>The measurement target shall be measured as:</p>
345
- <div id='_'>
346
- <div class='formula'>
347
- <p>
348
- <span class='stem'>(#(r/1 = 0)#)</span>
349
-   (1)
350
- </p>
351
- </div>
352
- </div>
353
- </td>
354
- </tr>
355
- <tr>
356
- <td colspan='2' style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
357
- <p id='_'>The following code will be run for verification:</p>
358
- <pre id='_' class='prettyprint '>
359
- <br/>
360
-       CoreRoot(success): HttpResponse
361
- if (success)
362
- <br/>
363
-       recommendation(label:
364
- success-response) end
365
- <br/>
366
-    
367
- </pre>
368
- </td>
369
- </tr>
370
- <tr>
371
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Test purpose</td>
372
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
373
- <p>TEST PURPOSE</p>
374
- </td>
375
- </tr>
376
- <tr>
377
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Test method</td>
378
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
379
- <p>TEST METHOD</p>
380
- </td>
381
- </tr>
382
- <tr>
383
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Conditions</td>
384
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
385
- <p>CONDITIONS</p>
386
- </td>
387
- </tr>
388
- <tr>
389
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>A</td>
390
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
391
- <p>FIRST PART</p>
392
- </td>
393
- </tr>
394
- <tr>
395
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>B</td>
396
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
397
- <p>SECOND PART</p>
398
- </td>
399
- </tr>
400
- <tr>
401
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>C</td>
402
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
403
- <p>THIRD PART</p>
404
- </td>
405
- </tr>
406
- <tr>
407
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>Reference</td>
408
- <td style='border-top:none;border-bottom:solid windowtext 1.0pt;'>
409
- <p>REFERENCE PART</p>
410
- </td>
411
- </tr>
412
- <tr>
413
- <td style='border-top:none;border-bottom:solid windowtext 1.5pt;'>Panda GHz express</td>
414
- <td style='border-top:none;border-bottom:solid windowtext 1.5pt;'>
415
- <p>PANDA PART</p>
416
- </td>
417
- </tr>
418
- </tbody>
419
- </table>
420
- </div>
421
- <p class='zzSTDTitle1'/>
422
- <br/>
423
- <div>
424
- <h1 class='Section3'>Bibliography</h1>
425
- <p id='rfc2616' class='Biblio'>
426
- [1]  IETF RFC 2616,
427
- <i> Hypertext Transfer Protocol — HTTP/1.1 </i>
428
- </p>
429
- </div>
430
- </div>
431
- </body>
432
- OUTPUT
433
-
434
- doc = <<~OUTPUT
435
- <body lang='EN-US' link='blue' vlink='#954F72'>
436
- <div class='WordSection1'>
437
- <p> </p>
438
- </div>
439
- <p>
440
- <br clear='all' class='section'/>
441
- </p>
442
- <div class='WordSection2'>
443
- <p>
444
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
445
- </p>
446
- <div id='A'>
447
- <h1 class='ForewordTitle'>Preface</h1>
448
- <p class='Tabletitle' style='text-align:center;'>Table 1 — Permission 1: First</p>
449
- <div align='center' class='table_container'>
450
- <table id='A1' class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;' width='100%'>
451
- <tbody>
452
- <tr>
453
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Identifier</td>
454
- <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
455
- <tt>/ogc/recommendation/wfs/2</tt>
456
- </td>
457
- </tr>
458
- <tr>
459
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Subject</td>
460
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>user</td>
461
- </tr>
462
- <tr>
463
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Dependency</td>
464
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>/ss/584/2015/level/1</td>
465
- </tr>
466
- <tr>
467
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Dependency</td>
468
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
469
- <a href='#rfc2616'>RFC 2616 (HTTP/1.1)</a>
470
- </td>
471
- </tr>
472
- <tr>
473
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Control-class</td>
474
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Technical</td>
475
- </tr>
476
- <tr>
477
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Priority</td>
478
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>P0</td>
479
- </tr>
480
- <tr>
481
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Family</td>
482
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>System and Communications Protection</td>
483
- </tr>
484
- <tr>
485
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Family</td>
486
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>System and Communications Protocols</td>
487
- </tr>
488
- <tr>
489
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Statement</td>
490
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
491
- <p class='ForewordText' id='_'>
492
- I recommend
493
- <i>this</i>
494
- .
495
- </p>
496
- </td>
497
- </tr>
498
- <tr>
499
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Statement</td>
500
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
501
- <dl>
502
- <dt>
503
- <p align='left' style='margin-left:0pt;text-align:left;'>A</p>
504
- </dt>
505
- <dd>B</dd>
506
- <dt>
507
- <p align='left' style='margin-left:0pt;text-align:left;'>C</p>
508
- </dt>
509
- <dd>D</dd>
510
- </dl>
511
- </td>
512
- </tr>
513
- <tr>
514
- <td colspan='2' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
515
- <p class='ForewordText' id='_'>The measurement target shall be measured as:</p>
516
- <div id='_'>
517
- <div class='formula'>
518
- <p>
519
- <span class='stem'>(#(r/1 = 0)#)</span>
520
- <span style='mso-tab-count:1'>  </span>
521
- (1)
522
- </p>
523
- </div>
524
- </div>
525
- </td>
526
- </tr>
527
- <tr>
528
- <td colspan='2' style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
529
- <p class='ForewordText' id='_'>The following code will be run for verification:</p>
530
- <p id='_' class='Sourcecode'>
531
- <br/>
532
-       CoreRoot(success): HttpResponse
533
- if (success)
534
- <br/>
535
-       recommendation(label:
536
- success-response) end
537
- <br/>
538
-    
539
- </p>
540
- </td>
541
- </tr>
542
- <tr>
543
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Test purpose</td>
544
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
545
- <p class='ForewordText'>TEST PURPOSE</p>
546
- </td>
547
- </tr>
548
- <tr>
549
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Test method</td>
550
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
551
- <p class='ForewordText'>TEST METHOD</p>
552
- </td>
553
- </tr>
554
- <tr>
555
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Conditions</td>
556
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
557
- <p class='ForewordText'>CONDITIONS</p>
558
- </td>
559
- </tr>
560
- <tr>
561
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>A</td>
562
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
563
- <p class='ForewordText'>FIRST PART</p>
564
- </td>
565
- </tr>
566
- <tr>
567
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>B</td>
568
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
569
- <p class='ForewordText'>SECOND PART</p>
570
- </td>
571
- </tr>
572
- <tr>
573
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>C</td>
574
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
575
- <p class='ForewordText'>THIRD PART</p>
576
- </td>
577
- </tr>
578
- <tr>
579
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>Reference</td>
580
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;'>
581
- <p class='ForewordText'>REFERENCE PART</p>
582
- </td>
583
- </tr>
584
- <tr>
585
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>Panda GHz express</td>
586
- <td style='border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>
587
- <p class='ForewordText'>PANDA PART</p>
588
- </td>
589
- </tr>
590
- </tbody>
591
- </table>
592
- </div>
593
- </div>
594
- <p> </p>
595
- </div>
596
- <p>
597
- <br clear='all' class='section'/>
598
- </p>
599
- <div class='WordSection3'>
600
- <p class='zzSTDTitle1'/>
601
- <p>
602
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
603
- </p>
604
- <div>
605
- <h1 class='BiblioTitle'>Bibliography</h1>
606
- <p id='rfc2616' class='Biblio'>
607
- [1]
608
- <span style='mso-tab-count:1'>  </span>
609
- IETF RFC 2616,
610
- <i> Hypertext Transfer Protocol — HTTP/1.1 </i>
611
- </p>
612
- </div>
613
- </div>
614
- <br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
615
- <div class='colophon'/>
616
- </body>
617
- OUTPUT
618
-
619
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
620
- .convert("test", input, true)
621
- .gsub(%r{^.*<body}m, "<body")
622
- .gsub(%r{</body>.*}m, "</body>")))
623
- .to be_equivalent_to xmlpp(presxml)
624
- expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
625
- .convert("test", presxml, true)
626
- .gsub(%r{^.*<body}m, "<body")
627
- .gsub(%r{</body>.*}m, "</body>")))
628
- .to be_equivalent_to xmlpp(html)
629
- expect(xmlpp(IsoDoc::Iso::WordConvert.new({})
630
- .convert("test", presxml, true)
631
- .gsub(%r{^.*<body}m, "<body")
632
- .gsub(%r{</body>.*}m, "</body>")))
633
- .to be_equivalent_to xmlpp(doc)
634
- end
635
-
636
- it "processes permission verifications" do
637
- input = <<~INPUT
638
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
639
- <preface>
640
- <foreword id="A"><title>Preface</title>
641
- <permission model="ogc" id="A1" type="verification">
642
- <title>First</title>
643
- <identifier>/ogc/recommendation/wfs/2</identifier>
644
- <inherit>/ss/584/2015/level/1</inherit>
645
- <subject>user</subject>
646
- <classification> <tag>control-class</tag> <value>Technical</value> </classification><classification> <tag>priority</tag> <value>P0</value> </classification><classification> <tag>family</tag> <value>System and Communications Protection</value> </classification><classification> <tag>family</tag> <value>System and Communications Protocols</value> </classification>
647
- <description>
648
- <p id="_">I recommend <em>this</em>.</p>
649
- </description>
650
- <specification exclude="true" type="tabular">
651
- <p id="_">This is the object of the recommendation:</p>
652
- <table id="_">
653
- <tbody>
654
- <tr>
655
- <td style="text-align:left;">Object</td>
656
- <td style="text-align:left;">Value</td>
657
- <td style="text-align:left;">Accomplished</td>
658
- </tr>
659
- </tbody>
660
- </table>
661
- </specification>
662
- <description>
663
- <dl>
664
- <dt>A</dt><dd>B</dd>
665
- <dt>C</dt><dd>D</dd>
666
- </dl>
667
- </description>
668
- <measurement-target exclude="false">
669
- <p id="_">The measurement target shall be measured as:</p>
670
- <formula id="_">
671
- <stem type="AsciiMath">r/1 = 0</stem>
672
- </formula>
673
- </measurement-target>
674
- <verification exclude="false">
675
- <p id="_">The following code will be run for verification:</p>
676
- <sourcecode id="_">CoreRoot(success): HttpResponse
677
- if (success)
678
- recommendation(label: success-response)
679
- end
680
- </sourcecode>
681
- </verification>
682
- <import exclude="true">
683
- <sourcecode id="_">success-response()</sourcecode>
684
- </import>
685
- </permission>
686
- </foreword></preface>
687
- </ogc-standard>
688
- INPUT
689
-
690
- presxml = <<~OUTPUT
691
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
692
- <preface>
693
- <foreword id='A' displayorder='1'>
694
- <title>Preface</title>
695
- <table id='A1' class='modspec' type='recommendtest'>
696
- <name>Table 1 — Conformance test 1: First</name>
697
- <tbody>
698
- <tr>
699
- <td>Identifier</td>
700
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
701
- </tr>
702
- <tr>
703
- <td>Subject</td>
704
- <td>user</td>
705
- </tr>
706
- <tr>
707
- <td>Dependency</td>
708
- <td>/ss/584/2015/level/1</td>
709
- </tr>
710
- <tr>
711
- <td>Control-class</td>
712
- <td>Technical</td>
713
- </tr>
714
- <tr>
715
- <td>Priority</td>
716
- <td>P0</td>
717
- </tr>
718
- <tr>
719
- <td>Family</td>
720
- <td>System and Communications Protection</td>
721
- </tr>
722
- <tr>
723
- <td>Family</td>
724
- <td>System and Communications Protocols</td>
725
- </tr>
726
- <tr>
727
- <td>Statement</td><td>
728
- <p id='_'>
729
- I recommend
730
- <em>this</em>
731
- .
732
- </p>
733
- </td>
734
- </tr>
735
- <tr>
736
- <td>Statement</td>
737
- <td>
738
- <dl>
739
- <dt>A</dt>
740
- <dd>B</dd>
741
- <dt>C</dt>
742
- <dd>D</dd>
743
- </dl>
744
- </td>
745
- </tr>
746
- <tr>
747
- <td colspan='2'>
748
- <p id='_'>The measurement target shall be measured as:</p>
749
- <formula id='_'>
750
- <name>1</name>
751
- <stem type='AsciiMath'>r/1 = 0</stem>
752
- </formula>
753
- </td>
754
- </tr>
755
- <tr>
756
- <td colspan='2'>
757
- <p id='_'>The following code will be run for verification:</p>
758
- <sourcecode id='_'>
759
- CoreRoot(success): HttpResponse if (success)
760
- recommendation(label: success-response) end#{' '}
761
- </sourcecode>
762
- </td>
763
- </tr>
764
- </tbody>
765
- </table>
766
- </foreword>
767
- </preface>
768
- </ogc-standard>
769
- OUTPUT
770
-
771
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
772
- .convert("test", input, true)
773
- .gsub(%r{^.*<body}m, "<body")
774
- .gsub(%r{</body>.*}m, "</body>")))
775
- .to be_equivalent_to xmlpp(presxml)
776
- end
777
-
778
- it "processes abstract tests" do
779
- input = <<~INPUT
780
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
781
- <preface>
782
- <foreword id="A"><title>Preface</title>
783
- <permission model="ogc" id="A1" type="abstracttest">
784
- <title>First</title>
785
- <identifier>/ogc/recommendation/wfs/2</identifier>
786
- <inherit>/ss/584/2015/level/1</inherit>
787
- <subject>user</subject>
788
- <classification> <tag>control-class</tag> <value>Technical</value> </classification><classification> <tag>priority</tag> <value>P0</value> </classification><classification> <tag>family</tag> <value>System and Communications Protection</value> </classification><classification> <tag>family</tag> <value>System and Communications Protocols</value> </classification>
789
- <description>
790
- <p id="_">I recommend <em>this</em>.</p>
791
- </description>
792
- <specification exclude="true" type="tabular">
793
- <p id="_">This is the object of the recommendation:</p>
794
- <table id="_">
795
- <tbody>
796
- <tr>
797
- <td style="text-align:left;">Object</td>
798
- <td style="text-align:left;">Value</td>
799
- <td style="text-align:left;">Accomplished</td>
800
- </tr>
801
- </tbody>
802
- </table>
803
- </specification>
804
- <description>
805
- <dl>
806
- <dt>A</dt><dd>B</dd>
807
- <dt>C</dt><dd>D</dd>
808
- </dl>
809
- </description>
810
- <measurement-target exclude="false">
811
- <p id="_">The measurement target shall be measured as:</p>
812
- <formula id="_">
813
- <stem type="AsciiMath">r/1 = 0</stem>
814
- </formula>
815
- </measurement-target>
816
- <verification exclude="false">
817
- <p id="_">The following code will be run for verification:</p>
818
- <sourcecode id="_">CoreRoot(success): HttpResponse
819
- if (success)
820
- recommendation(label: success-response)
821
- end
822
- </sourcecode>
823
- </verification>
824
- <import exclude="true">
825
- <sourcecode id="_">success-response()</sourcecode>
826
- </import>
827
- </permission>
828
- </foreword></preface>
829
- </ogc-standard>
830
- INPUT
831
- presxml = <<~OUTPUT
832
- <ogc-standard xmlns="https://standards.opengeospatial.org/document" type="presentation">
833
- <preface>
834
- <foreword id="A" displayorder="1"><title>Preface</title>
835
- <table id="A1" type="recommendtest" class="modspec">
836
- <name>Table 1 — Abstract test 1: First</name>
837
- <tbody>
838
- <tr><td>Identifier</td><td><tt>/ogc/recommendation/wfs/2</tt></td></tr>
839
- <tr><td>Subject</td><td>user</td></tr><tr><td>Dependency</td><td>/ss/584/2015/level/1</td></tr><tr><td>Control-class</td><td>Technical</td></tr><tr><td>Priority</td><td>P0</td></tr><tr><td>Family</td><td>System and Communications Protection</td></tr><tr><td>Family</td><td>System and Communications Protocols</td></tr>
840
-
841
- <tr><td>Statement</td><td>
842
- <p id="_">I recommend <em>this</em>.</p>
843
- </td></tr>
844
- <tr><td>Statement</td>
845
- <td>
846
- <dl>
847
- <dt>A</dt>
848
- <dd>B</dd>
849
- <dt>C</dt>
850
- <dd>D</dd>
851
- </dl>
852
- </td>
853
- </tr>
854
- <tr> <td colspan='2'>
855
- <p id="_">The measurement target shall be measured as:</p>
856
- <formula id="_"><name>1</name>
857
- <stem type="AsciiMath">r/1 = 0</stem>
858
- </formula>
859
- </td></tr><tr><td colspan="2">
860
- <p id="_">The following code will be run for verification:</p>
861
- <sourcecode id="_">CoreRoot(success): HttpResponse
862
- if (success)
863
- recommendation(label: success-response)
864
- end
865
- </sourcecode>
866
- </td></tr></tbody></table>
867
- </foreword></preface>
868
- </ogc-standard>
869
- OUTPUT
870
-
871
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
872
- .convert("test", input, true)
873
- .gsub(%r{^.*<body}m, "<body")
874
- .gsub(%r{</body>.*}m, "</body>")))
875
- .to be_equivalent_to xmlpp(presxml)
876
- end
877
-
878
- it "processes permission classes" do
879
- input = <<~INPUT
880
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
881
- <preface><foreword id="A"><title>Preface</title>
882
- <permission model="ogc" id="A1" type="class" keep-with-next="true" keep-lines-together="true">
883
- <title>First</title>
884
- <identifier>/ogc/recommendation/wfs/2</identifier>
885
- <inherit>/ss/584/2015/level/1</inherit>
886
- <inherit>/ss/584/2015/level/2</inherit>
887
- <subject>user</subject>
888
- <permission model="ogc" id="A2">
889
- <title>First #1</title>
890
- <identifier>/ogc/recommendation/wfs/10</identifier>
891
- </permission>
892
- <requirement model="ogc" id="A3">
893
- <title>First #2</title>
894
- <identifier>Requirement 1</identifier>
895
- </requirement>
896
- <recommendation model="ogc" id="A4">
897
- <title>First #3</title>
898
- <identifier>Recommendation 1</identifier>
899
- </recommendation>
900
- </permission>
901
- <permission model="ogc" id="B1">
902
- <title>Second</title>
903
- <identifier>/ogc/recommendation/wfs/10</identifier>
904
- </permission>
905
- </foreword></preface>
906
- </ogc-standard>
907
- INPUT
908
-
909
- presxml = <<~OUTPUT
910
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
911
- <preface>
912
- <foreword id='A' displayorder='1'>
913
- <title>Preface</title>
914
- <table id='A1' keep-with-next='true' keep-lines-together='true' class='modspec' type='recommendclass'>
915
- <name>Table 1 — Permissions class 1: First</name>
916
- <tbody>
917
- <tr>
918
- <td>Identifier</td>
919
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
920
- </tr>
921
- <tr>
922
- <td>Target type</td>
923
- <td>user</td>
924
- </tr>
925
- <tr>
926
- <td>Dependency</td>
927
- <td>/ss/584/2015/level/1</td>
928
- </tr>
929
- <tr>
930
- <td>Dependency</td>
931
- <td>/ss/584/2015/level/2</td>
932
- </tr>
933
- <tr>
934
- <td>Provisions</td>
935
- <td>
936
- <xref target='B1'>
937
- Permission 1:
938
- Second
939
- </xref>
940
- <br/>
941
- <xref target='A3'>
942
- Requirement 1-1:
943
- First #2
944
- </xref>
945
- <br/>
946
- <xref target='A4'>
947
- Recommendation 1-1:
948
- First #3
949
- </xref>
950
- </td>
951
- </tr>
952
- </tbody>
953
- </table>
954
- <table id='B1' class='modspec' type='recommend'>
955
- <name>Table 2 — Permission 1: Second</name>
956
- <tbody>
957
- <tr>
958
- <td>Identifier</td>
959
- <td><tt>/ogc/recommendation/wfs/10</tt></td>
960
- </tr>
961
- <tr>
962
- <td>Included in</td>
963
- <td>
964
- <xref target='A1'>Permissions class 1: First</xref>
965
- </td>
966
- </tr>
967
- </tbody>
968
- </table>
969
- </foreword>
970
- </preface>
971
- </ogc-standard>
972
- OUTPUT
973
-
974
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
975
- .convert("test", input, true)
976
- .gsub(%r{^.*<body}m, "<body")
977
- .gsub(%r{</body>.*}m, "</body>")))
978
- .to be_equivalent_to xmlpp(presxml)
979
- end
980
-
981
- it "processes conformance classes" do
982
- input = <<~INPUT
983
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
984
- <preface><foreword id="A"><title>Preface</title>
985
- <permission model="ogc" id="A1" type="conformanceclass">
986
- <title>First</title>
987
- <identifier>/ogc/recommendation/wfs/2</identifier>
988
- <inherit>/ss/584/2015/level/1</inherit>
989
- <inherit>ABC</inherit>
990
- <subject>user</subject>
991
- <classification><tag>target</target><value>ABC</value></classification>
992
- <classification><tag>indirect-dependency</target><value><link target="http://www.example.com/"/></value></classification>
993
- <classification><tag>indirect-dependency</target><value>ABC</value></classification>
994
- <permission model="ogc" id="A2">
995
- <identifier>Permission 1</identifier>
996
- </permission>
997
- <requirement model="ogc" id="A3">
998
- <identifier>Requirement 1</identifier>
999
- </requirement>
1000
- <recommendation model="ogc" id="A4">
1001
- <identifier>Recommendation 1</identifier>
1002
- </recommendation>
1003
- </permission>
1004
- <permission model="ogc" id="B" type="conformanceclass">
1005
- <title>Second</title>
1006
- <identifier>ABC</identifier>
1007
- </permission>
1008
- <permission model="ogc" id="B2">
1009
- <title>Third</title>
1010
- <identifier>Permission 1</identifier>
1011
- </permission>
1012
- </foreword></preface>
1013
- </ogc-standard>
1014
- INPUT
1015
-
1016
- presxml = <<~OUTPUT
1017
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1018
- <preface>
1019
- <foreword id='A' displayorder='1'>
1020
- <title>Preface</title>
1021
- <table id='A1' class='modspec' type='recommendclass'>
1022
- <name>Table 1 — Conformance class 1: First</name>
1023
- <tbody>
1024
- <tr>
1025
- <td>Identifier</td>
1026
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1027
- </tr>
1028
- <tr>
1029
- <td>Subject</td>
1030
- <td>user</td>
1031
- </tr>
1032
- <tr>
1033
- <td>Requirements class</td>
1034
- <td>
1035
- <xref target='B'>Conformance class 2: Second</xref>
1036
- </td>
1037
- </tr>
1038
- <tr>
1039
- <td>Dependency</td>
1040
- <td>/ss/584/2015/level/1</td>
1041
- </tr>
1042
- <tr>
1043
- <td>Dependency</td>
1044
- <td>
1045
- <xref target='B'>Conformance class 2: Second</xref>
1046
- </td>
1047
- </tr>
1048
- <tr>
1049
- <td>Indirect Dependency</td>
1050
- <td>
1051
- <link target='http://www.example.com/'/>
1052
- </td>
1053
- </tr>
1054
- <tr>
1055
- <td>Indirect Dependency</td>
1056
- <td>
1057
- <xref target='B'>Conformance class 2: Second</xref>
1058
- </td>
1059
- </tr>
1060
- <tr>
1061
- <td>Conformance tests</td>
1062
- <td>
1063
- <xref target='B2'>
1064
- Permission 1:
1065
- Third
1066
- </xref>
1067
- <br/>
1068
- <xref target='A3'>
1069
- Requirement 1-1
1070
- </xref>
1071
- <br/>
1072
- <xref target='A4'>
1073
- Recommendation 1-1
1074
- </xref>
1075
- </td>
1076
- </tr>
1077
- </tbody>
1078
- </table>
1079
- <table id='B' class='modspec' type='recommendclass'>
1080
- <name>Table 2 — Conformance class 2: Second</name>
1081
- <tbody>
1082
- <tr>
1083
- <td>Identifier</td>
1084
- <td><tt>ABC</tt></td>
1085
- </tr>
1086
- </tbody>
1087
- </table>
1088
- <table id='B2' class='modspec' type='recommend'>
1089
- <name>Table 3 — Permission 1: Third</name>
1090
- <tbody>
1091
- <tr>
1092
- <td>Identifier</td>
1093
- <td><tt>Permission 1</tt></td>
1094
- </tr>
1095
- <tr>
1096
- <td>Included in</td>
1097
- <td>
1098
- <xref target='A1'>
1099
- Conformance class 1:
1100
- First
1101
- </xref>
1102
- </td>
1103
- </tr>
1104
- </tbody>
1105
- </table>
1106
- </foreword>
1107
- </preface>
1108
- </ogc-standard>
1109
- OUTPUT
1110
-
1111
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1112
- .convert("test", input, true)
1113
- .gsub(%r{^.*<body}m, "<body")
1114
- .gsub(%r{</body>.*}m, "</body>")))
1115
- .to be_equivalent_to xmlpp(presxml)
1116
- end
1117
-
1118
- it "processes conformance classes in French" do
1119
- input = <<~INPUT
1120
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
1121
- <bibdata><language>fr</language></bibdata>
1122
- <preface><foreword id="A"><title>Preface</title>
1123
- <permission model="ogc" id="A1" type="conformanceclass">
1124
- <title>First</title>
1125
- <identifier>/ogc/recommendation/wfs/2</identifier>
1126
- <inherit>/ss/584/2015/level/1</inherit>
1127
- <inherit>ABC</inherit>
1128
- <subject>user</subject>
1129
- <classification><tag>target</target><value>ABC</value></classification>
1130
- <classification><tag>indirect-dependency</target><value><link target="http://www.example.com/"/></value></classification>
1131
- <classification><tag>indirect-dependency</target><value>ABC</value></classification>
1132
- <permission model="ogc" id="A2">
1133
- <identifier>Permission 1</identifier>
1134
- </permission>
1135
- <requirement model="ogc" id="A3">
1136
- <identifier>Requirement 1</identifier>
1137
- </requirement>
1138
- <recommendation model="ogc" id="A4">
1139
- <identifier>Recommendation 1</identifier>
1140
- </recommendation>
1141
- </permission>
1142
- <permission model="ogc" id="B" type="conformanceclass">
1143
- <title>Second</title>
1144
- <identifier>ABC</identifier>
1145
- </permission>
1146
- <permission model="ogc" id="B2">
1147
- <title>Third</title>
1148
- <identifier>Permission 1</identifier>
1149
- </permission>
1150
- </foreword></preface>
1151
- </ogc-standard>
1152
- INPUT
1153
- presxml = <<~OUTPUT
1154
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1155
- <bibdata>
1156
- <language current='true'>fr</language>
1157
- </bibdata>
1158
- <preface>
1159
- <foreword id='A' displayorder='1'>
1160
- <title>Preface</title>
1161
- <table id='A1' class='modspec' type='recommendclass'>
1162
- <name>Tableau 1 — Classe de confirmité 1&#xa0;: First</name>
1163
- <tbody>
1164
- <tr>
1165
- <td>Identifiant</td>
1166
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1167
- </tr>
1168
- <tr>
1169
- <td>Sujet</td>
1170
- <td>user</td>
1171
- </tr>
1172
- <tr>
1173
- <td>Classe d&#x2019;exigences</td>
1174
- <td>
1175
- <xref target='B'>Classe de confirmité 2&#xa0;: Second</xref>
1176
- </td>
1177
- </tr>
1178
- <tr>
1179
- <td>D&#xE9;pendance</td>
1180
- <td>/ss/584/2015/level/1</td>
1181
- </tr>
1182
- <tr>
1183
- <td>D&#xE9;pendance</td>
1184
- <td>
1185
- <xref target='B'>Classe de confirmité 2&#xa0;: Second</xref>
1186
- </td>
1187
- </tr>
1188
- <tr>
1189
- <td>D&#xE9;pendance indirecte</td>
1190
- <td>
1191
- <link target='http://www.example.com/'/>
1192
- </td>
1193
- </tr>
1194
- <tr>
1195
- <td>D&#xE9;pendance indirecte</td>
1196
- <td>
1197
- <xref target='B'>Classe de confirmité 2&#xa0;: Second</xref>
1198
- </td>
1199
- </tr>
1200
- <tr>
1201
- <td>Tests de conformité</td>
1202
- <td>
1203
- <xref target='B2'>
1204
- Autorisation 1&#xa0;:
1205
- Third
1206
- </xref>
1207
- <br/>
1208
- <xref target='A3'>
1209
- Exigence 1-1
1210
- </xref>
1211
- <br/>
1212
- <xref target='A4'>
1213
- Recommandation 1-1
1214
- </xref>
1215
- </td>
1216
- </tr>
1217
- </tbody>
1218
- </table>
1219
- <table id='B' class='modspec' type='recommendclass'>
1220
- <name>Tableau 2 — Classe de confirmité 2&#xa0;: Second</name>
1221
- <tbody>
1222
- <tr>
1223
- <td>Identifiant</td>
1224
- <td><tt>ABC</tt></td>
1225
- </tr>
1226
- </tbody>
1227
- </table>
1228
- <table id='B2' class='modspec' type='recommend'>
1229
- <name>Tableau 3 — Autorisation 1&#xa0;: Third</name>
1230
- <tbody>
1231
- <tr>
1232
- <td>Identifiant</td>
1233
- <td><tt>Permission 1</tt></td>
1234
- </tr>
1235
- <tr>
1236
- <td>Inclus dans</td>
1237
- <td>
1238
- <xref target='A1'>
1239
- Classe de confirmit&#xE9; 1&#xa0;:
1240
- First
1241
- </xref>
1242
- </td>
1243
- </tr>
1244
- </tbody>
1245
- </table>
1246
- </foreword>
1247
- </preface>
1248
- </ogc-standard>
1249
- OUTPUT
1250
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1251
- .convert("test", input, true)
1252
- .gsub(%r{<localized-strings>.*</localized-strings>}m, "")
1253
- .gsub(%r{^.*<body}m, "<body")
1254
- .gsub(%r{</body>.*}m, "</body>")))
1255
- .to be_equivalent_to xmlpp(presxml)
1256
- end
1257
-
1258
- it "processes requirement classes" do
1259
- input = <<~INPUT
1260
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
1261
- <preface><foreword id="A"><title>Preface</title>
1262
- <requirement model="ogc" id="A1" type="class">
1263
- <title>First</title>
1264
- <identifier>/ogc/recommendation/wfs/2</identifier>
1265
- <inherit>/ss/584/2015/level/1</inherit>
1266
- <inherit>/ss/584/2015/level/2</inherit>
1267
- <subject>user</subject>
1268
- <permission model="ogc" id="A2">
1269
- <title>First #1</title>
1270
- <identifier>Permission 1</identifier>
1271
- </permission>
1272
- <requirement model="ogc" id="A3">
1273
- <title>First #2</title>
1274
- <identifier>Requirement 1</identifier>
1275
- </requirement>
1276
- <recommendation model="ogc" id="A4">
1277
- <title>First #3</title>
1278
- <identifier>Recommendation 1</identifier>
1279
- </recommendation>
1280
- </requirement>
1281
- <permission model="ogc" id="A5">
1282
- <title>Second</title>
1283
- <identifier>Permission 1</identifier>
1284
- </permission>
1285
- </foreword></preface>
1286
- </ogc-standard>
1287
- INPUT
1288
-
1289
- presxml = <<~OUTPUT
1290
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1291
- <preface>
1292
- <foreword id='A' displayorder='1'>
1293
- <title>Preface</title>
1294
- <table id='A1' class='modspec' type='recommendclass'>
1295
- <name>Table 1 — Requirements class 1: First</name>
1296
- <tbody>
1297
- <tr>
1298
- <td>Identifier</td>
1299
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1300
- </tr>
1301
- <tr>
1302
- <td>Target type</td>
1303
- <td>user</td>
1304
- </tr>
1305
- <tr>
1306
- <td>Dependency</td>
1307
- <td>/ss/584/2015/level/1</td>
1308
- </tr>
1309
- <tr>
1310
- <td>Dependency</td>
1311
- <td>/ss/584/2015/level/2</td>
1312
- </tr>
1313
- <tr>
1314
- <td>Provisions</td>
1315
- <td>
1316
- <xref target='A5'>
1317
- Permission 1:
1318
- Second
1319
- </xref>
1320
- <br/>
1321
- <xref target='A3'>
1322
- Requirement 1-1:
1323
- First #2
1324
- </xref>
1325
- <br/>
1326
- <xref target='A4'>
1327
- Recommendation 1-1:
1328
- First #3
1329
- </xref>
1330
- </td>
1331
- </tr>
1332
- </tbody>
1333
- </table>
1334
- <table id='A5' class='modspec' type='recommend'>
1335
- <name>Table 2 — Permission 1: Second</name>
1336
- <tbody>
1337
- <tr>
1338
- <td>Identifier</td>
1339
- <td><tt>Permission 1</tt></td>
1340
- </tr>
1341
- <tr>
1342
- <td>Included in</td>
1343
- <td>
1344
- <xref target='A1'>
1345
- Requirements class 1:
1346
- First
1347
- </xref>
1348
- </td>
1349
- </tr>
1350
- </tbody>
1351
- </table>
1352
- </foreword>
1353
- </preface>
1354
- </ogc-standard>
1355
- OUTPUT
1356
-
1357
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1358
- .convert("test", input, true)
1359
- .gsub(%r{^.*<body}m, "<body")
1360
- .gsub(%r{</body>.*}m, "</body>")))
1361
- .to be_equivalent_to xmlpp(presxml)
1362
- end
1363
-
1364
- it "processes recommendation classes" do
1365
- input = <<~INPUT
1366
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
1367
- <preface><foreword id="A"><title>Preface</title>
1368
- <recommendation model="ogc" id="A1" type="class">
1369
- <title>First</title>
1370
- <identifier>/ogc/recommendation/wfs/2</identifier>
1371
- <inherit>/ss/584/2015/level/1</inherit>
1372
- <inherit>/ss/584/2015/level/2</inherit>
1373
- <subject>user</subject>
1374
- <permission model="ogc" id="A2">
1375
- <title>First #1</title>
1376
- <identifier>Permission 1</identifier>
1377
- </permission>
1378
- <requirement model="ogc" id="A3">
1379
- <title>First #2</title>
1380
- <identifier>Requirement 1</identifier>
1381
- </requirement>
1382
- <recommendation model="ogc" id="A4">
1383
- <title>First #3</title>
1384
- <identifier>Recommendation 1</identifier>
1385
- </recommendation>
1386
- </recommendation>
1387
- </foreword></preface>
1388
- </ogc-standard>
1389
- INPUT
1390
-
1391
- presxml = <<~OUTPUT
1392
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1393
- <preface>
1394
- <foreword id='A' displayorder='1'>
1395
- <title>Preface</title>
1396
- <table id='A1' class='modspec' type='recommendclass'>
1397
- <name>Table 1 — Recommendations class 1: First</name>
1398
- <tbody>
1399
- <tr>
1400
- <td>Identifier</td>
1401
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1402
- </tr>
1403
- <tr>
1404
- <td>Target type</td>
1405
- <td>user</td>
1406
- </tr>
1407
- <tr>
1408
- <td>Dependency</td>
1409
- <td>/ss/584/2015/level/1</td>
1410
- </tr>
1411
- <tr>
1412
- <td>Dependency</td>
1413
- <td>/ss/584/2015/level/2</td>
1414
- </tr>
1415
- <tr>
1416
- <td>Provisions</td>
1417
- <td>
1418
- <xref target='A2'>Permission 1-1:
1419
- First #1
1420
- </xref>
1421
- <br/>
1422
- <xref target='A3'>
1423
- Requirement 1-1:
1424
- First #2
1425
- </xref>
1426
- <br/>
1427
- <xref target='A4'>
1428
- Recommendation 1-1:
1429
- First #3
1430
- </xref>
1431
- </td>
1432
- </tr>
1433
- </tbody>
1434
- </table>
1435
- </foreword>
1436
- </preface>
1437
- </ogc-standard>
1438
- OUTPUT
1439
-
1440
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1441
- .convert("test", input, true)
1442
- .gsub(%r{^.*<body}m, "<body")
1443
- .gsub(%r{</body>.*}m, "</body>")))
1444
- .to be_equivalent_to xmlpp(presxml)
1445
- end
1446
-
1447
- it "processes requirements" do
1448
- input = <<~INPUT
1449
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
1450
- <preface><foreword id="A0"><title>Preface</title>
1451
- <requirement model="ogc" id="A" unnumbered="true">
1452
- <title>A New Requirement</title>
1453
- <identifier>/ogc/recommendation/wfs/2</identifier>
1454
- <inherit>/ss/584/2015/level/1</inherit>
1455
- <subject>user</subject>
1456
- <description>
1457
- <p id="_">I recommend <em>this</em>.</p>
1458
- </description>
1459
- <specification exclude="true" type="tabular" keep-with-next="true" keep-lines-together="true">
1460
- <p id="_">This is the object of the recommendation:</p>
1461
- <table id="_">
1462
- <tbody>
1463
- <tr>
1464
- <td style="text-align:left;">Object</td>
1465
- <td style="text-align:left;">Value</td>
1466
- </tr>
1467
- <tr>
1468
- <td style="text-align:left;">Mission</td>
1469
- <td style="text-align:left;">Accomplished</td>
1470
- </tr>
1471
- </tbody>
1472
- </table>
1473
- </specification>
1474
- <description>
1475
- <p id="_">As for the measurement targets,</p>
1476
- </description>
1477
- <measurement-target exclude="false">
1478
- <p id="_">The measurement target shall be measured as:</p>
1479
- <formula id="B">
1480
- <stem type="AsciiMath">r/1 = 0</stem>
1481
- </formula>
1482
- </measurement-target>
1483
- <verification exclude="false">
1484
- <p id="_">The following code will be run for verification:</p>
1485
- <sourcecode id="_">CoreRoot(success): HttpResponse
1486
- if (success)
1487
- recommendation(label: success-response)
1488
- end
1489
- </sourcecode>
1490
- </verification>
1491
- <import exclude="true">
1492
- <sourcecode id="_">success-response()</sourcecode>
1493
- </import>
1494
- </requirement>
1495
- </foreword></preface>
1496
- </ogc-standard>
1497
- INPUT
1498
- presxml = <<~OUTPUT
1499
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1500
- <preface>
1501
- <foreword id='A0' displayorder='1'>
1502
- <title>Preface</title>
1503
- <table id='A' unnumbered='true' class='modspec' type='recommend'>
1504
- <name>Table — Requirement: A New Requirement</name>
1505
- <tbody>
1506
- <tr>
1507
- <td>Identifier</td>
1508
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1509
- </tr>
1510
- <tr>
1511
- <td>Subject</td>
1512
- <td>user</td>
1513
- </tr>
1514
- <tr>
1515
- <td>Dependency</td>
1516
- <td>/ss/584/2015/level/1</td>
1517
- </tr>
1518
- <tr>
1519
- <td>Statement</td><td>
1520
- <p id='_'>
1521
- I recommend
1522
- <em>this</em>
1523
- .
1524
- </p>
1525
- </td>
1526
- </tr>
1527
- <tr>
1528
- <td>Statement</td><td>
1529
- <p id='_'>As for the measurement targets,</p>
1530
- </td>
1531
- </tr>
1532
- <tr>
1533
- <td colspan='2'>
1534
- <p id='_'>The measurement target shall be measured as:</p>
1535
- <formula id='B'>
1536
- <name>1</name>
1537
- <stem type='AsciiMath'>r/1 = 0</stem>
1538
- </formula>
1539
- </td>
1540
- </tr>
1541
- <tr>
1542
- <td colspan='2'>
1543
- <p id='_'>The following code will be run for verification:</p>
1544
- <sourcecode id='_'>
1545
- CoreRoot(success): HttpResponse if (success)
1546
- recommendation(label: success-response) end
1547
- </sourcecode>
1548
- </td>
1549
- </tr>
1550
- </tbody>
1551
- </table>
1552
- </foreword>
1553
- </preface>
1554
- </ogc-standard>
1555
- OUTPUT
1556
-
1557
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1558
- .convert("test", input, true)
1559
- .gsub(%r{^.*<body}m, "<body")
1560
- .gsub(%r{</body>.*}m, "</body>")))
1561
- .to be_equivalent_to xmlpp(presxml)
1562
- end
1563
-
1564
- it "processes recommendations" do
1565
- input = <<~INPUT
1566
- <ogc-standard xmlns="https://standards.opengeospatial.org/document">
1567
- <preface><foreword id="A"><title>Preface</title>
1568
- <recommendation model="ogc" id="_">
1569
- <title>First</title>
1570
- <identifier>/ogc/recommendation/wfs/2</identifier>
1571
- <inherit>/ss/584/2015/level/1</inherit>
1572
- <subject>user</subject>
1573
- <description>
1574
- <p id="_">I recommend <em>this</em>.</p>
1575
- </description>
1576
- <specification exclude="true" type="tabular">
1577
- <p id="_">This is the object of the recommendation:</p>
1578
- <table id="_">
1579
- <tbody>
1580
- <tr>
1581
- <td style="text-align:left;">Object</td>
1582
- <td style="text-align:left;">Value</td>
1583
- </tr>
1584
- <tr>
1585
- <td style="text-align:left;">Mission</td>
1586
- <td style="text-align:left;">Accomplished</td>
1587
- </tr>
1588
- </tbody>
1589
- </table>
1590
- </specification>
1591
- <description>
1592
- <p id="_">As for the measurement targets,</p>
1593
- </description>
1594
- <measurement-target exclude="false">
1595
- <p id="_">The measurement target shall be measured as:</p>
1596
- <formula id="_">
1597
- <stem type="AsciiMath">r/1 = 0</stem>
1598
- </formula>
1599
- </measurement-target>
1600
- <verification exclude="false">
1601
- <p id="_">The following code will be run for verification:</p>
1602
- <sourcecode id="_">CoreRoot(success): HttpResponse
1603
- if (success)
1604
- recommendation(label: success-response)
1605
- end
1606
- </sourcecode>
1607
- </verification>
1608
- <import exclude="true">
1609
- <sourcecode id="_">success-response()</sourcecode>
1610
- </import>
1611
- </recommendation>
1612
- </foreword></preface>
1613
- </ogc-standard>
1614
- INPUT
1615
-
1616
- presxml = <<~OUTPUT
1617
- <ogc-standard xmlns='https://standards.opengeospatial.org/document' type='presentation'>
1618
- <preface>
1619
- <foreword id='A' displayorder='1'>
1620
- <title>Preface</title>
1621
- <table id='_' class='modspec' type='recommend'>
1622
- <name>Table 1 — Recommendation 1: First</name>
1623
- <tbody>
1624
- <tr>
1625
- <td>Identifier</td>
1626
- <td><tt>/ogc/recommendation/wfs/2</tt></td>
1627
- </tr>
1628
- <tr>
1629
- <td>Subject</td>
1630
- <td>user</td>
1631
- </tr>
1632
- <tr>
1633
- <td>Dependency</td>
1634
- <td>/ss/584/2015/level/1</td>
1635
- </tr>
1636
- <tr>
1637
- <td>Statement</td><td>
1638
- <p id='_'>
1639
- I recommend
1640
- <em>this</em>
1641
- .
1642
- </p>
1643
- </td>
1644
- </tr>
1645
- <tr>
1646
- <td>Statement</td><td>
1647
- <p id='_'>As for the measurement targets,</p>
1648
- </td>
1649
- </tr>
1650
- <tr>
1651
- <td colspan='2'>
1652
- <p id='_'>The measurement target shall be measured as:</p>
1653
- <formula id='_'>
1654
- <name>1</name>
1655
- <stem type='AsciiMath'>r/1 = 0</stem>
1656
- </formula>
1657
- </td>
1658
- </tr>
1659
- <tr>
1660
- <td colspan='2'>
1661
- <p id='_'>The following code will be run for verification:</p>
1662
- <sourcecode id='_'>
1663
- CoreRoot(success): HttpResponse if (success)
1664
- recommendation(label: success-response) end
1665
- </sourcecode>
1666
- </td>
1667
- </tr>
1668
- </tbody>
1669
- </table>
1670
- </foreword>
1671
- </preface>
1672
- </ogc-standard>
1673
- OUTPUT
1674
-
1675
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
1676
- .convert("test", input, true)
1677
- .gsub(%r{^.*<body}m, "<body")
1678
- .gsub(%r{</body>.*}m, "</body>")))
1679
- .to be_equivalent_to xmlpp(presxml)
1680
- end
1681
- end