metanorma-iso 1.8.4 → 1.9.0.1
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/.github/workflows/rake.yml +1 -1
- data/.rubocop.yml +1 -1
- data/lib/asciidoctor/iso/cleanup.rb +0 -1
- data/lib/asciidoctor/iso/isodoc.rng +50 -8
- data/lib/asciidoctor/iso/isostandard.rng +7 -3
- data/lib/asciidoctor/iso/section.rb +3 -0
- data/lib/asciidoctor/iso/validate.rb +4 -17
- data/lib/asciidoctor/iso/validate_section.rb +50 -34
- data/lib/asciidoctor/iso/validate_style.rb +3 -3
- data/lib/isodoc/iso/base_convert.rb +41 -16
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +480 -388
- data/lib/isodoc/iso/iso.international-standard.xsl +480 -388
- data/lib/isodoc/iso/isosts_convert.rb +12 -13
- data/lib/isodoc/iso/metadata.rb +2 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +62 -9
- data/lib/isodoc/iso/sts_convert.rb +4 -5
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/isodoc/iso/xref.rb +17 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -4
- data/spec/asciidoctor/section_spec.rb +128 -7
- data/spec/asciidoctor/validate_spec.rb +15 -15
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +472 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +19 -10
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +394 -276
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- metadata +8 -8
    
        data/spec/isodoc/iso_spec.rb
    CHANGED
    
    | @@ -177,8 +177,8 @@ RSpec.describe IsoDoc::Iso do | |
| 177 177 | 
             
                OUTPUT
         | 
| 178 178 | 
             
              end
         | 
| 179 179 |  | 
| 180 | 
            -
              it "processes examples | 
| 181 | 
            -
                 | 
| 180 | 
            +
              it "processes examples" do
         | 
| 181 | 
            +
                input = <<~INPUT
         | 
| 182 182 | 
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 183 183 | 
             
                    <preface>
         | 
| 184 184 | 
             
                      <foreword>
         | 
| @@ -190,11 +190,11 @@ RSpec.describe IsoDoc::Iso do | |
| 190 190 | 
             
                    </preface>
         | 
| 191 191 | 
             
                  </iso-standard>
         | 
| 192 192 | 
             
                INPUT
         | 
| 193 | 
            -
                 | 
| 193 | 
            +
                presxml = <<~OUTPUT
         | 
| 194 194 | 
             
                  <?xml version='1.0'?>
         | 
| 195 195 | 
             
                  <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
         | 
| 196 196 | 
             
                    <preface>
         | 
| 197 | 
            -
                      <foreword>
         | 
| 197 | 
            +
                      <foreword displayorder="1">
         | 
| 198 198 | 
             
                        <example id="samplecode">
         | 
| 199 199 | 
             
                          <name>EXAMPLE — Title</name>
         | 
| 200 200 | 
             
                          <p>Hello</p>
         | 
| @@ -203,22 +203,8 @@ RSpec.describe IsoDoc::Iso do | |
| 203 203 | 
             
                    </preface>
         | 
| 204 204 | 
             
                  </iso-standard>
         | 
| 205 205 | 
             
                OUTPUT
         | 
| 206 | 
            -
              end
         | 
| 207 206 |  | 
| 208 | 
            -
             | 
| 209 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
         | 
| 210 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 211 | 
            -
                    <preface>
         | 
| 212 | 
            -
                      <foreword>
         | 
| 213 | 
            -
                        <example id="samplecode">
         | 
| 214 | 
            -
                          <name>EXAMPLE — Title</name>
         | 
| 215 | 
            -
                          <p>Hello</p>
         | 
| 216 | 
            -
                        </example>
         | 
| 217 | 
            -
                      </foreword>
         | 
| 218 | 
            -
                    </preface>
         | 
| 219 | 
            -
                  </iso-standard>
         | 
| 220 | 
            -
                INPUT
         | 
| 221 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 207 | 
            +
                html = <<~OUTPUT
         | 
| 222 208 | 
             
                  #{HTML_HDR}
         | 
| 223 209 | 
             
                        <br/>
         | 
| 224 210 | 
             
                        <div>
         | 
| @@ -232,10 +218,49 @@ RSpec.describe IsoDoc::Iso do | |
| 232 218 | 
             
                    </body>
         | 
| 233 219 | 
             
                  </html>
         | 
| 234 220 | 
             
                OUTPUT
         | 
| 221 | 
            +
             | 
| 222 | 
            +
                word = <<~OUTPUT
         | 
| 223 | 
            +
                      <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 224 | 
            +
                    <div class="WordSection1">
         | 
| 225 | 
            +
                      <p> </p>
         | 
| 226 | 
            +
                    </div>
         | 
| 227 | 
            +
                    <p>
         | 
| 228 | 
            +
                      <br clear="all" class="section"/>
         | 
| 229 | 
            +
                    </p>
         | 
| 230 | 
            +
                    <div class="WordSection2">
         | 
| 231 | 
            +
                      <p>
         | 
| 232 | 
            +
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 233 | 
            +
                      </p>
         | 
| 234 | 
            +
                      <div>
         | 
| 235 | 
            +
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 236 | 
            +
                        <div id="samplecode" class="example">
         | 
| 237 | 
            +
                          <p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 238 | 
            +
                        </div>
         | 
| 239 | 
            +
                      </div>
         | 
| 240 | 
            +
                      <p> </p>
         | 
| 241 | 
            +
                    </div>
         | 
| 242 | 
            +
                    <p>
         | 
| 243 | 
            +
                      <br clear="all" class="section"/>
         | 
| 244 | 
            +
                    </p>
         | 
| 245 | 
            +
                    <div class="WordSection3">
         | 
| 246 | 
            +
                      <p class="zzSTDTitle1"/>
         | 
| 247 | 
            +
                    </div>
         | 
| 248 | 
            +
                    <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         | 
| 249 | 
            +
                    <div class="colophon"/>
         | 
| 250 | 
            +
                  </body>
         | 
| 251 | 
            +
                OUTPUT
         | 
| 252 | 
            +
                expect(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 253 | 
            +
                  .convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
         | 
| 254 | 
            +
                expect(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 255 | 
            +
                  .convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
         | 
| 256 | 
            +
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
         | 
| 257 | 
            +
                expect(xmlpp(output
         | 
| 258 | 
            +
                  .sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 259 | 
            +
                  .to be_equivalent_to xmlpp(word)
         | 
| 235 260 | 
             
              end
         | 
| 236 261 |  | 
| 237 | 
            -
              it "processes sequences of examples | 
| 238 | 
            -
                 | 
| 262 | 
            +
              it "processes sequences of examples" do
         | 
| 263 | 
            +
                input = <<~INPUT
         | 
| 239 264 | 
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 240 265 | 
             
                    <preface>
         | 
| 241 266 | 
             
                      <foreword>
         | 
| @@ -250,11 +275,11 @@ RSpec.describe IsoDoc::Iso do | |
| 250 275 | 
             
                    </preface>
         | 
| 251 276 | 
             
                  </iso-standard>
         | 
| 252 277 | 
             
                INPUT
         | 
| 253 | 
            -
                 | 
| 278 | 
            +
                presxml = <<~OUTPUT
         | 
| 254 279 | 
             
                  <?xml version='1.0'?>
         | 
| 255 280 | 
             
                  <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
         | 
| 256 281 | 
             
                    <preface>
         | 
| 257 | 
            -
                      <foreword>
         | 
| 282 | 
            +
                      <foreword displayorder="1">
         | 
| 258 283 | 
             
                        <example id="samplecode">
         | 
| 259 284 | 
             
                          <name>EXAMPLE 1</name>
         | 
| 260 285 | 
             
                          <quote>Hello</quote>
         | 
| @@ -267,26 +292,7 @@ RSpec.describe IsoDoc::Iso do | |
| 267 292 | 
             
                    </preface>
         | 
| 268 293 | 
             
                  </iso-standard>
         | 
| 269 294 | 
             
                OUTPUT
         | 
| 270 | 
            -
             | 
| 271 | 
            -
             | 
| 272 | 
            -
              it "processes sequences of examples (HTML)" do
         | 
| 273 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
         | 
| 274 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 275 | 
            -
                    <preface>
         | 
| 276 | 
            -
                      <foreword>
         | 
| 277 | 
            -
                        <example id="samplecode">
         | 
| 278 | 
            -
                          <name>EXAMPLE 1</name>
         | 
| 279 | 
            -
                          <quote>Hello</quote>
         | 
| 280 | 
            -
                        </example>
         | 
| 281 | 
            -
                        <example id="samplecode2">
         | 
| 282 | 
            -
                          <name>EXAMPLE 2 — Title</name>
         | 
| 283 | 
            -
                          <p>Hello</p>
         | 
| 284 | 
            -
                        </example>
         | 
| 285 | 
            -
                      </foreword>
         | 
| 286 | 
            -
                    </preface>
         | 
| 287 | 
            -
                  </iso-standard>
         | 
| 288 | 
            -
                INPUT
         | 
| 289 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 295 | 
            +
                html = <<~OUTPUT
         | 
| 290 296 | 
             
                  #{HTML_HDR}
         | 
| 291 297 | 
             
                        <br/>
         | 
| 292 298 | 
             
                        <div>
         | 
| @@ -304,105 +310,47 @@ RSpec.describe IsoDoc::Iso do | |
| 304 310 | 
             
                    </body>
         | 
| 305 311 | 
             
                  </html>
         | 
| 306 312 | 
             
                OUTPUT
         | 
| 307 | 
            -
             | 
| 308 | 
            -
             | 
| 309 | 
            -
             | 
| 310 | 
            -
             | 
| 311 | 
            -
             | 
| 312 | 
            -
                    < | 
| 313 | 
            -
                      < | 
| 314 | 
            -
             | 
| 315 | 
            -
             | 
| 316 | 
            -
                          <p>Hello</p>
         | 
| 317 | 
            -
                        </example>
         | 
| 318 | 
            -
                      </foreword>
         | 
| 319 | 
            -
                    </preface>
         | 
| 320 | 
            -
                  </iso-standard>
         | 
| 321 | 
            -
                INPUT
         | 
| 322 | 
            -
                expect(xmlpp(output.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 323 | 
            -
                  .to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 324 | 
            -
                    <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 325 | 
            -
                      <div class="WordSection1">
         | 
| 326 | 
            -
                        <p> </p>
         | 
| 327 | 
            -
                      </div>
         | 
| 313 | 
            +
                word = <<~OUTPUT
         | 
| 314 | 
            +
                      <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 315 | 
            +
                    <div class="WordSection1">
         | 
| 316 | 
            +
                      <p> </p>
         | 
| 317 | 
            +
                    </div>
         | 
| 318 | 
            +
                    <p>
         | 
| 319 | 
            +
                      <br clear="all" class="section"/>
         | 
| 320 | 
            +
                    </p>
         | 
| 321 | 
            +
                    <div class="WordSection2">
         | 
| 328 322 | 
             
                      <p>
         | 
| 329 | 
            -
                        <br clear="all"  | 
| 323 | 
            +
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 330 324 | 
             
                      </p>
         | 
| 331 | 
            -
                      <div | 
| 332 | 
            -
                        < | 
| 333 | 
            -
             | 
| 334 | 
            -
             | 
| 335 | 
            -
             | 
| 336 | 
            -
                          <h1 class="ForewordTitle">Foreword</h1>
         | 
| 337 | 
            -
                          <div id="samplecode" class="example">
         | 
| 338 | 
            -
                            <p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 339 | 
            -
                          </div>
         | 
| 325 | 
            +
                      <div>
         | 
| 326 | 
            +
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 327 | 
            +
                        <div id="samplecode" class="example">
         | 
| 328 | 
            +
                          <p><span class="example_label">EXAMPLE  1</span><span style="mso-tab-count:1">  </span></p>
         | 
| 329 | 
            +
                          <div class="Quote">Hello</div>
         | 
| 340 330 | 
             
                        </div>
         | 
| 341 | 
            -
                        < | 
| 342 | 
            -
             | 
| 343 | 
            -
                      <p>
         | 
| 344 | 
            -
                        <br clear="all" class="section"/>
         | 
| 345 | 
            -
                      </p>
         | 
| 346 | 
            -
                      <div class="WordSection3">
         | 
| 347 | 
            -
                        <p class="zzSTDTitle1"/>
         | 
| 348 | 
            -
                      </div>
         | 
| 349 | 
            -
                      <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         | 
| 350 | 
            -
                      <div class="colophon"/>
         | 
| 351 | 
            -
                    </body>
         | 
| 352 | 
            -
                  OUTPUT
         | 
| 353 | 
            -
              end
         | 
| 354 | 
            -
             | 
| 355 | 
            -
              it "processes sequences of examples (Word)" do
         | 
| 356 | 
            -
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true)
         | 
| 357 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 358 | 
            -
                    <preface>
         | 
| 359 | 
            -
                      <foreword>
         | 
| 360 | 
            -
                        <example id="samplecode">
         | 
| 361 | 
            -
                          <name>EXAMPLE 1</name>
         | 
| 362 | 
            -
                          <quote>Hello</quote>
         | 
| 363 | 
            -
                        </example>
         | 
| 364 | 
            -
                        <example id="samplecode2">
         | 
| 365 | 
            -
                          <name>EXAMPLE 2 — Title</name>
         | 
| 366 | 
            -
                          <p>Hello</p>
         | 
| 367 | 
            -
                        </example>
         | 
| 368 | 
            -
                      </foreword>
         | 
| 369 | 
            -
                    </preface>
         | 
| 370 | 
            -
                  </iso-standard>
         | 
| 371 | 
            -
                INPUT
         | 
| 372 | 
            -
                expect(xmlpp(output.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 373 | 
            -
                  .to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 374 | 
            -
                    <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 375 | 
            -
                      <div class="WordSection1">
         | 
| 376 | 
            -
                        <p> </p>
         | 
| 377 | 
            -
                      </div>
         | 
| 378 | 
            -
                      <p>
         | 
| 379 | 
            -
                        <br clear="all" class="section"/>
         | 
| 380 | 
            -
                      </p>
         | 
| 381 | 
            -
                      <div class="WordSection2">
         | 
| 382 | 
            -
                        <p>
         | 
| 383 | 
            -
                          <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 384 | 
            -
                        </p>
         | 
| 385 | 
            -
                        <div>
         | 
| 386 | 
            -
                          <h1 class="ForewordTitle">Foreword</h1>
         | 
| 387 | 
            -
                          <div id="samplecode" class="example">
         | 
| 388 | 
            -
                            <p><span class="example_label">EXAMPLE  1</span><span style="mso-tab-count:1">  </span></p>
         | 
| 389 | 
            -
                            <div class="Quote">Hello</div>
         | 
| 390 | 
            -
                          </div>
         | 
| 391 | 
            -
                          <div id="samplecode2" class="example">
         | 
| 392 | 
            -
                            <p><span class="example_label">EXAMPLE  2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 393 | 
            -
                          </div>
         | 
| 331 | 
            +
                        <div id="samplecode2" class="example">
         | 
| 332 | 
            +
                          <p><span class="example_label">EXAMPLE  2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 394 333 | 
             
                        </div>
         | 
| 395 | 
            -
                        <p> </p>
         | 
| 396 334 | 
             
                      </div>
         | 
| 397 | 
            -
                      <p>
         | 
| 398 | 
            -
             | 
| 399 | 
            -
             | 
| 400 | 
            -
                      < | 
| 401 | 
            -
             | 
| 402 | 
            -
             | 
| 403 | 
            -
                      < | 
| 404 | 
            -
             | 
| 405 | 
            -
                     | 
| 406 | 
            -
             | 
| 335 | 
            +
                      <p> </p>
         | 
| 336 | 
            +
                    </div>
         | 
| 337 | 
            +
                    <p>
         | 
| 338 | 
            +
                      <br clear="all" class="section"/>
         | 
| 339 | 
            +
                    </p>
         | 
| 340 | 
            +
                    <div class="WordSection3">
         | 
| 341 | 
            +
                      <p class="zzSTDTitle1"/>
         | 
| 342 | 
            +
                    </div>
         | 
| 343 | 
            +
                    <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         | 
| 344 | 
            +
                    <div class="colophon"/>
         | 
| 345 | 
            +
                  </body>
         | 
| 346 | 
            +
                OUTPUT
         | 
| 347 | 
            +
                expect(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 348 | 
            +
                  .convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
         | 
| 349 | 
            +
                expect(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 350 | 
            +
                  .convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
         | 
| 351 | 
            +
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
         | 
| 352 | 
            +
                expect(xmlpp(output
         | 
| 353 | 
            +
                  .sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 354 | 
            +
                  .to be_equivalent_to xmlpp(word)
         | 
| 407 355 | 
             
              end
         | 
| 408 356 | 
             
            end
         | 
| @@ -148,6 +148,9 @@ RSpec.describe IsoDoc do | |
| 148 148 | 
             
                            An Appendix</title>
         | 
| 149 149 | 
             
                        </appendix>
         | 
| 150 150 | 
             
                      </annex>
         | 
| 151 | 
            +
                      <bibliography>
         | 
| 152 | 
            +
                        <references id="R" normative="false"><title>Bibliography</title></references>
         | 
| 153 | 
            +
                      </bibliography>
         | 
| 151 154 | 
             
                    </iso-standard>
         | 
| 152 155 | 
             
                  INPUT
         | 
| 153 156 |  | 
| @@ -163,7 +166,7 @@ RSpec.describe IsoDoc do | |
| 163 166 | 
             
                    </p>
         | 
| 164 167 | 
             
                    <div class="Section3">
         | 
| 165 168 | 
             
                      <a id="P" name="P"/>
         | 
| 166 | 
            -
                      < | 
| 169 | 
            +
                      <p class="ANNEX">Annex</p>
         | 
| 167 170 | 
             
                      <div>
         | 
| 168 171 | 
             
                        <a id="Q" name="Q"/>
         | 
| 169 172 | 
             
                        <p class="h2Annex">A.1
         | 
| @@ -177,6 +180,12 @@ RSpec.describe IsoDoc do | |
| 177 180 | 
             
                          An Appendix</p>
         | 
| 178 181 | 
             
                      </div>
         | 
| 179 182 | 
             
                    </div>
         | 
| 183 | 
            +
                    <p class='MsoNormal'>
         | 
| 184 | 
            +
                      <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
         | 
| 185 | 
            +
                    </p>
         | 
| 186 | 
            +
                    <div>
         | 
| 187 | 
            +
                      <p class='BiblioTitle'>Bibliography</p>
         | 
| 188 | 
            +
                    </div>
         | 
| 180 189 | 
             
                  </div>
         | 
| 181 190 | 
             
                OUTPUT
         | 
| 182 191 | 
             
              end
         | 
| @@ -227,9 +236,9 @@ RSpec.describe IsoDoc do | |
| 227 236 | 
             
                      <p class="TermNum">
         | 
| 228 237 | 
             
                        <a id="paddy1" name="paddy1"/>1.1</p>
         | 
| 229 238 | 
             
                      <p class="Terms" style="text-align:left;">paddy</p>
         | 
| 230 | 
            -
                      <p class=" | 
| 239 | 
            +
                      <p class="Definition">
         | 
| 231 240 | 
             
                        <a id="_eb29b35e-123e-4d1c-b50b-2714d41e747f" name="_eb29b35e-123e-4d1c-b50b-2714d41e747f"/>rice retaining its husk after threshing</p>
         | 
| 232 | 
            -
                      <p class=" | 
| 241 | 
            +
                      <p class="Source">[SOURCE:
         | 
| 233 242 | 
             
                        <a href="#ISO7301">ISO 7301:2011, 3.1</a>
         | 
| 234 243 | 
             
                        , modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
         | 
| 235 244 | 
             
                    </div>
         | 
| @@ -297,8 +306,9 @@ RSpec.describe IsoDoc do | |
| 297 306 | 
             
                      <p class="MsoToc1">
         | 
| 298 307 | 
             
                        <span lang="EN-GB" xml:lang="EN-GB">
         | 
| 299 308 | 
             
                          <span style="mso-element:field-begin"/>
         | 
| 300 | 
            -
                          <span style= | 
| 301 | 
            -
             | 
| 309 | 
            +
                          <span style='mso-spacerun:yes'> </span>
         | 
| 310 | 
            +
                          TOC \o "1-3" \h \z \t "Heading 1;1;ANNEX;1;Biblio Title;1;Foreword
         | 
| 311 | 
            +
                          Title;1;Intro Title;1"
         | 
| 302 312 | 
             
                          <span style="mso-element:field-separator"/></span>
         | 
| 303 313 | 
             
                        <span class="MsoHyperlink">
         | 
| 304 314 | 
             
                          <span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
         | 
| @@ -658,14 +668,14 @@ RSpec.describe IsoDoc do | |
| 658 668 | 
             
                    </p>
         | 
| 659 669 | 
             
                    <div class="Section3">
         | 
| 660 670 | 
             
                      <a id="P" name="P"/>
         | 
| 661 | 
            -
                      <div class=" | 
| 671 | 
            +
                      <div class="Example">
         | 
| 662 672 | 
             
                        <a id="_63112cbc-cde0-435f-9553-e0b8c4f5851c" name="_63112cbc-cde0-435f-9553-e0b8c4f5851c"/>
         | 
| 663 | 
            -
                        <p class=" | 
| 673 | 
            +
                        <p class="Example">
         | 
| 664 674 | 
             
                          <span style="mso-tab-count:1">  </span>'1M', '01M', and '0001M' all describe the calendar month January.</p>
         | 
| 665 675 | 
             
                      </div>
         | 
| 666 | 
            -
                      <div class=" | 
| 676 | 
            +
                      <div class="Example">
         | 
| 667 677 | 
             
                        <a id="_63112cbc-cde0-435f-9553-e0b8c4f5851d" name="_63112cbc-cde0-435f-9553-e0b8c4f5851d"/>
         | 
| 668 | 
            -
                        <p class=" | 
| 678 | 
            +
                        <p class="Example">
         | 
| 669 679 | 
             
                          <span style="mso-tab-count:1">  </span>'2M', '02M', and '0002M' all describe the calendar month February.</p>
         | 
| 670 680 | 
             
                      </div>
         | 
| 671 681 | 
             
                    </div>
         | 
| @@ -726,7 +736,6 @@ RSpec.describe IsoDoc do | |
| 726 736 | 
             
                            </tr>
         | 
| 727 737 | 
             
                          </table>
         | 
| 728 738 | 
             
                        </div>
         | 
| 729 | 
            -
                        <p class="FigureTitle" style="text-align:center;"/>
         | 
| 730 739 | 
             
                      </div>
         | 
| 731 740 | 
             
                    </div>
         | 
| 732 741 | 
             
                  </div>
         | 
    
        data/spec/isodoc/ref_spec.rb
    CHANGED
    
    | @@ -155,7 +155,7 @@ RSpec.describe IsoDoc do | |
| 155 155 | 
             
                      <language current="true">en</language>
         | 
| 156 156 | 
             
                    </bibdata>
         | 
| 157 157 | 
             
                    <preface>
         | 
| 158 | 
            -
                      <foreword>
         | 
| 158 | 
            +
                      <foreword displayorder="1">
         | 
| 159 159 | 
             
                        <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
         | 
| 160 160 | 
             
                          <eref bibitemid="ISO712">ISO 712</eref>
         | 
| 161 161 | 
             
                          <eref bibitemid="ISBN">[1]</eref>
         | 
| @@ -168,7 +168,7 @@ RSpec.describe IsoDoc do | |
| 168 168 | 
             
                      </foreword>
         | 
| 169 169 | 
             
                    </preface>
         | 
| 170 170 | 
             
                    <bibliography>
         | 
| 171 | 
            -
                      <references id="_normative_references" normative="true" obligation="informative">
         | 
| 171 | 
            +
                      <references id="_normative_references" normative="true" obligation="informative" displayorder="2">
         | 
| 172 172 | 
             
                        <title depth="1">1<tab/>Normative References</title>
         | 
| 173 173 | 
             
                        <p>The following documents are referred to in the text in such a way that
         | 
| 174 174 | 
             
                                   some or all of their content constitutes requirements of this document.
         | 
| @@ -231,14 +231,14 @@ RSpec.describe IsoDoc do | |
| 231 231 |  | 
| 232 232 | 
             
                            <link target="http://www.icc.or.at"/>
         | 
| 233 233 | 
             
                            )</formattedref>
         | 
| 234 | 
            -
                          <docidentifier type="ICC">167</docidentifier>
         | 
| 234 | 
            +
                          <docidentifier type="ICC">ICC 167</docidentifier>
         | 
| 235 235 | 
             
                        </bibitem>
         | 
| 236 236 | 
             
                        <note>
         | 
| 237 237 | 
             
                          <name>NOTE</name>
         | 
| 238 238 | 
             
                          <p>This is an annotation of ISO 20483:2013-2014</p>
         | 
| 239 239 | 
             
                        </note>
         | 
| 240 240 | 
             
                      </references>
         | 
| 241 | 
            -
                      <references id="_bibliography" normative="false" obligation="informative">
         | 
| 241 | 
            +
                      <references id="_bibliography" normative="false" obligation="informative" displayorder="3">
         | 
| 242 242 | 
             
                        <title depth="1">Bibliography</title>
         | 
| 243 243 | 
             
                        <bibitem id="ISBN" type="ISBN">
         | 
| 244 244 | 
             
                          <title format="text/plain">Chemicals for analytical laboratory use</title>
         | 
| @@ -294,7 +294,7 @@ RSpec.describe IsoDoc do | |
| 294 294 | 
             
                        </bibitem>
         | 
| 295 295 | 
             
                        <bibitem id="ref11">
         | 
| 296 296 | 
             
                          <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
         | 
| 297 | 
            -
                          <docidentifier type="IETF">RFC 10</docidentifier>
         | 
| 297 | 
            +
                          <docidentifier type="IETF">IETF RFC 10</docidentifier>
         | 
| 298 298 | 
             
                        </bibitem>
         | 
| 299 299 | 
             
                        <bibitem id="ref12">
         | 
| 300 300 | 
             
                          <formattedref format="application/x-isodoc+xml">CitationWorks. 2019.
         | 
| @@ -302,7 +302,7 @@ RSpec.describe IsoDoc do | |
| 302 302 | 
             
                            <em>How to cite a reference</em>
         | 
| 303 303 | 
             
                            .</formattedref>
         | 
| 304 304 | 
             
                          <docidentifier type="metanorma">[Citn]</docidentifier>
         | 
| 305 | 
            -
                          <docidentifier type="IETF">RFC 20</docidentifier>
         | 
| 305 | 
            +
                          <docidentifier type="IETF">IETF RFC 20</docidentifier>
         | 
| 306 306 | 
             
                        </bibitem>
         | 
| 307 307 | 
             
                      </references>
         | 
| 308 308 | 
             
                    </bibliography>
         | 
    
        data/spec/isodoc/section_spec.rb
    CHANGED
    
    | @@ -86,96 +86,82 @@ RSpec.describe IsoDoc do | |
| 86 86 | 
             
                INPUT
         | 
| 87 87 |  | 
| 88 88 | 
             
                presxml = <<~OUTPUT
         | 
| 89 | 
            -
                  <iso-standard xmlns= | 
| 89 | 
            +
                  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
         | 
| 90 90 | 
             
                    <preface>
         | 
| 91 | 
            -
                      <foreword obligation= | 
| 91 | 
            +
                      <foreword obligation="informative" displayorder="1">
         | 
| 92 92 | 
             
                        <title>Foreword</title>
         | 
| 93 | 
            -
                        <p id= | 
| 93 | 
            +
                        <p id="A">This is a preamble</p>
         | 
| 94 94 | 
             
                      </foreword>
         | 
| 95 | 
            -
                      <introduction id= | 
| 96 | 
            -
             | 
| 97 | 
            -
                        <clause id= | 
| 98 | 
            -
                          <title depth= | 
| 95 | 
            +
                      <introduction id="B" obligation="informative" displayorder="2">
         | 
| 96 | 
            +
                        <title depth="1">0<tab/>Introduction</title>
         | 
| 97 | 
            +
                        <clause id="C" inline-header="false" obligation="informative">
         | 
| 98 | 
            +
                          <title depth="2">0.1<tab/>Introduction Subsection</title>
         | 
| 99 99 | 
             
                        </clause>
         | 
| 100 100 | 
             
                        <p>This is patent boilerplate</p>
         | 
| 101 101 | 
             
                      </introduction>
         | 
| 102 102 | 
             
                    </preface>
         | 
| 103 103 | 
             
                    <sections>
         | 
| 104 | 
            -
                      <clause id= | 
| 105 | 
            -
                        <title depth= | 
| 106 | 
            -
                        <p id= | 
| 104 | 
            +
                      <clause id="D" obligation="normative" type="scope" displayorder="3">
         | 
| 105 | 
            +
                        <title depth="1">1<tab/>Scope</title>
         | 
| 106 | 
            +
                        <p id="E">Text</p>
         | 
| 107 107 | 
             
                      </clause>
         | 
| 108 | 
            -
                      <clause id= | 
| 109 | 
            -
                        <title depth= | 
| 110 | 
            -
                        <terms id= | 
| 111 | 
            -
                          <title depth= | 
| 112 | 
            -
                          <term id= | 
| 113 | 
            -
                            <name>3.1.1</name>
         | 
| 108 | 
            +
                      <clause id="H" obligation="normative" displayorder="5">
         | 
| 109 | 
            +
                        <title depth="1">3<tab/>Terms, Definitions, Symbols and Abbreviated Terms</title>
         | 
| 110 | 
            +
                        <terms id="I" obligation="normative">
         | 
| 111 | 
            +
                          <title depth="2">3.1<tab/>Normal Terms</title>
         | 
| 112 | 
            +
                          <term id="J"><name>3.1.1</name>
         | 
| 114 113 | 
             
                            <preferred>Term2</preferred>
         | 
| 115 114 | 
             
                          </term>
         | 
| 116 115 | 
             
                        </terms>
         | 
| 117 | 
            -
                        <definitions id= | 
| 118 | 
            -
                          <title>3.2</title>
         | 
| 116 | 
            +
                        <definitions id="K" inline-header="true"><title>3.2</title>
         | 
| 119 117 | 
             
                          <dl>
         | 
| 120 118 | 
             
                            <dt>Symbol</dt>
         | 
| 121 119 | 
             
                            <dd>Definition</dd>
         | 
| 122 120 | 
             
                          </dl>
         | 
| 123 121 | 
             
                        </definitions>
         | 
| 124 122 | 
             
                      </clause>
         | 
| 125 | 
            -
                      <definitions id= | 
| 126 | 
            -
                        <title>4</title>
         | 
| 123 | 
            +
                      <definitions id="L" displayorder="6"><title>4</title>
         | 
| 127 124 | 
             
                        <dl>
         | 
| 128 125 | 
             
                          <dt>Symbol</dt>
         | 
| 129 126 | 
             
                          <dd>Definition</dd>
         | 
| 130 127 | 
             
                        </dl>
         | 
| 131 128 | 
             
                      </definitions>
         | 
| 132 | 
            -
                      <clause id= | 
| 133 | 
            -
                        <title depth= | 
| 134 | 
            -
                        <clause id= | 
| 135 | 
            -
                          <title depth= | 
| 129 | 
            +
                      <clause id="M" inline-header="false" obligation="normative" displayorder="7">
         | 
| 130 | 
            +
                        <title depth="1">5<tab/>Clause 4</title>
         | 
| 131 | 
            +
                        <clause id="N" inline-header="false" obligation="normative">
         | 
| 132 | 
            +
                          <title depth="2">5.1<tab/>Introduction</title>
         | 
| 136 133 | 
             
                        </clause>
         | 
| 137 | 
            -
                        <clause id= | 
| 138 | 
            -
                          <title depth= | 
| 134 | 
            +
                        <clause id="O" inline-header="false" obligation="normative">
         | 
| 135 | 
            +
                          <title depth="2">5.2<tab/>Clause 4.2</title>
         | 
| 139 136 | 
             
                        </clause>
         | 
| 140 137 | 
             
                      </clause>
         | 
| 141 138 | 
             
                    </sections>
         | 
| 142 | 
            -
                    <annex id= | 
| 143 | 
            -
                      <title>
         | 
| 144 | 
            -
             | 
| 145 | 
            -
                        < | 
| 146 | 
            -
                         | 
| 147 | 
            -
             | 
| 148 | 
            -
                        <br/>
         | 
| 149 | 
            -
                        <strong>Annex</strong>
         | 
| 150 | 
            -
                      </title>
         | 
| 151 | 
            -
                      <clause id='Q' inline-header='false' obligation='normative'>
         | 
| 152 | 
            -
                        <title depth='2'>A.1<tab/>Annex A.1</title>
         | 
| 153 | 
            -
                        <clause id='Q1' inline-header='false' obligation='normative'>
         | 
| 154 | 
            -
                          <title depth='3'>A.1.1<tab/>Annex A.1a</title>
         | 
| 139 | 
            +
                    <annex id="P" inline-header="false" obligation="normative" displayorder="8">
         | 
| 140 | 
            +
                      <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
         | 
| 141 | 
            +
                      <clause id="Q" inline-header="false" obligation="normative">
         | 
| 142 | 
            +
                        <title depth="2">A.1<tab/>Annex A.1</title>
         | 
| 143 | 
            +
                        <clause id="Q1" inline-header="false" obligation="normative">
         | 
| 144 | 
            +
                          <title depth="3">A.1.1<tab/>Annex A.1a</title>
         | 
| 155 145 | 
             
                        </clause>
         | 
| 156 146 | 
             
                      </clause>
         | 
| 157 | 
            -
                      <appendix id= | 
| 158 | 
            -
                        <title depth= | 
| 159 | 
            -
                        <clause id= | 
| 160 | 
            -
                          <title depth= | 
| 161 | 
            -
                            Appendix 1.1
         | 
| 162 | 
            -
                            <tab/>
         | 
| 163 | 
            -
                            Appendix subclause
         | 
| 164 | 
            -
                          </title>
         | 
| 147 | 
            +
                      <appendix id="Q2" inline-header="false" obligation="normative">
         | 
| 148 | 
            +
                        <title depth="2">Appendix 1<tab/>An Appendix</title>
         | 
| 149 | 
            +
                        <clause id="Q2a" inline-header="false" obligation="normative">
         | 
| 150 | 
            +
                          <title depth="3">Appendix 1.1<tab/>Appendix subclause</title>
         | 
| 165 151 | 
             
                        </clause>
         | 
| 166 152 | 
             
                      </appendix>
         | 
| 167 | 
            -
                      <references id= | 
| 168 | 
            -
                        <title depth= | 
| 153 | 
            +
                      <references id="Q3" normative="false">
         | 
| 154 | 
            +
                        <title depth="2">A.2<tab/>Annex Bibliography</title>
         | 
| 169 155 | 
             
                      </references>
         | 
| 170 156 | 
             
                    </annex>
         | 
| 171 157 | 
             
                    <bibliography>
         | 
| 172 | 
            -
                      <references id= | 
| 173 | 
            -
                        <title depth= | 
| 158 | 
            +
                      <references id="R" normative="true" obligation="informative" displayorder="4">
         | 
| 159 | 
            +
                        <title depth="1">2<tab/>Normative References</title>
         | 
| 174 160 | 
             
                      </references>
         | 
| 175 | 
            -
                      <clause id= | 
| 176 | 
            -
                        <title depth= | 
| 177 | 
            -
                        <references id= | 
| 178 | 
            -
                          <title depth= | 
| 161 | 
            +
                      <clause id="S" obligation="informative" displayorder="9">
         | 
| 162 | 
            +
                        <title depth="1">Bibliography</title>
         | 
| 163 | 
            +
                        <references id="T" normative="false" obligation="informative">
         | 
| 164 | 
            +
                          <title depth="2">Bibliography Subsection</title>
         | 
| 179 165 | 
             
                        </references>
         | 
| 180 166 | 
             
                      </clause>
         | 
| 181 167 | 
             
                    </bibliography>
         | 
| @@ -259,7 +245,7 @@ RSpec.describe IsoDoc do | |
| 259 245 | 
             
                          <div id="Q2">
         | 
| 260 246 | 
             
                            <h2>Appendix 1  An Appendix</h2>
         | 
| 261 247 | 
             
                            <div id="Q2a">
         | 
| 262 | 
            -
                              <h3>Appendix 1.1 | 
| 248 | 
            +
                              <h3>Appendix 1.1  Appendix subclause</h3>
         | 
| 263 249 | 
             
                            </div>
         | 
| 264 250 | 
             
                          </div>
         | 
| 265 251 | 
             
                          <div>
         | 
| @@ -281,7 +267,7 @@ RSpec.describe IsoDoc do | |
| 281 267 | 
             
                word = <<~OUTPUT
         | 
| 282 268 | 
             
                  <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 283 269 | 
             
                    <div class="WordSection1">
         | 
| 284 | 
            -
                      <p | 
| 270 | 
            +
                      <p> </p>
         | 
| 285 271 | 
             
                    </div>
         | 
| 286 272 | 
             
                    <p>
         | 
| 287 273 | 
             
                      <br class="section" clear="all"/>
         | 
| @@ -292,7 +278,7 @@ RSpec.describe IsoDoc do | |
| 292 278 | 
             
                      </p>
         | 
| 293 279 | 
             
                      <div>
         | 
| 294 280 | 
             
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 295 | 
            -
                        <p id="A">This is a preamble</p>
         | 
| 281 | 
            +
                        <p id="A" class='ForewordText'>This is a preamble</p>
         | 
| 296 282 | 
             
                      </div>
         | 
| 297 283 | 
             
                      <p>
         | 
| 298 284 | 
             
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| @@ -308,7 +294,7 @@ RSpec.describe IsoDoc do | |
| 308 294 | 
             
                        </div>
         | 
| 309 295 | 
             
                        <p>This is patent boilerplate</p>
         | 
| 310 296 | 
             
                      </div>
         | 
| 311 | 
            -
                      <p | 
| 297 | 
            +
                      <p> </p>
         | 
| 312 298 | 
             
                    </div>
         | 
| 313 299 | 
             
                    <p>
         | 
| 314 300 | 
             
                      <br class="section" clear="all"/>
         | 
| @@ -383,7 +369,6 @@ RSpec.describe IsoDoc do | |
| 383 369 | 
             
                      </p>
         | 
| 384 370 | 
             
                      <div class="Section3" id="P">
         | 
| 385 371 | 
             
                        <h1 class="Annex">
         | 
| 386 | 
            -
                          <b>Annex A</b>
         | 
| 387 372 | 
             
                          <br/>(normative)
         | 
| 388 373 | 
             
                          <br/>
         | 
| 389 374 | 
             
                          <br/>
         | 
| @@ -409,7 +394,7 @@ RSpec.describe IsoDoc do | |
| 409 394 | 
             
                          </div>
         | 
| 410 395 | 
             
                        </div>
         | 
| 411 396 | 
             
                        <div>
         | 
| 412 | 
            -
                          <h2 class=" | 
| 397 | 
            +
                          <h2 class="BiblioTitle">A.2
         | 
| 413 398 | 
             
                            <span style="mso-tab-count:1">  </span>
         | 
| 414 399 | 
             
                            Annex Bibliography</h2>
         | 
| 415 400 | 
             
                        </div>
         | 
| @@ -418,9 +403,9 @@ RSpec.describe IsoDoc do | |
| 418 403 | 
             
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 419 404 | 
             
                      </p>
         | 
| 420 405 | 
             
                      <div>
         | 
| 421 | 
            -
                        <h1 class=" | 
| 406 | 
            +
                        <h1 class="BiblioTitle">Bibliography</h1>
         | 
| 422 407 | 
             
                        <div>
         | 
| 423 | 
            -
                          <h2 class=" | 
| 408 | 
            +
                          <h2 class="BiblioTitle">Bibliography Subsection</h2>
         | 
| 424 409 | 
             
                        </div>
         | 
| 425 410 | 
             
                      </div>
         | 
| 426 411 | 
             
                    </div>
         | 
| @@ -428,12 +413,16 @@ RSpec.describe IsoDoc do | |
| 428 413 | 
             
                    <div class="colophon"/>
         | 
| 429 414 | 
             
                  </body>
         | 
| 430 415 | 
             
                OUTPUT
         | 
| 431 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}) | 
| 416 | 
            +
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 417 | 
            +
                  .convert("test", input, true)))
         | 
| 432 418 | 
             
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 433 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}) | 
| 419 | 
            +
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 420 | 
            +
                  .convert("test", presxml, true)))
         | 
| 434 421 | 
             
                  .to be_equivalent_to xmlpp(html)
         | 
| 435 | 
            -
                expect(xmlpp(IsoDoc::Iso::WordConvert.new({}) | 
| 436 | 
            -
                  . | 
| 422 | 
            +
                expect(xmlpp(IsoDoc::Iso::WordConvert.new({})
         | 
| 423 | 
            +
                  .convert("test", presxml, true)
         | 
| 424 | 
            +
                  .sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
         | 
| 425 | 
            +
                  .to be_equivalent_to xmlpp(word)
         | 
| 437 426 | 
             
              end
         | 
| 438 427 |  | 
| 439 428 | 
             
              it "processes subclauses with and without titles" do
         | 
| @@ -455,7 +444,7 @@ RSpec.describe IsoDoc do | |
| 455 444 | 
             
                presxml = <<~OUTPUT
         | 
| 456 445 | 
             
                  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
         | 
| 457 446 | 
             
                    <sections>
         | 
| 458 | 
            -
                      <clause id='D' obligation='normative'>
         | 
| 447 | 
            +
                      <clause id='D' obligation='normative' displayorder="1">
         | 
| 459 448 | 
             
                        <title depth='1'>1<tab/>Scope</title>
         | 
| 460 449 | 
             
                        <clause id='D1' obligation='normative'>
         | 
| 461 450 | 
             
                          <title depth='2'>1.1<tab/>Scope 1</title>
         | 
| @@ -497,38 +486,165 @@ RSpec.describe IsoDoc do | |
| 497 486 | 
             
                    </body>
         | 
| 498 487 | 
             
                  </html>
         | 
| 499 488 | 
             
                OUTPUT
         | 
| 500 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}) | 
| 489 | 
            +
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 490 | 
            +
                  .convert("test", input, true)))
         | 
| 501 491 | 
             
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 502 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}) | 
| 492 | 
            +
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 493 | 
            +
                  .convert("test", presxml, true)))
         | 
| 503 494 | 
             
                  .to be_equivalent_to xmlpp(html)
         | 
| 504 495 | 
             
              end
         | 
| 505 496 |  | 
| 506 497 | 
             
              it "processes simple terms & definitions" do
         | 
| 507 | 
            -
                 | 
| 508 | 
            -
                   | 
| 509 | 
            -
                    < | 
| 510 | 
            -
                      < | 
| 511 | 
            -
                        < | 
| 512 | 
            -
             | 
| 513 | 
            -
                          < | 
| 514 | 
            -
             | 
| 515 | 
            -
             | 
| 516 | 
            -
             | 
| 517 | 
            -
             | 
| 518 | 
            -
             | 
| 519 | 
            -
             | 
| 520 | 
            -
             | 
| 521 | 
            -
             | 
| 522 | 
            -
             | 
| 523 | 
            -
             | 
| 524 | 
            -
             | 
| 525 | 
            -
             | 
| 526 | 
            -
             | 
| 527 | 
            -
                          </div>
         | 
| 498 | 
            +
                input = <<~INPUT
         | 
| 499 | 
            +
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 500 | 
            +
                    <sections>
         | 
| 501 | 
            +
                      <terms id="H" obligation="normative">
         | 
| 502 | 
            +
                        <title>Terms, Definitions, Symbols and Abbreviated Terms</title>
         | 
| 503 | 
            +
                        <term id="J">
         | 
| 504 | 
            +
                          <name>1.1</name>
         | 
| 505 | 
            +
                          <preferred>Term2</preferred>
         | 
| 506 | 
            +
                        </term>
         | 
| 507 | 
            +
                      </terms>
         | 
| 508 | 
            +
                    </sections>
         | 
| 509 | 
            +
                  </iso-standard>
         | 
| 510 | 
            +
                INPUT
         | 
| 511 | 
            +
                output = <<~OUTPUT
         | 
| 512 | 
            +
                  #{HTML_HDR}
         | 
| 513 | 
            +
                        <p class="zzSTDTitle1"/>
         | 
| 514 | 
            +
                        <div id="H">
         | 
| 515 | 
            +
                          <h1>Terms, Definitions, Symbols and Abbreviated Terms</h1>
         | 
| 516 | 
            +
                          <p class="TermNum" id="J">1.1</p>
         | 
| 517 | 
            +
                          <p class="Terms" style="text-align:left;">Term2</p>
         | 
| 528 518 | 
             
                        </div>
         | 
| 529 | 
            -
                      </ | 
| 530 | 
            -
                    </ | 
| 531 | 
            -
                   | 
| 519 | 
            +
                      </div>
         | 
| 520 | 
            +
                    </body>
         | 
| 521 | 
            +
                  </html>
         | 
| 522 | 
            +
                OUTPUT
         | 
| 523 | 
            +
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 524 | 
            +
                  .convert("test", input, true))).to be_equivalent_to xmlpp(output)
         | 
| 525 | 
            +
              end
         | 
| 526 | 
            +
             | 
| 527 | 
            +
              it "processes multiple terms & definitions sections" do
         | 
| 528 | 
            +
                input = <<~INPUT
         | 
| 529 | 
            +
                  #{BLANK_HDR.sub(%r{<doctype>article</doctype>}, '<doctype>article</doctype><subdoctype>vocabulary</subdoctype>')}
         | 
| 530 | 
            +
                           <sections>
         | 
| 531 | 
            +
                       <terms id='A' obligation='normative'>
         | 
| 532 | 
            +
                         <title>Terms and definitions</title>
         | 
| 533 | 
            +
                         <p id='A1'>No terms and definitions are listed in this document.</p>
         | 
| 534 | 
            +
                       </terms>
         | 
| 535 | 
            +
                       <clause id='B' inline-header='false' obligation='normative'>
         | 
| 536 | 
            +
                         <title>Clause</title>
         | 
| 537 | 
            +
                       </clause>
         | 
| 538 | 
            +
                       <terms id='C' obligation='normative'>
         | 
| 539 | 
            +
                         <title>More terms</title>
         | 
| 540 | 
            +
                       </terms>
         | 
| 541 | 
            +
                     </sections>
         | 
| 542 | 
            +
                   </iso-standard>
         | 
| 543 | 
            +
                INPUT
         | 
| 544 | 
            +
                presxml = <<~OUTPUT
         | 
| 545 | 
            +
                <iso-standard xmlns='https://www.metanorma.org/ns/iso' type='presentation' version="#{Metanorma::ISO::VERSION}">
         | 
| 546 | 
            +
                     <bibdata type='standard'>
         | 
| 547 | 
            +
                       <contributor>
         | 
| 548 | 
            +
                         <role type='author'/>
         | 
| 549 | 
            +
                         <organization>
         | 
| 550 | 
            +
                           <name>International Organization for Standardization</name>
         | 
| 551 | 
            +
                           <abbreviation>ISO</abbreviation>
         | 
| 552 | 
            +
                         </organization>
         | 
| 553 | 
            +
                       </contributor>
         | 
| 554 | 
            +
                       <contributor>
         | 
| 555 | 
            +
                         <role type='publisher'/>
         | 
| 556 | 
            +
                         <organization>
         | 
| 557 | 
            +
                           <name>International Organization for Standardization</name>
         | 
| 558 | 
            +
                           <abbreviation>ISO</abbreviation>
         | 
| 559 | 
            +
                         </organization>
         | 
| 560 | 
            +
                       </contributor>
         | 
| 561 | 
            +
                       <language current='true'>en</language>
         | 
| 562 | 
            +
                       <script current='true'>Latn</script>
         | 
| 563 | 
            +
                       <status>
         | 
| 564 | 
            +
                         <stage abbreviation='IS' language=''>60</stage>
         | 
| 565 | 
            +
                         <substage language=''>60</substage>
         | 
| 566 | 
            +
                       </status>
         | 
| 567 | 
            +
                       <copyright>
         | 
| 568 | 
            +
                         <from>2021</from>
         | 
| 569 | 
            +
                         <owner>
         | 
| 570 | 
            +
                           <organization>
         | 
| 571 | 
            +
                             <name>International Organization for Standardization</name>
         | 
| 572 | 
            +
                             <abbreviation>ISO</abbreviation>
         | 
| 573 | 
            +
                           </organization>
         | 
| 574 | 
            +
                         </owner>
         | 
| 575 | 
            +
                       </copyright>
         | 
| 576 | 
            +
                       <ext>
         | 
| 577 | 
            +
                         <doctype language=''>article</doctype>
         | 
| 578 | 
            +
                         <subdoctype>vocabulary</subdoctype>
         | 
| 579 | 
            +
                         <editorialgroup>
         | 
| 580 | 
            +
                           <technical-committee/>
         | 
| 581 | 
            +
                           <subcommittee/>
         | 
| 582 | 
            +
                           <workgroup/>
         | 
| 583 | 
            +
                         </editorialgroup>
         | 
| 584 | 
            +
                         <stagename>International standard</stagename>
         | 
| 585 | 
            +
                       </ext>
         | 
| 586 | 
            +
                     </bibdata>
         | 
| 587 | 
            +
                     <sections>
         | 
| 588 | 
            +
                       <terms id='A' obligation='normative' displayorder='1'>
         | 
| 589 | 
            +
                         <title depth='1'>
         | 
| 590 | 
            +
                           1
         | 
| 591 | 
            +
                           <tab/>
         | 
| 592 | 
            +
                           Terms and definitions
         | 
| 593 | 
            +
                         </title>
         | 
| 594 | 
            +
                         <p id='A1'>No terms and definitions are listed in this document.</p>
         | 
| 595 | 
            +
                       </terms>
         | 
| 596 | 
            +
                       <clause id='B' inline-header='false' obligation='normative' displayorder='2'>
         | 
| 597 | 
            +
                         <title depth='1'>
         | 
| 598 | 
            +
                           2
         | 
| 599 | 
            +
                           <tab/>
         | 
| 600 | 
            +
                           Clause
         | 
| 601 | 
            +
                         </title>
         | 
| 602 | 
            +
                       </clause>
         | 
| 603 | 
            +
                       <terms id='C' obligation='normative' displayorder='3'>
         | 
| 604 | 
            +
                         <title depth='1'>
         | 
| 605 | 
            +
                           3
         | 
| 606 | 
            +
                           <tab/>
         | 
| 607 | 
            +
                           More terms
         | 
| 608 | 
            +
                         </title>
         | 
| 609 | 
            +
                       </terms>
         | 
| 610 | 
            +
                     </sections>
         | 
| 611 | 
            +
                   </iso-standard>
         | 
| 612 | 
            +
                OUTPUT
         | 
| 613 | 
            +
                output = <<~OUTPUT
         | 
| 614 | 
            +
                <html lang='en'>
         | 
| 615 | 
            +
              <head/>
         | 
| 616 | 
            +
              <body lang='en'>
         | 
| 617 | 
            +
                <div class='title-section'>
         | 
| 618 | 
            +
                  <p> </p>
         | 
| 619 | 
            +
                </div>
         | 
| 620 | 
            +
                <br/>
         | 
| 621 | 
            +
                <div class='prefatory-section'>
         | 
| 622 | 
            +
                  <p> </p>
         | 
| 623 | 
            +
                </div>
         | 
| 624 | 
            +
                <br/>
         | 
| 625 | 
            +
                <div class='main-section'>
         | 
| 626 | 
            +
                  <p class='zzSTDTitle1'/>
         | 
| 627 | 
            +
                  <div id='A'>
         | 
| 628 | 
            +
                    <h1> 1   Terms and definitions </h1>
         | 
| 629 | 
            +
                    <p id='A1'>No terms and definitions are listed in this document.</p>
         | 
| 630 | 
            +
                  </div>
         | 
| 631 | 
            +
                  <div id='B'>
         | 
| 632 | 
            +
                    <h1> 2   Clause </h1>
         | 
| 633 | 
            +
                  </div>
         | 
| 634 | 
            +
                  <div id='C'>
         | 
| 635 | 
            +
                    <h1> 3   More terms </h1>
         | 
| 636 | 
            +
                  </div>
         | 
| 637 | 
            +
                </div>
         | 
| 638 | 
            +
              </body>
         | 
| 639 | 
            +
            </html>
         | 
| 640 | 
            +
                OUTPUT
         | 
| 641 | 
            +
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 642 | 
            +
                  .convert("test", input, true)
         | 
| 643 | 
            +
                  .gsub(%r{<localized-strings>.*</localized-strings>}m, "")
         | 
| 644 | 
            +
                  .gsub(%r{<boilerplate>.*</boilerplate>}m, "")))
         | 
| 645 | 
            +
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 646 | 
            +
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 647 | 
            +
                  .convert("test", presxml, true))).to be_equivalent_to xmlpp(output)
         | 
| 532 648 | 
             
              end
         | 
| 533 649 |  | 
| 534 650 | 
             
              it "processes inline section headers" do
         | 
| @@ -686,191 +802,193 @@ RSpec.describe IsoDoc do | |
| 686 802 | 
             
                  </bipm-standard>
         | 
| 687 803 | 
             
                INPUT
         | 
| 688 804 | 
             
                presxml = <<~OUTPUT
         | 
| 689 | 
            -
             | 
| 690 | 
            -
             | 
| 691 | 
            -
             | 
| 692 | 
            -
             | 
| 693 | 
            -
             | 
| 694 | 
            -
             | 
| 695 | 
            -
             | 
| 696 | 
            -
             | 
| 697 | 
            -
             | 
| 698 | 
            -
             | 
| 699 | 
            -
             | 
| 700 | 
            -
             | 
| 701 | 
            -
             | 
| 702 | 
            -
             | 
| 703 | 
            -
             | 
| 704 | 
            -
             | 
| 705 | 
            -
             | 
| 706 | 
            -
             | 
| 707 | 
            -
             | 
| 708 | 
            -
             | 
| 709 | 
            -
             | 
| 710 | 
            -
             | 
| 711 | 
            -
             | 
| 712 | 
            -
             | 
| 713 | 
            -
             | 
| 714 | 
            -
             | 
| 715 | 
            -
             | 
| 716 | 
            -
             | 
| 717 | 
            -
             | 
| 718 | 
            -
             | 
| 719 | 
            -
             | 
| 720 | 
            -
             | 
| 721 | 
            -
             | 
| 722 | 
            -
             | 
| 723 | 
            -
             | 
| 724 | 
            -
             | 
| 725 | 
            -
             | 
| 726 | 
            -
             | 
| 727 | 
            -
             | 
| 728 | 
            -
             | 
| 729 | 
            -
             | 
| 730 | 
            -
             | 
| 731 | 
            -
             | 
| 732 | 
            -
             | 
| 733 | 
            -
             | 
| 734 | 
            -
             | 
| 735 | 
            -
             | 
| 736 | 
            -
             | 
| 737 | 
            -
             | 
| 738 | 
            -
             | 
| 739 | 
            -
             | 
| 740 | 
            -
             | 
| 741 | 
            -
             | 
| 742 | 
            -
             | 
| 743 | 
            -
             | 
| 744 | 
            -
             | 
| 745 | 
            -
             | 
| 746 | 
            -
             | 
| 747 | 
            -
             | 
| 748 | 
            -
             | 
| 749 | 
            -
             | 
| 750 | 
            -
             | 
| 751 | 
            -
             | 
| 752 | 
            -
             | 
| 753 | 
            -
             | 
| 754 | 
            -
             | 
| 755 | 
            -
             | 
| 756 | 
            -
             | 
| 757 | 
            -
             | 
| 758 | 
            -
             | 
| 759 | 
            -
             | 
| 760 | 
            -
             | 
| 761 | 
            -
             | 
| 762 | 
            -
             | 
| 763 | 
            -
             | 
| 764 | 
            -
             | 
| 765 | 
            -
             | 
| 766 | 
            -
             | 
| 767 | 
            -
             | 
| 768 | 
            -
             | 
| 769 | 
            -
             | 
| 770 | 
            -
             | 
| 771 | 
            -
             | 
| 772 | 
            -
             | 
| 773 | 
            -
            </iso-standard>
         | 
| 805 | 
            +
                     <iso-standard xmlns='https://open.ribose.com/standards/bipm' type='presentation'>
         | 
| 806 | 
            +
                    <bibdata>
         | 
| 807 | 
            +
                      <language current='true'>en</language>
         | 
| 808 | 
            +
                      <script current='true'>Latn</script>
         | 
| 809 | 
            +
                    </bibdata>
         | 
| 810 | 
            +
                    <sections>
         | 
| 811 | 
            +
                      <clause id='A' displayorder="1">
         | 
| 812 | 
            +
                        <title>1</title>
         | 
| 813 | 
            +
                        <bookmark id='_'/>
         | 
| 814 | 
            +
                        <bookmark id='_'/>
         | 
| 815 | 
            +
                        <bookmark id='_'/>
         | 
| 816 | 
            +
                        <bookmark id='_'/>
         | 
| 817 | 
            +
                        <bookmark id='_'/>
         | 
| 818 | 
            +
                        <clause id='B' inline-header='true'>
         | 
| 819 | 
            +
                          <title>1.1</title>
         | 
| 820 | 
            +
                          <bookmark id='_'/>
         | 
| 821 | 
            +
                          <bookmark id='_'/>
         | 
| 822 | 
            +
                          <bookmark id='_'/>
         | 
| 823 | 
            +
                          <bookmark id='_'/>
         | 
| 824 | 
            +
                        </clause>
         | 
| 825 | 
            +
                      </clause>
         | 
| 826 | 
            +
                    </sections>
         | 
| 827 | 
            +
                    <indexsect id='_' displayorder="2">
         | 
| 828 | 
            +
                      <title>Index</title>
         | 
| 829 | 
            +
                      <ul>
         | 
| 830 | 
            +
                        <li>
         | 
| 831 | 
            +
                          <em>Dasein</em>
         | 
| 832 | 
            +
                          , see
         | 
| 833 | 
            +
                          <em>Eman</em>
         | 
| 834 | 
            +
                          cipation, être
         | 
| 835 | 
            +
                        </li>
         | 
| 836 | 
            +
                        <li>
         | 
| 837 | 
            +
                          élongé,
         | 
| 838 | 
            +
                          <xref target='_' pagenumber='true'>Clause 1</xref>
         | 
| 839 | 
            +
                        </li>
         | 
| 840 | 
            +
                        <li>
         | 
| 841 | 
            +
                          <em>Eman</em>
         | 
| 842 | 
            +
                          cipation,
         | 
| 843 | 
            +
                          <xref target='_' pagenumber='true'>Clause 1</xref>
         | 
| 844 | 
            +
                          ,
         | 
| 845 | 
            +
                          <xref target='_' pagenumber='true'>1.1</xref>
         | 
| 846 | 
            +
                          <ul>
         | 
| 847 | 
            +
                            <li>
         | 
| 848 | 
            +
                              dans la France,
         | 
| 849 | 
            +
                              <xref target='_' pagenumber='true'>Clause 1</xref>
         | 
| 850 | 
            +
                              <ul>
         | 
| 851 | 
            +
                                <li>
         | 
| 852 | 
            +
                                  à Paris,
         | 
| 853 | 
            +
                                  <xref target='_' pagenumber='true'>1.1</xref>
         | 
| 854 | 
            +
                                </li>
         | 
| 855 | 
            +
                                <li>
         | 
| 856 | 
            +
                                  en Bretagne,
         | 
| 857 | 
            +
                                  <xref target='_' pagenumber='true'>Clause 1</xref>
         | 
| 858 | 
            +
                                </li>
         | 
| 859 | 
            +
                              </ul>
         | 
| 860 | 
            +
                            </li>
         | 
| 861 | 
            +
                            <li>
         | 
| 862 | 
            +
                              dans les États-Unis,
         | 
| 863 | 
            +
                              <xref target='_' pagenumber='true'>1.1</xref>
         | 
| 864 | 
            +
                            </li>
         | 
| 865 | 
            +
                          </ul>
         | 
| 866 | 
            +
                        </li>
         | 
| 867 | 
            +
                        <li>
         | 
| 868 | 
            +
                          être
         | 
| 869 | 
            +
                          <ul>
         | 
| 870 | 
            +
                            <li>
         | 
| 871 | 
            +
                              Husserl, see zebra, see also
         | 
| 872 | 
            +
                              <em>Eman</em>
         | 
| 873 | 
            +
                              cipation, zebra
         | 
| 874 | 
            +
                              <ul>
         | 
| 875 | 
            +
                                <li>
         | 
| 876 | 
            +
                                  en allemand,
         | 
| 877 | 
            +
                                  <xref target='_' pagenumber='true'>Clause 1</xref>
         | 
| 878 | 
            +
                                </li>
         | 
| 879 | 
            +
                              </ul>
         | 
| 880 | 
            +
                            </li>
         | 
| 881 | 
            +
                          </ul>
         | 
| 882 | 
            +
                        </li>
         | 
| 883 | 
            +
                        <li>
         | 
| 884 | 
            +
                          zebra,
         | 
| 885 | 
            +
                          <xref target='_' pagenumber='true'>1.1</xref>
         | 
| 886 | 
            +
                        </li>
         | 
| 887 | 
            +
                      </ul>
         | 
| 888 | 
            +
                    </indexsect>
         | 
| 889 | 
            +
                  </iso-standard>
         | 
| 774 890 | 
             
                OUTPUT
         | 
| 775 891 | 
             
                html = <<~OUTPUT
         | 
| 776 | 
            -
             | 
| 777 | 
            -
             | 
| 778 | 
            -
             | 
| 779 | 
            -
             | 
| 780 | 
            -
             | 
| 781 | 
            -
             | 
| 782 | 
            -
             | 
| 783 | 
            -
             | 
| 784 | 
            -
             | 
| 785 | 
            -
             | 
| 786 | 
            -
             | 
| 787 | 
            -
             | 
| 788 | 
            -
             | 
| 789 | 
            -
             | 
| 790 | 
            -
             | 
| 791 | 
            -
             | 
| 792 | 
            -
             | 
| 793 | 
            -
             | 
| 794 | 
            -
             | 
| 795 | 
            -
             | 
| 796 | 
            -
             | 
| 797 | 
            -
             | 
| 798 | 
            -
             | 
| 799 | 
            -
             | 
| 800 | 
            -
             | 
| 801 | 
            -
             | 
| 802 | 
            -
             | 
| 803 | 
            -
             | 
| 804 | 
            -
             | 
| 805 | 
            -
             | 
| 806 | 
            -
             | 
| 807 | 
            -
             | 
| 808 | 
            -
             | 
| 809 | 
            -
             | 
| 810 | 
            -
             | 
| 811 | 
            -
             | 
| 812 | 
            -
             | 
| 813 | 
            -
             | 
| 814 | 
            -
             | 
| 815 | 
            -
             | 
| 816 | 
            -
             | 
| 817 | 
            -
             | 
| 818 | 
            -
             | 
| 819 | 
            -
             | 
| 820 | 
            -
             | 
| 821 | 
            -
             | 
| 822 | 
            -
             | 
| 823 | 
            -
             | 
| 824 | 
            -
             | 
| 825 | 
            -
             | 
| 826 | 
            -
             | 
| 827 | 
            -
             | 
| 828 | 
            -
             | 
| 829 | 
            -
             | 
| 830 | 
            -
             | 
| 831 | 
            -
             | 
| 832 | 
            -
             | 
| 833 | 
            -
             | 
| 834 | 
            -
             | 
| 835 | 
            -
             | 
| 836 | 
            -
             | 
| 837 | 
            -
             | 
| 838 | 
            -
             | 
| 839 | 
            -
             | 
| 840 | 
            -
             | 
| 841 | 
            -
             | 
| 842 | 
            -
             | 
| 843 | 
            -
             | 
| 844 | 
            -
             | 
| 845 | 
            -
             | 
| 846 | 
            -
             | 
| 847 | 
            -
             | 
| 848 | 
            -
             | 
| 849 | 
            -
             | 
| 850 | 
            -
             | 
| 851 | 
            -
             | 
| 852 | 
            -
             | 
| 853 | 
            -
             | 
| 854 | 
            -
             | 
| 855 | 
            -
             | 
| 856 | 
            -
             | 
| 857 | 
            -
             | 
| 858 | 
            -
             | 
| 859 | 
            -
             | 
| 860 | 
            -
             | 
| 861 | 
            -
             | 
| 862 | 
            -
             | 
| 863 | 
            -
             | 
| 864 | 
            -
             | 
| 865 | 
            -
             | 
| 866 | 
            -
             | 
| 867 | 
            -
             | 
| 868 | 
            -
             | 
| 869 | 
            -
             | 
| 870 | 
            -
            </html>
         | 
| 892 | 
            +
                      <html lang='en'>
         | 
| 893 | 
            +
                    <head/>
         | 
| 894 | 
            +
                    <body lang='en'>
         | 
| 895 | 
            +
                      <div class='title-section'>
         | 
| 896 | 
            +
                        <p> </p>
         | 
| 897 | 
            +
                      </div>
         | 
| 898 | 
            +
                      <br/>
         | 
| 899 | 
            +
                      <div class='prefatory-section'>
         | 
| 900 | 
            +
                        <p> </p>
         | 
| 901 | 
            +
                      </div>
         | 
| 902 | 
            +
                      <br/>
         | 
| 903 | 
            +
                      <div class='main-section'>
         | 
| 904 | 
            +
                        <p class='zzSTDTitle1'/>
         | 
| 905 | 
            +
                        <div id='A'>
         | 
| 906 | 
            +
                          <h1>1</h1>
         | 
| 907 | 
            +
                          <a id='_'/>
         | 
| 908 | 
            +
                          <a id='_'/>
         | 
| 909 | 
            +
                          <a id='_'/>
         | 
| 910 | 
            +
                          <a id='_'/>
         | 
| 911 | 
            +
                          <a id='_'/>
         | 
| 912 | 
            +
                          <div id='B'>
         | 
| 913 | 
            +
                            <span class='zzMoveToFollowing'>
         | 
| 914 | 
            +
                              <b>1.1  </b>
         | 
| 915 | 
            +
                            </span>
         | 
| 916 | 
            +
                            <a id='_'/>
         | 
| 917 | 
            +
                            <a id='_'/>
         | 
| 918 | 
            +
                            <a id='_'/>
         | 
| 919 | 
            +
                            <a id='_'/>
         | 
| 920 | 
            +
                          </div>
         | 
| 921 | 
            +
                        </div>
         | 
| 922 | 
            +
                        <div id='_'>
         | 
| 923 | 
            +
                          <h1>Index</h1>
         | 
| 924 | 
            +
                          <ul>
         | 
| 925 | 
            +
                            <li>
         | 
| 926 | 
            +
                              <i>Dasein</i>
         | 
| 927 | 
            +
                               , see
         | 
| 928 | 
            +
                              <i>Eman</i>
         | 
| 929 | 
            +
                               cipation, être
         | 
| 930 | 
            +
                            </li>
         | 
| 931 | 
            +
                            <li>
         | 
| 932 | 
            +
                               élongé,
         | 
| 933 | 
            +
                              <a href='#_'>Clause 1</a>
         | 
| 934 | 
            +
                            </li>
         | 
| 935 | 
            +
                            <li>
         | 
| 936 | 
            +
                              <i>Eman</i>
         | 
| 937 | 
            +
                               cipation,
         | 
| 938 | 
            +
                              <a href='#_'>Clause 1</a>
         | 
| 939 | 
            +
                               ,
         | 
| 940 | 
            +
                              <a href='#_'>1.1</a>
         | 
| 941 | 
            +
                              <ul>
         | 
| 942 | 
            +
                                <li>
         | 
| 943 | 
            +
                                   dans la France,
         | 
| 944 | 
            +
                                  <a href='#_'>Clause 1</a>
         | 
| 945 | 
            +
                                  <ul>
         | 
| 946 | 
            +
                                    <li>
         | 
| 947 | 
            +
                                       à Paris,
         | 
| 948 | 
            +
                                      <a href='#_'>1.1</a>
         | 
| 949 | 
            +
                                    </li>
         | 
| 950 | 
            +
                                    <li>
         | 
| 951 | 
            +
                                       en Bretagne,
         | 
| 952 | 
            +
                                      <a href='#_'>Clause 1</a>
         | 
| 953 | 
            +
                                    </li>
         | 
| 954 | 
            +
                                  </ul>
         | 
| 955 | 
            +
                                </li>
         | 
| 956 | 
            +
                                <li>
         | 
| 957 | 
            +
                                   dans les États-Unis,
         | 
| 958 | 
            +
                                  <a href='#_'>1.1</a>
         | 
| 959 | 
            +
                                </li>
         | 
| 960 | 
            +
                              </ul>
         | 
| 961 | 
            +
                            </li>
         | 
| 962 | 
            +
                            <li>
         | 
| 963 | 
            +
                               être
         | 
| 964 | 
            +
                              <ul>
         | 
| 965 | 
            +
                                <li>
         | 
| 966 | 
            +
                                   Husserl, see zebra, see also
         | 
| 967 | 
            +
                                  <i>Eman</i>
         | 
| 968 | 
            +
                                   cipation, zebra
         | 
| 969 | 
            +
                                  <ul>
         | 
| 970 | 
            +
                                    <li>
         | 
| 971 | 
            +
                                       en allemand,
         | 
| 972 | 
            +
                                      <a href='#_'>Clause 1</a>
         | 
| 973 | 
            +
                                    </li>
         | 
| 974 | 
            +
                                  </ul>
         | 
| 975 | 
            +
                                </li>
         | 
| 976 | 
            +
                              </ul>
         | 
| 977 | 
            +
                            </li>
         | 
| 978 | 
            +
                            <li>
         | 
| 979 | 
            +
                               zebra,
         | 
| 980 | 
            +
                              <a href='#_'>1.1</a>
         | 
| 981 | 
            +
                            </li>
         | 
| 982 | 
            +
                          </ul>
         | 
| 983 | 
            +
                        </div>
         | 
| 984 | 
            +
                      </div>
         | 
| 985 | 
            +
                    </body>
         | 
| 986 | 
            +
                  </html>
         | 
| 871 987 | 
             
                OUTPUT
         | 
| 872 | 
            -
                expect(xmlpp(strip_guid(IsoDoc::Iso::PresentationXMLConvert.new({}) | 
| 873 | 
            -
                  . | 
| 988 | 
            +
                expect(xmlpp(strip_guid(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 989 | 
            +
                  .convert("test", input, true)
         | 
| 990 | 
            +
                  .gsub(%r{<localized-strings>.*</localized-strings>}m, ""))))
         | 
| 991 | 
            +
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 874 992 | 
             
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 875 993 | 
             
                  .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
         | 
| 876 994 | 
             
              end
         |