metanorma-iso 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/header-dis.html +111 -29
- data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
- data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
- data/lib/isodoc/iso/html/style-human.css +7 -2
- data/lib/isodoc/iso/html/style-human.scss +0 -1
- data/lib/isodoc/iso/html/style-iso.css +7 -2
- data/lib/isodoc/iso/html/style-iso.scss +0 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
- data/lib/isodoc/iso/html/wordstyle.css +150 -0
- data/lib/isodoc/iso/html/wordstyle.scss +144 -0
- data/lib/isodoc/iso/i18n-en.yaml +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
- data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
- data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/word_convert.rb +6 -4
- data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
- data/lib/isodoc/iso/word_dis_convert.rb +5 -2
- data/lib/metanorma/iso/base.rb +2 -1
- data/lib/metanorma/iso/biblio.rng +5 -0
- data/lib/metanorma/iso/isodoc.rng +47 -13
- data/lib/metanorma/iso/validate.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +5 -2
- metadata +4 -87
- data/.github/workflows/automerge.yml +0 -31
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/ubuntu.yml +0 -41
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.css +0 -2
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -2
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -71
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -45
- data/spec/examples/iso_123_all_parts.xml +0 -45
- data/spec/examples/iso_123_no_year_note.xml +0 -46
- data/spec/examples/iso_124_.xml +0 -41
- data/spec/examples/iso_216_.xml +0 -47
- data/spec/examples/iso_iec_12382_.xml +0 -48
- data/spec/examples/rice.adoc +0 -714
- data/spec/examples/rice.preview.html +0 -1870
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
- data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/ISO_1213_1.png +0 -0
- data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/amd_spec.rb +0 -986
- data/spec/isodoc/blocks_spec.rb +0 -1174
- data/spec/isodoc/i18n_spec.rb +0 -1579
- data/spec/isodoc/inline_spec.rb +0 -1060
- data/spec/isodoc/iso_spec.rb +0 -255
- data/spec/isodoc/metadata_spec.rb +0 -701
- data/spec/isodoc/postproc_spec.rb +0 -1089
- data/spec/isodoc/ref_spec.rb +0 -439
- data/spec/isodoc/section_spec.rb +0 -998
- data/spec/isodoc/table_spec.rb +0 -420
- data/spec/isodoc/terms_spec.rb +0 -314
- data/spec/isodoc/word_dis_spec.rb +0 -2064
- data/spec/isodoc/xref_spec.rb +0 -1747
- data/spec/metanorma/amd_spec.rb +0 -724
- data/spec/metanorma/base_spec.rb +0 -1384
- data/spec/metanorma/blank_spec.rb +0 -38
- data/spec/metanorma/blocks_spec.rb +0 -624
- data/spec/metanorma/cleanup_spec.rb +0 -1645
- data/spec/metanorma/inline_spec.rb +0 -203
- data/spec/metanorma/lists_spec.rb +0 -197
- data/spec/metanorma/macros_spec.rb +0 -99
- data/spec/metanorma/processor_spec.rb +0 -161
- data/spec/metanorma/refs_spec.rb +0 -672
- data/spec/metanorma/section_spec.rb +0 -492
- data/spec/metanorma/table_spec.rb +0 -329
- data/spec/metanorma/validate_spec.rb +0 -2153
- data/spec/relaton/render_spec.rb +0 -568
- data/spec/requirements/requirement_components_spec.rb +0 -610
- data/spec/requirements/requirements_spec.rb +0 -1596
- data/spec/requirements/xref_spec.rb +0 -1211
- data/spec/spec_helper.rb +0 -313
- data/spec/vcr_cassettes/docrels.yml +0 -385
- data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
    
        data/spec/isodoc/blocks_spec.rb
    DELETED
    
    | @@ -1,1174 +0,0 @@ | |
| 1 | 
            -
            require "spec_helper"
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            RSpec.describe IsoDoc do
         | 
| 4 | 
            -
              it "processes examples" do
         | 
| 5 | 
            -
                input = <<~INPUT
         | 
| 6 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 7 | 
            -
                    <preface>
         | 
| 8 | 
            -
                      <foreword>
         | 
| 9 | 
            -
                        <example id="samplecode">
         | 
| 10 | 
            -
                          <name>Title</name>
         | 
| 11 | 
            -
                          <p>Hello</p>
         | 
| 12 | 
            -
                        </example>
         | 
| 13 | 
            -
                      </foreword>
         | 
| 14 | 
            -
                    </preface>
         | 
| 15 | 
            -
                  </iso-standard>
         | 
| 16 | 
            -
                INPUT
         | 
| 17 | 
            -
                presxml = <<~OUTPUT
         | 
| 18 | 
            -
                  <?xml version='1.0'?>
         | 
| 19 | 
            -
                  <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
         | 
| 20 | 
            -
                    <preface>
         | 
| 21 | 
            -
                      <foreword displayorder="1">
         | 
| 22 | 
            -
                        <example id="samplecode">
         | 
| 23 | 
            -
                          <name>EXAMPLE — Title</name>
         | 
| 24 | 
            -
                          <p>Hello</p>
         | 
| 25 | 
            -
                        </example>
         | 
| 26 | 
            -
                      </foreword>
         | 
| 27 | 
            -
                    </preface>
         | 
| 28 | 
            -
                  </iso-standard>
         | 
| 29 | 
            -
                OUTPUT
         | 
| 30 | 
            -
             | 
| 31 | 
            -
                html = <<~OUTPUT
         | 
| 32 | 
            -
                  #{HTML_HDR}
         | 
| 33 | 
            -
                        <br/>
         | 
| 34 | 
            -
                        <div>
         | 
| 35 | 
            -
                          <h1 class="ForewordTitle">Foreword</h1>
         | 
| 36 | 
            -
                          <div id="samplecode" class="example">
         | 
| 37 | 
            -
                            <p><span class="example_label">EXAMPLE — Title</span>  Hello</p>
         | 
| 38 | 
            -
                          </div>
         | 
| 39 | 
            -
                        </div>
         | 
| 40 | 
            -
                        <p class="zzSTDTitle1"/>
         | 
| 41 | 
            -
                      </div>
         | 
| 42 | 
            -
                    </body>
         | 
| 43 | 
            -
                  </html>
         | 
| 44 | 
            -
                OUTPUT
         | 
| 45 | 
            -
             | 
| 46 | 
            -
                word = <<~OUTPUT
         | 
| 47 | 
            -
                      <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 48 | 
            -
                    <div class="WordSection1">
         | 
| 49 | 
            -
                      <p> </p>
         | 
| 50 | 
            -
                    </div>
         | 
| 51 | 
            -
                    <p>
         | 
| 52 | 
            -
                      <br clear="all" class="section"/>
         | 
| 53 | 
            -
                    </p>
         | 
| 54 | 
            -
                    <div class="WordSection2">
         | 
| 55 | 
            -
                      <p>
         | 
| 56 | 
            -
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 57 | 
            -
                      </p>
         | 
| 58 | 
            -
                      <div>
         | 
| 59 | 
            -
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 60 | 
            -
                        <div id="samplecode" class="example">
         | 
| 61 | 
            -
                          <p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 62 | 
            -
                        </div>
         | 
| 63 | 
            -
                      </div>
         | 
| 64 | 
            -
                      <p> </p>
         | 
| 65 | 
            -
                    </div>
         | 
| 66 | 
            -
                    <p>
         | 
| 67 | 
            -
                      <br clear="all" class="section"/>
         | 
| 68 | 
            -
                    </p>
         | 
| 69 | 
            -
                    <div class="WordSection3">
         | 
| 70 | 
            -
                      <p class="zzSTDTitle1"/>
         | 
| 71 | 
            -
                    </div>
         | 
| 72 | 
            -
                    <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         | 
| 73 | 
            -
                    <div class="colophon"/>
         | 
| 74 | 
            -
                  </body>
         | 
| 75 | 
            -
                OUTPUT
         | 
| 76 | 
            -
                expect(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 77 | 
            -
                  .convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
         | 
| 78 | 
            -
                expect(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 79 | 
            -
                  .convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
         | 
| 80 | 
            -
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
         | 
| 81 | 
            -
                expect(xmlpp(output
         | 
| 82 | 
            -
                  .sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 83 | 
            -
                  .to be_equivalent_to xmlpp(word)
         | 
| 84 | 
            -
              end
         | 
| 85 | 
            -
             | 
| 86 | 
            -
              it "processes sequences of examples" do
         | 
| 87 | 
            -
                input = <<~INPUT
         | 
| 88 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 89 | 
            -
                    <preface>
         | 
| 90 | 
            -
                      <foreword>
         | 
| 91 | 
            -
                        <example id="samplecode">
         | 
| 92 | 
            -
                          <quote>Hello</quote>
         | 
| 93 | 
            -
                        </example>
         | 
| 94 | 
            -
                        <example id="samplecode2">
         | 
| 95 | 
            -
                          <name>Title</name>
         | 
| 96 | 
            -
                          <p>Hello</p>
         | 
| 97 | 
            -
                        </example>
         | 
| 98 | 
            -
                      </foreword>
         | 
| 99 | 
            -
                    </preface>
         | 
| 100 | 
            -
                  </iso-standard>
         | 
| 101 | 
            -
                INPUT
         | 
| 102 | 
            -
                presxml = <<~OUTPUT
         | 
| 103 | 
            -
                  <?xml version='1.0'?>
         | 
| 104 | 
            -
                  <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
         | 
| 105 | 
            -
                    <preface>
         | 
| 106 | 
            -
                      <foreword displayorder="1">
         | 
| 107 | 
            -
                        <example id="samplecode">
         | 
| 108 | 
            -
                          <name>EXAMPLE 1</name>
         | 
| 109 | 
            -
                          <quote>Hello</quote>
         | 
| 110 | 
            -
                        </example>
         | 
| 111 | 
            -
                        <example id="samplecode2">
         | 
| 112 | 
            -
                          <name>EXAMPLE 2 — Title</name>
         | 
| 113 | 
            -
                          <p>Hello</p>
         | 
| 114 | 
            -
                        </example>
         | 
| 115 | 
            -
                      </foreword>
         | 
| 116 | 
            -
                    </preface>
         | 
| 117 | 
            -
                  </iso-standard>
         | 
| 118 | 
            -
                OUTPUT
         | 
| 119 | 
            -
                html = <<~OUTPUT
         | 
| 120 | 
            -
                  #{HTML_HDR}
         | 
| 121 | 
            -
                        <br/>
         | 
| 122 | 
            -
                        <div>
         | 
| 123 | 
            -
                          <h1 class="ForewordTitle">Foreword</h1>
         | 
| 124 | 
            -
                          <div id="samplecode" class="example">
         | 
| 125 | 
            -
                            <p><span class="example_label">EXAMPLE  1</span>  </p>
         | 
| 126 | 
            -
                             <div class="Quote">Hello</div>
         | 
| 127 | 
            -
                          </div>
         | 
| 128 | 
            -
                          <div id="samplecode2" class="example">
         | 
| 129 | 
            -
                            <p><span class="example_label">EXAMPLE  2 — Title</span>  Hello</p>
         | 
| 130 | 
            -
                          </div>
         | 
| 131 | 
            -
                        </div>
         | 
| 132 | 
            -
                        <p class="zzSTDTitle1"/>
         | 
| 133 | 
            -
                      </div>
         | 
| 134 | 
            -
                    </body>
         | 
| 135 | 
            -
                  </html>
         | 
| 136 | 
            -
                OUTPUT
         | 
| 137 | 
            -
                word = <<~OUTPUT
         | 
| 138 | 
            -
                      <body lang="EN-US" link="blue" vlink="#954F72">
         | 
| 139 | 
            -
                    <div class="WordSection1">
         | 
| 140 | 
            -
                      <p> </p>
         | 
| 141 | 
            -
                    </div>
         | 
| 142 | 
            -
                    <p>
         | 
| 143 | 
            -
                      <br clear="all" class="section"/>
         | 
| 144 | 
            -
                    </p>
         | 
| 145 | 
            -
                    <div class="WordSection2">
         | 
| 146 | 
            -
                      <p>
         | 
| 147 | 
            -
                        <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         | 
| 148 | 
            -
                      </p>
         | 
| 149 | 
            -
                      <div>
         | 
| 150 | 
            -
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 151 | 
            -
                        <div id="samplecode" class="example">
         | 
| 152 | 
            -
                          <p><span class="example_label">EXAMPLE  1</span><span style="mso-tab-count:1">  </span></p>
         | 
| 153 | 
            -
                          <div class="Quote">Hello</div>
         | 
| 154 | 
            -
                        </div>
         | 
| 155 | 
            -
                        <div id="samplecode2" class="example">
         | 
| 156 | 
            -
                          <p><span class="example_label">EXAMPLE  2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
         | 
| 157 | 
            -
                        </div>
         | 
| 158 | 
            -
                      </div>
         | 
| 159 | 
            -
                      <p> </p>
         | 
| 160 | 
            -
                    </div>
         | 
| 161 | 
            -
                    <p>
         | 
| 162 | 
            -
                      <br clear="all" class="section"/>
         | 
| 163 | 
            -
                    </p>
         | 
| 164 | 
            -
                    <div class="WordSection3">
         | 
| 165 | 
            -
                      <p class="zzSTDTitle1"/>
         | 
| 166 | 
            -
                    </div>
         | 
| 167 | 
            -
                    <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         | 
| 168 | 
            -
                    <div class="colophon"/>
         | 
| 169 | 
            -
                  </body>
         | 
| 170 | 
            -
                OUTPUT
         | 
| 171 | 
            -
                expect(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 172 | 
            -
                  .convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
         | 
| 173 | 
            -
                expect(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 174 | 
            -
                  .convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
         | 
| 175 | 
            -
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
         | 
| 176 | 
            -
                expect(xmlpp(output
         | 
| 177 | 
            -
                  .sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
         | 
| 178 | 
            -
                  .to be_equivalent_to xmlpp(word)
         | 
| 179 | 
            -
              end
         | 
| 180 | 
            -
             | 
| 181 | 
            -
              it "processes admonitions" do
         | 
| 182 | 
            -
                input = <<~INPUT
         | 
| 183 | 
            -
                      <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 184 | 
            -
                      <preface><foreword>
         | 
| 185 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
         | 
| 186 | 
            -
                      <name>CAUTION</name>
         | 
| 187 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 188 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
         | 
| 189 | 
            -
                  </admonition>
         | 
| 190 | 
            -
                      </foreword></preface>
         | 
| 191 | 
            -
                      </iso-standard>
         | 
| 192 | 
            -
                INPUT
         | 
| 193 | 
            -
                presxml = <<~INPUT
         | 
| 194 | 
            -
                      <iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
         | 
| 195 | 
            -
                      <preface><foreword displayorder="1">
         | 
| 196 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
         | 
| 197 | 
            -
                                     <p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>
         | 
| 198 | 
            -
                             CAUTION — Only use paddy or parboiled rice for the
         | 
| 199 | 
            -
                             determination of husked rice yield.
         | 
| 200 | 
            -
                           </p>
         | 
| 201 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
         | 
| 202 | 
            -
                  </admonition>
         | 
| 203 | 
            -
                      </foreword></preface>
         | 
| 204 | 
            -
                      </iso-standard>
         | 
| 205 | 
            -
                INPUT
         | 
| 206 | 
            -
                output = <<~OUTPUT
         | 
| 207 | 
            -
                  #{HTML_HDR}
         | 
| 208 | 
            -
                               <br/>
         | 
| 209 | 
            -
                         <div>
         | 
| 210 | 
            -
                           <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 211 | 
            -
                           <div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
         | 
| 212 | 
            -
                             <p>
         | 
| 213 | 
            -
                                CAUTION — Only use paddy or parboiled rice for the
         | 
| 214 | 
            -
                               determination of husked rice yield.
         | 
| 215 | 
            -
                             </p>
         | 
| 216 | 
            -
                             <p id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
         | 
| 217 | 
            -
                           </div>
         | 
| 218 | 
            -
                         </div>
         | 
| 219 | 
            -
                         <p class='zzSTDTitle1'/>
         | 
| 220 | 
            -
                       </div>
         | 
| 221 | 
            -
                     </body>
         | 
| 222 | 
            -
                   </html>
         | 
| 223 | 
            -
                OUTPUT
         | 
| 224 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 225 | 
            -
                  .convert("test", input, true)))
         | 
| 226 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 227 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 228 | 
            -
                  .convert("test", presxml, true)))
         | 
| 229 | 
            -
                  .to be_equivalent_to xmlpp(output)
         | 
| 230 | 
            -
              end
         | 
| 231 | 
            -
             | 
| 232 | 
            -
              it "processes admonitions with titles" do
         | 
| 233 | 
            -
                input = <<~INPUT
         | 
| 234 | 
            -
                      <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 235 | 
            -
                      <preface><foreword>
         | 
| 236 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
         | 
| 237 | 
            -
                      <name>Title</name>
         | 
| 238 | 
            -
                      <ul>
         | 
| 239 | 
            -
                      <li>List</li>
         | 
| 240 | 
            -
                      </ul>
         | 
| 241 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 242 | 
            -
                  </admonition>
         | 
| 243 | 
            -
                      </foreword></preface>
         | 
| 244 | 
            -
                      </iso-standard>
         | 
| 245 | 
            -
                INPUT
         | 
| 246 | 
            -
                presxml = <<~INPUT
         | 
| 247 | 
            -
                      <iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
         | 
| 248 | 
            -
                      <preface><foreword displayorder="1">
         | 
| 249 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
         | 
| 250 | 
            -
                      <name>Title</name>
         | 
| 251 | 
            -
                      <ul>
         | 
| 252 | 
            -
                      <li>List</li>
         | 
| 253 | 
            -
                      </ul>
         | 
| 254 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 255 | 
            -
                  </admonition>
         | 
| 256 | 
            -
                      </foreword></preface>
         | 
| 257 | 
            -
                      </iso-standard>
         | 
| 258 | 
            -
                INPUT
         | 
| 259 | 
            -
                output = <<~OUTPUT
         | 
| 260 | 
            -
                  #{HTML_HDR}
         | 
| 261 | 
            -
                                <br/>
         | 
| 262 | 
            -
                         <div>
         | 
| 263 | 
            -
                           <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 264 | 
            -
                           <div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
         | 
| 265 | 
            -
                                    <p>Title — </p>
         | 
| 266 | 
            -
                     <ul>
         | 
| 267 | 
            -
                       <li>List</li>
         | 
| 268 | 
            -
                     </ul>
         | 
| 269 | 
            -
                     <p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 270 | 
            -
                           </div>
         | 
| 271 | 
            -
                         </div>
         | 
| 272 | 
            -
                         <p class='zzSTDTitle1'/>
         | 
| 273 | 
            -
                       </div>
         | 
| 274 | 
            -
                     </body>
         | 
| 275 | 
            -
                   </html>
         | 
| 276 | 
            -
                OUTPUT
         | 
| 277 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 278 | 
            -
                  .convert("test", input, true)))
         | 
| 279 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 280 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 281 | 
            -
                  .convert("test", input, true)))
         | 
| 282 | 
            -
                  .to be_equivalent_to xmlpp(output)
         | 
| 283 | 
            -
              end
         | 
| 284 | 
            -
             | 
| 285 | 
            -
              it "processes editorial notes" do
         | 
| 286 | 
            -
                input = <<~INPUT
         | 
| 287 | 
            -
                   <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 288 | 
            -
                      <preface><foreword>
         | 
| 289 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="editorial">
         | 
| 290 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
         | 
| 291 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
         | 
| 292 | 
            -
                  </admonition>
         | 
| 293 | 
            -
                      </foreword></preface>
         | 
| 294 | 
            -
                      </iso-standard>
         | 
| 295 | 
            -
                INPUT
         | 
| 296 | 
            -
                presxml = <<~INPUT
         | 
| 297 | 
            -
                      <iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
         | 
| 298 | 
            -
                      <preface><foreword displayorder="1">
         | 
| 299 | 
            -
                      <admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="editorial">
         | 
| 300 | 
            -
                                     <p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>EDITORIAL NOTE — 
         | 
| 301 | 
            -
                             Only use paddy or parboiled rice for the
         | 
| 302 | 
            -
                             determination of husked rice yield.
         | 
| 303 | 
            -
                           </p>
         | 
| 304 | 
            -
                    <p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
         | 
| 305 | 
            -
                  </admonition>
         | 
| 306 | 
            -
                      </foreword></preface>
         | 
| 307 | 
            -
                      </iso-standard>
         | 
| 308 | 
            -
                INPUT
         | 
| 309 | 
            -
                html = <<~OUTPUT
         | 
| 310 | 
            -
                  #{HTML_HDR}
         | 
| 311 | 
            -
                               <br/>
         | 
| 312 | 
            -
                         <div>
         | 
| 313 | 
            -
                           <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 314 | 
            -
                           <div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='zzHelp'>
         | 
| 315 | 
            -
                             <p>EDITORIAL NOTE — 
         | 
| 316 | 
            -
                                Only use paddy or parboiled rice for the
         | 
| 317 | 
            -
                               determination of husked rice yield.
         | 
| 318 | 
            -
                             </p>
         | 
| 319 | 
            -
                             <p id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
         | 
| 320 | 
            -
                           </div>
         | 
| 321 | 
            -
                         </div>
         | 
| 322 | 
            -
                         <p class='zzSTDTitle1'/>
         | 
| 323 | 
            -
                       </div>
         | 
| 324 | 
            -
                     </body>
         | 
| 325 | 
            -
                   </html>
         | 
| 326 | 
            -
                OUTPUT
         | 
| 327 | 
            -
                word = <<~OUTPUT
         | 
| 328 | 
            -
                    <div class='WordSection2'>
         | 
| 329 | 
            -
                  <p>
         | 
| 330 | 
            -
                    <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
         | 
| 331 | 
            -
                  </p>
         | 
| 332 | 
            -
                  <div>
         | 
| 333 | 
            -
                    <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 334 | 
            -
                    <div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='zzHelp'>
         | 
| 335 | 
            -
                      <p>EDITORIAL NOTE — Only use paddy or parboiled rice for the determination of husked rice yield. </p>
         | 
| 336 | 
            -
                      <p class='ForewordText' id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
         | 
| 337 | 
            -
                    </div>
         | 
| 338 | 
            -
                  </div>
         | 
| 339 | 
            -
                  <p> </p>
         | 
| 340 | 
            -
                  </div>
         | 
| 341 | 
            -
                OUTPUT
         | 
| 342 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 343 | 
            -
                  .convert("test", input, true)))
         | 
| 344 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 345 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 346 | 
            -
                  .convert("test", presxml, true)))
         | 
| 347 | 
            -
                  .to be_equivalent_to xmlpp(html)
         | 
| 348 | 
            -
                expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::WordConvert.new({})
         | 
| 349 | 
            -
                  .convert("test", presxml, true))
         | 
| 350 | 
            -
                  .at("//div[@class = 'WordSection2']").to_xml))
         | 
| 351 | 
            -
                  .to be_equivalent_to xmlpp(word)
         | 
| 352 | 
            -
              end
         | 
| 353 | 
            -
             | 
| 354 | 
            -
              it "renders figures" do
         | 
| 355 | 
            -
                input = <<~INPUT
         | 
| 356 | 
            -
                  <iso-standard xmlns='http://riboseinc.com/isoxml'>
         | 
| 357 | 
            -
                    <preface>
         | 
| 358 | 
            -
                      <foreword id='fwd'>
         | 
| 359 | 
            -
                        <p>
         | 
| 360 | 
            -
                        </p>
         | 
| 361 | 
            -
                      </foreword>
         | 
| 362 | 
            -
                    </preface>
         | 
| 363 | 
            -
                    <sections>
         | 
| 364 | 
            -
                      <clause id='scope' type="scope">
         | 
| 365 | 
            -
                        <title>Scope</title>
         | 
| 366 | 
            -
                        <figure id='N'>
         | 
| 367 | 
            -
                          <name>Figure 1 — Split-it-right sample divider</name>
         | 
| 368 | 
            -
                          <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 369 | 
            -
                        </figure>
         | 
| 370 | 
            -
                        <p>
         | 
| 371 | 
            -
                        </p>
         | 
| 372 | 
            -
                      </clause>
         | 
| 373 | 
            -
                      <terms id='terms'/>
         | 
| 374 | 
            -
                      <clause id='widgets'>
         | 
| 375 | 
            -
                        <title>Widgets</title>
         | 
| 376 | 
            -
                        <clause id='widgets1'>
         | 
| 377 | 
            -
                          <figure id='note1'>
         | 
| 378 | 
            -
                            <name>Figure 2 — Split-it-right sample divider</name>
         | 
| 379 | 
            -
                            <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 380 | 
            -
                          </figure>
         | 
| 381 | 
            -
                          <figure id='note2'>
         | 
| 382 | 
            -
                            <name>Figure 3 — Split-it-right sample divider</name>
         | 
| 383 | 
            -
                            <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 384 | 
            -
                          </figure>
         | 
| 385 | 
            -
                          <p>
         | 
| 386 | 
            -
                          </p>
         | 
| 387 | 
            -
                        </clause>
         | 
| 388 | 
            -
                      </clause>
         | 
| 389 | 
            -
                    </sections>
         | 
| 390 | 
            -
                    <annex id='annex1'>
         | 
| 391 | 
            -
                      <clause id='annex1a'>
         | 
| 392 | 
            -
                        <figure id='AN'>
         | 
| 393 | 
            -
                          <name>Figure A.1 — Split-it-right sample divider</name>
         | 
| 394 | 
            -
                          <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 395 | 
            -
                        </figure>
         | 
| 396 | 
            -
                      </clause>
         | 
| 397 | 
            -
                      <clause id='annex1b'>
         | 
| 398 | 
            -
                        <figure id='Anote1'>
         | 
| 399 | 
            -
                          <name>Figure A.2 — Split-it-right sample divider</name>
         | 
| 400 | 
            -
                          <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 401 | 
            -
                        </figure>
         | 
| 402 | 
            -
                        <figure id='Anote2'>
         | 
| 403 | 
            -
                          <name>Figure A.3 — Split-it-right sample divider</name>
         | 
| 404 | 
            -
                          <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 405 | 
            -
                        </figure>
         | 
| 406 | 
            -
                      </clause>
         | 
| 407 | 
            -
                    </annex>
         | 
| 408 | 
            -
                  </iso-standard>
         | 
| 409 | 
            -
                INPUT
         | 
| 410 | 
            -
                html = <<~OUTPUT
         | 
| 411 | 
            -
                  #{HTML_HDR}
         | 
| 412 | 
            -
                      <br/>
         | 
| 413 | 
            -
                      <div id="fwd">
         | 
| 414 | 
            -
                        <h1 class="ForewordTitle">Foreword</h1>
         | 
| 415 | 
            -
                        <p>
         | 
| 416 | 
            -
                        </p>
         | 
| 417 | 
            -
                      </div>
         | 
| 418 | 
            -
                      <p class="zzSTDTitle1"/>
         | 
| 419 | 
            -
                      <div id="scope">
         | 
| 420 | 
            -
                        <h1>Scope</h1>
         | 
| 421 | 
            -
                        <div id="N" class="figure">
         | 
| 422 | 
            -
                          <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 423 | 
            -
                          <p class="FigureTitle" style="text-align:center;">Figure 1 — Split-it-right sample divider</p>
         | 
| 424 | 
            -
                        </div>
         | 
| 425 | 
            -
                        <p>
         | 
| 426 | 
            -
                        </p>
         | 
| 427 | 
            -
                      </div>
         | 
| 428 | 
            -
                      <div id="terms"><h1/></div>
         | 
| 429 | 
            -
                      <div id="widgets">
         | 
| 430 | 
            -
                        <h1>Widgets</h1>
         | 
| 431 | 
            -
                        <div id="widgets1">
         | 
| 432 | 
            -
                          <div id="note1" class="figure">
         | 
| 433 | 
            -
                            <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 434 | 
            -
                            <p class="FigureTitle" style="text-align:center;">Figure 2 — Split-it-right sample divider</p>
         | 
| 435 | 
            -
                          </div>
         | 
| 436 | 
            -
                          <div id="note2" class="figure">
         | 
| 437 | 
            -
                            <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 438 | 
            -
                            <p class="FigureTitle" style="text-align:center;">Figure 3 — Split-it-right sample divider</p>
         | 
| 439 | 
            -
                          </div>
         | 
| 440 | 
            -
                          <p>   </p>
         | 
| 441 | 
            -
                        </div>
         | 
| 442 | 
            -
                      </div>
         | 
| 443 | 
            -
                      <br/>
         | 
| 444 | 
            -
                      <div id="annex1" class="Section3">
         | 
| 445 | 
            -
                        <div id="annex1a">
         | 
| 446 | 
            -
                          <div id="AN" class="figure">
         | 
| 447 | 
            -
                            <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 448 | 
            -
                            <p class="FigureTitle" style="text-align:center;">Figure A.1 — Split-it-right sample divider</p>
         | 
| 449 | 
            -
                          </div>
         | 
| 450 | 
            -
                        </div>
         | 
| 451 | 
            -
                        <div id="annex1b">
         | 
| 452 | 
            -
                          <div id="Anote1" class="figure">
         | 
| 453 | 
            -
                              <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 454 | 
            -
                              <p class="FigureTitle" style="text-align:center;">Figure A.2 — Split-it-right sample divider</p>
         | 
| 455 | 
            -
                            </div>
         | 
| 456 | 
            -
                            <div id="Anote2" class="figure">
         | 
| 457 | 
            -
                              <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
         | 
| 458 | 
            -
                              <p class="FigureTitle" style="text-align:center;">Figure A.3 — Split-it-right sample divider</p>
         | 
| 459 | 
            -
                            </div>
         | 
| 460 | 
            -
                          </div>
         | 
| 461 | 
            -
                        </div>
         | 
| 462 | 
            -
                      </div>
         | 
| 463 | 
            -
                    </body>
         | 
| 464 | 
            -
                  </html>
         | 
| 465 | 
            -
                OUTPUT
         | 
| 466 | 
            -
                word = <<~OUTPUT
         | 
| 467 | 
            -
                  <body lang='EN-US' link='blue' vlink='#954F72'>
         | 
| 468 | 
            -
                    <div class='WordSection1'>
         | 
| 469 | 
            -
                      <p> </p>
         | 
| 470 | 
            -
                    </div>
         | 
| 471 | 
            -
                    <p>
         | 
| 472 | 
            -
                      <br clear='all' class='section'/>
         | 
| 473 | 
            -
                    </p>
         | 
| 474 | 
            -
                    <div class='WordSection2'>
         | 
| 475 | 
            -
                      <p>
         | 
| 476 | 
            -
                        <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
         | 
| 477 | 
            -
                      </p>
         | 
| 478 | 
            -
                      <div id='fwd'>
         | 
| 479 | 
            -
                        <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 480 | 
            -
                        <p class='ForewordText'> </p>
         | 
| 481 | 
            -
                      </div>
         | 
| 482 | 
            -
                      <p> </p>
         | 
| 483 | 
            -
                    </div>
         | 
| 484 | 
            -
                    <p>
         | 
| 485 | 
            -
                      <br clear='all' class='section'/>
         | 
| 486 | 
            -
                    </p>
         | 
| 487 | 
            -
                    <div class='WordSection3'>
         | 
| 488 | 
            -
                      <p class='zzSTDTitle1'/>
         | 
| 489 | 
            -
                      <div id='scope'>
         | 
| 490 | 
            -
                        <h1>Scope</h1>
         | 
| 491 | 
            -
                        <div id='N' class='figure'>
         | 
| 492 | 
            -
                          <img src='rice_images/rice_image1.png'/>
         | 
| 493 | 
            -
                          <p class='FigureTitle' style='text-align:center;'>Figure 1 — Split-it-right sample divider</p>
         | 
| 494 | 
            -
                        </div>
         | 
| 495 | 
            -
                        <p> </p>
         | 
| 496 | 
            -
                      </div>
         | 
| 497 | 
            -
                      <div id='terms'>
         | 
| 498 | 
            -
                        <h1/>
         | 
| 499 | 
            -
                      </div>
         | 
| 500 | 
            -
                      <div id='widgets'>
         | 
| 501 | 
            -
                        <h1>Widgets</h1>
         | 
| 502 | 
            -
                        <div id='widgets1'>
         | 
| 503 | 
            -
                          <div id='note1' class='figure'>
         | 
| 504 | 
            -
                            <img src='rice_images/rice_image1.png'/>
         | 
| 505 | 
            -
                            <p class='FigureTitle' style='text-align:center;'>Figure 2 — Split-it-right sample divider</p>
         | 
| 506 | 
            -
                          </div>
         | 
| 507 | 
            -
                          <div id='note2' class='figure'>
         | 
| 508 | 
            -
                            <img src='rice_images/rice_image1.png'/>
         | 
| 509 | 
            -
                            <p class='FigureTitle' style='text-align:center;'>Figure 3 — Split-it-right sample divider</p>
         | 
| 510 | 
            -
                          </div>
         | 
| 511 | 
            -
                          <p> </p>
         | 
| 512 | 
            -
                        </div>
         | 
| 513 | 
            -
                      </div>
         | 
| 514 | 
            -
                      <p>
         | 
| 515 | 
            -
                        <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
         | 
| 516 | 
            -
                      </p>
         | 
| 517 | 
            -
                      <div id='annex1' class='Section3'>
         | 
| 518 | 
            -
                        <div id='annex1a'>
         | 
| 519 | 
            -
                          <div id='AN' class='figure'>
         | 
| 520 | 
            -
                            <img src='rice_images/rice_image1.png'/>
         | 
| 521 | 
            -
                            <p class='AnnexFigureTitle' style='text-align:center;'>Figure A.1 — Split-it-right sample divider</p>
         | 
| 522 | 
            -
                          </div>
         | 
| 523 | 
            -
                        </div>
         | 
| 524 | 
            -
                        <div id='annex1b'>
         | 
| 525 | 
            -
                          <div id='Anote1' class='figure'>
         | 
| 526 | 
            -
                            <img src='rice_images/rice_image1.png'/>
         | 
| 527 | 
            -
                            <p class='AnnexFigureTitle' style='text-align:center;'>Figure A.2 — Split-it-right sample divider</p>
         | 
| 528 | 
            -
                          </div>
         | 
| 529 | 
            -
                          <div id='Anote2' class='figure'>
         | 
| 530 | 
            -
                            <img src='rice_images/rice_image1.png'/>
         | 
| 531 | 
            -
                            <p class='AnnexFigureTitle' style='text-align:center;'>Figure A.3 — Split-it-right sample divider</p>
         | 
| 532 | 
            -
                          </div>
         | 
| 533 | 
            -
                        </div>
         | 
| 534 | 
            -
                      </div>
         | 
| 535 | 
            -
                    </div>
         | 
| 536 | 
            -
                    <br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
         | 
| 537 | 
            -
                    <div class='colophon'/>
         | 
| 538 | 
            -
                  </body>
         | 
| 539 | 
            -
                OUTPUT
         | 
| 540 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", input, true)
         | 
| 541 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(html)
         | 
| 542 | 
            -
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", input, true)
         | 
| 543 | 
            -
                expect(xmlpp(Nokogiri::XML(output).at("//body").to_xml))
         | 
| 544 | 
            -
                  .to be_equivalent_to xmlpp(word)
         | 
| 545 | 
            -
              end
         | 
| 546 | 
            -
             | 
| 547 | 
            -
              it "renders subfigures (HTML)" do
         | 
| 548 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({})
         | 
| 549 | 
            -
                  .convert("test", <<~"INPUT", true)
         | 
| 550 | 
            -
                    <iso-standard xmlns='http://riboseinc.com/isoxml'>
         | 
| 551 | 
            -
                      <preface>
         | 
| 552 | 
            -
                        <foreword id='fwd'>
         | 
| 553 | 
            -
                          <p>
         | 
| 554 | 
            -
                            <xref target='N'/>
         | 
| 555 | 
            -
                            <xref target='note1'/>
         | 
| 556 | 
            -
                            <xref target='note2'/>
         | 
| 557 | 
            -
                            <xref target='AN'/>
         | 
| 558 | 
            -
                            <xref target='Anote1'/>
         | 
| 559 | 
            -
                            <xref target='Anote2'/>
         | 
| 560 | 
            -
                          </p>
         | 
| 561 | 
            -
                        </foreword>
         | 
| 562 | 
            -
                      </preface>
         | 
| 563 | 
            -
                      <sections>
         | 
| 564 | 
            -
                        <clause id='scope' type="scope">
         | 
| 565 | 
            -
                          <title>Scope</title>
         | 
| 566 | 
            -
                        </clause>
         | 
| 567 | 
            -
                        <terms id='terms'/>
         | 
| 568 | 
            -
                        <clause id='widgets'>
         | 
| 569 | 
            -
                          <title>Widgets</title>
         | 
| 570 | 
            -
                          <clause id='widgets1'>
         | 
| 571 | 
            -
                            <figure id='N'>
         | 
| 572 | 
            -
                              <name>Figure 1</name>
         | 
| 573 | 
            -
                              <figure id='note1'>
         | 
| 574 | 
            -
                                <name>a) — Split-it-right sample divider</name>
         | 
| 575 | 
            -
                                <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 576 | 
            -
                              </figure>
         | 
| 577 | 
            -
                              <figure id='note2'>
         | 
| 578 | 
            -
                                <name>b) — Split-it-right sample divider</name>
         | 
| 579 | 
            -
                                <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 580 | 
            -
                              </figure>
         | 
| 581 | 
            -
                            </figure>
         | 
| 582 | 
            -
                            <p>
         | 
| 583 | 
            -
                              <xref target='note1'/>
         | 
| 584 | 
            -
                              <xref target='note2'/>
         | 
| 585 | 
            -
                            </p>
         | 
| 586 | 
            -
                          </clause>
         | 
| 587 | 
            -
                        </clause>
         | 
| 588 | 
            -
                      </sections>
         | 
| 589 | 
            -
                      <annex id='annex1'>
         | 
| 590 | 
            -
                        <clause id='annex1a'> </clause>
         | 
| 591 | 
            -
                        <clause id='annex1b'>
         | 
| 592 | 
            -
                          <figure id='AN'>
         | 
| 593 | 
            -
                            <name>Figure A.1</name>
         | 
| 594 | 
            -
                            <figure id='Anote1'>
         | 
| 595 | 
            -
                              <name>a) — Split-it-right sample divider</name>
         | 
| 596 | 
            -
                              <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 597 | 
            -
                            </figure>
         | 
| 598 | 
            -
                            <figure id='Anote2'>
         | 
| 599 | 
            -
                              <name>b) — Split-it-right sample divider</name>
         | 
| 600 | 
            -
                              <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
         | 
| 601 | 
            -
                            </figure>
         | 
| 602 | 
            -
                          </figure>
         | 
| 603 | 
            -
                        </clause>
         | 
| 604 | 
            -
                      </annex>
         | 
| 605 | 
            -
                    </iso-standard>
         | 
| 606 | 
            -
                  INPUT
         | 
| 607 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 608 | 
            -
                  <html lang='en'>
         | 
| 609 | 
            -
                    <head/>
         | 
| 610 | 
            -
                    <body lang='en'>
         | 
| 611 | 
            -
                      <div class='title-section'>
         | 
| 612 | 
            -
                        <p> </p>
         | 
| 613 | 
            -
                      </div>
         | 
| 614 | 
            -
                      <br/>
         | 
| 615 | 
            -
                      <div class='prefatory-section'>
         | 
| 616 | 
            -
                        <p> </p>
         | 
| 617 | 
            -
                      </div>
         | 
| 618 | 
            -
                      <br/>
         | 
| 619 | 
            -
                      <div class='main-section'>
         | 
| 620 | 
            -
                        <br/>
         | 
| 621 | 
            -
                        <div id='fwd'>
         | 
| 622 | 
            -
                          <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 623 | 
            -
                          <p>
         | 
| 624 | 
            -
                            <a href='#N'/>
         | 
| 625 | 
            -
                            <a href='#note1'/>
         | 
| 626 | 
            -
                            <a href='#note2'/>
         | 
| 627 | 
            -
                            <a href='#AN'/>
         | 
| 628 | 
            -
                            <a href='#Anote1'/>
         | 
| 629 | 
            -
                            <a href='#Anote2'/>
         | 
| 630 | 
            -
                          </p>
         | 
| 631 | 
            -
                        </div>
         | 
| 632 | 
            -
                        <p class='zzSTDTitle1'/>
         | 
| 633 | 
            -
                        <div id='scope'>
         | 
| 634 | 
            -
                          <h1>Scope</h1>
         | 
| 635 | 
            -
                        </div>
         | 
| 636 | 
            -
                        <div id='terms'>
         | 
| 637 | 
            -
                          <h1/>
         | 
| 638 | 
            -
                        </div>
         | 
| 639 | 
            -
                        <div id='widgets'>
         | 
| 640 | 
            -
                          <h1>Widgets</h1>
         | 
| 641 | 
            -
                          <div id='widgets1'>
         | 
| 642 | 
            -
                            <div id='N' class='figure'>
         | 
| 643 | 
            -
                              <div id='note1' class='figure'>
         | 
| 644 | 
            -
                                <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
         | 
| 645 | 
            -
                                <p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
         | 
| 646 | 
            -
                              </div>
         | 
| 647 | 
            -
                              <div id='note2' class='figure'>
         | 
| 648 | 
            -
                                <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
         | 
| 649 | 
            -
                                <p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
         | 
| 650 | 
            -
                              </div>
         | 
| 651 | 
            -
                              <p class='FigureTitle' style='text-align:center;'>Figure 1</p>
         | 
| 652 | 
            -
                            </div>
         | 
| 653 | 
            -
                            <p>
         | 
| 654 | 
            -
                              <a href='#note1'/>
         | 
| 655 | 
            -
                              <a href='#note2'/>
         | 
| 656 | 
            -
                            </p>
         | 
| 657 | 
            -
                          </div>
         | 
| 658 | 
            -
                        </div>
         | 
| 659 | 
            -
                        <br/>
         | 
| 660 | 
            -
                        <div id='annex1' class='Section3'>
         | 
| 661 | 
            -
                          <div id='annex1a'>
         | 
| 662 | 
            -
                          </div>
         | 
| 663 | 
            -
                          <div id='annex1b'>
         | 
| 664 | 
            -
                            <div id='AN' class='figure'>
         | 
| 665 | 
            -
                              <div id='Anote1' class='figure'>
         | 
| 666 | 
            -
                                <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
         | 
| 667 | 
            -
                                <p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
         | 
| 668 | 
            -
                              </div>
         | 
| 669 | 
            -
                              <div id='Anote2' class='figure'>
         | 
| 670 | 
            -
                                <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
         | 
| 671 | 
            -
                                <p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
         | 
| 672 | 
            -
                              </div>
         | 
| 673 | 
            -
                              <p class='FigureTitle' style='text-align:center;'>Figure A.1</p>
         | 
| 674 | 
            -
                            </div>
         | 
| 675 | 
            -
                          </div>
         | 
| 676 | 
            -
                        </div>
         | 
| 677 | 
            -
                      </div>
         | 
| 678 | 
            -
                    </body>
         | 
| 679 | 
            -
                  </html>
         | 
| 680 | 
            -
                OUTPUT
         | 
| 681 | 
            -
              end
         | 
| 682 | 
            -
             | 
| 683 | 
            -
              it "processes formulae" do
         | 
| 684 | 
            -
                input = <<~INPUT
         | 
| 685 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 686 | 
            -
                    <preface>
         | 
| 687 | 
            -
                      <foreword>
         | 
| 688 | 
            -
                        <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
         | 
| 689 | 
            -
                          <stem type="AsciiMath">r = 1 %</stem>
         | 
| 690 | 
            -
                          <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
         | 
| 691 | 
            -
                            <dt>
         | 
| 692 | 
            -
                              <stem type="AsciiMath">r</stem>
         | 
| 693 | 
            -
                            </dt>
         | 
| 694 | 
            -
                            <dd>
         | 
| 695 | 
            -
                              <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
         | 
| 696 | 
            -
                            </dd>
         | 
| 697 | 
            -
                            <dt>
         | 
| 698 | 
            -
                              <stem type="AsciiMath">s_1</stem>
         | 
| 699 | 
            -
                            </dt>
         | 
| 700 | 
            -
                            <dd>
         | 
| 701 | 
            -
                              <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
         | 
| 702 | 
            -
                            </dd>
         | 
| 703 | 
            -
                          </dl>
         | 
| 704 | 
            -
                          <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
         | 
| 705 | 
            -
                            <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
         | 
| 706 | 
            -
                          </note>
         | 
| 707 | 
            -
                        </formula>
         | 
| 708 | 
            -
                        <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
         | 
| 709 | 
            -
                          <stem type="AsciiMath">r = 1 %</stem>
         | 
| 710 | 
            -
                        </formula>
         | 
| 711 | 
            -
                      </foreword>
         | 
| 712 | 
            -
                    </preface>
         | 
| 713 | 
            -
                  </iso-standard>
         | 
| 714 | 
            -
                INPUT
         | 
| 715 | 
            -
                presxml = <<~OUTPUT
         | 
| 716 | 
            -
                  <?xml version='1.0'?>
         | 
| 717 | 
            -
                  <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
         | 
| 718 | 
            -
                    <preface>
         | 
| 719 | 
            -
                      <foreword displayorder="1">
         | 
| 720 | 
            -
                        <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
         | 
| 721 | 
            -
                          <stem type="AsciiMath">r = 1 %</stem>
         | 
| 722 | 
            -
                          <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
         | 
| 723 | 
            -
                            <dt>
         | 
| 724 | 
            -
                              <stem type="AsciiMath">r</stem>
         | 
| 725 | 
            -
                            </dt>
         | 
| 726 | 
            -
                            <dd>
         | 
| 727 | 
            -
                              <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
         | 
| 728 | 
            -
                            </dd>
         | 
| 729 | 
            -
                            <dt>
         | 
| 730 | 
            -
                              <stem type="AsciiMath">s_1</stem>
         | 
| 731 | 
            -
                            </dt>
         | 
| 732 | 
            -
                            <dd>
         | 
| 733 | 
            -
                              <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
         | 
| 734 | 
            -
                            </dd>
         | 
| 735 | 
            -
                          </dl>
         | 
| 736 | 
            -
                          <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
         | 
| 737 | 
            -
                            <name>NOTE</name>
         | 
| 738 | 
            -
                            <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P"
         | 
| 739 | 
            -
                              prefix. "P" is unnecessary because between "G" and "U" duration is
         | 
| 740 | 
            -
                              always expressed.
         | 
| 741 | 
            -
                            </p>
         | 
| 742 | 
            -
                          </note>
         | 
| 743 | 
            -
                        </formula>
         | 
| 744 | 
            -
                        <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
         | 
| 745 | 
            -
                          <name>1</name>
         | 
| 746 | 
            -
                          <stem type="AsciiMath">r = 1 %</stem>
         | 
| 747 | 
            -
                        </formula>
         | 
| 748 | 
            -
                      </foreword>
         | 
| 749 | 
            -
                    </preface>
         | 
| 750 | 
            -
                  </iso-standard>
         | 
| 751 | 
            -
                OUTPUT
         | 
| 752 | 
            -
             | 
| 753 | 
            -
                html = <<~OUTPUT
         | 
| 754 | 
            -
                  #{HTML_HDR}
         | 
| 755 | 
            -
                          <br/>
         | 
| 756 | 
            -
                            <div>
         | 
| 757 | 
            -
                              <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 758 | 
            -
                              <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'>
         | 
| 759 | 
            -
                                <div class='formula'>
         | 
| 760 | 
            -
                                  <p>
         | 
| 761 | 
            -
                                    <span class='stem'>(#(r = 1 %)#)</span>
         | 
| 762 | 
            -
                                  </p>
         | 
| 763 | 
            -
                                </div>
         | 
| 764 | 
            -
                                <p style='page-break-after:avoid;'>where</p>
         | 
| 765 | 
            -
                                <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d' class='formula_dl'>
         | 
| 766 | 
            -
                                  <dt>
         | 
| 767 | 
            -
                                    <span class='stem'>(#(r)#)</span>
         | 
| 768 | 
            -
                                  </dt>
         | 
| 769 | 
            -
                                  <dd>
         | 
| 770 | 
            -
                                    <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
         | 
| 771 | 
            -
                                  </dd>
         | 
| 772 | 
            -
                                  <dt>
         | 
| 773 | 
            -
                                    <span class='stem'>(#(s_1)#)</span>
         | 
| 774 | 
            -
                                  </dt>
         | 
| 775 | 
            -
                                  <dd>
         | 
| 776 | 
            -
                                    <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
         | 
| 777 | 
            -
                                  </dd>
         | 
| 778 | 
            -
                                </dl>
         | 
| 779 | 
            -
                                <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
         | 
| 780 | 
            -
                                  <p>
         | 
| 781 | 
            -
                                  <span class='note_label'>NOTE</span>
         | 
| 782 | 
            -
                                      [durationUnits] is essentially a duration statement without
         | 
| 783 | 
            -
                                    the "P" prefix. "P" is unnecessary because between "G" and "U"
         | 
| 784 | 
            -
                                    duration is always expressed.
         | 
| 785 | 
            -
                                  </p>
         | 
| 786 | 
            -
                                </div>
         | 
| 787 | 
            -
                              </div>
         | 
| 788 | 
            -
                            <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'>
         | 
| 789 | 
            -
                            <div class='formula'>
         | 
| 790 | 
            -
                              <p>
         | 
| 791 | 
            -
                                <span class='stem'>(#(r = 1 %)#)</span>
         | 
| 792 | 
            -
                                  (1)
         | 
| 793 | 
            -
                              </p>
         | 
| 794 | 
            -
                            </div>
         | 
| 795 | 
            -
                          </div>
         | 
| 796 | 
            -
                        </div>
         | 
| 797 | 
            -
                        <p class='zzSTDTitle1'/>
         | 
| 798 | 
            -
                      </div>
         | 
| 799 | 
            -
                    </body>
         | 
| 800 | 
            -
                  </html>
         | 
| 801 | 
            -
                OUTPUT
         | 
| 802 | 
            -
             | 
| 803 | 
            -
                word = <<~OUTPUT
         | 
| 804 | 
            -
                      <div>
         | 
| 805 | 
            -
                        <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 806 | 
            -
                        <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
         | 
| 807 | 
            -
                          <p>
         | 
| 808 | 
            -
                            <span class='stem'>(#(r = 1 %)#)</span>
         | 
| 809 | 
            -
                            <span style='mso-tab-count:1'>  </span>
         | 
| 810 | 
            -
                          </p>
         | 
| 811 | 
            -
                        </div>
         | 
| 812 | 
            -
                        <p>where</p>
         | 
| 813 | 
            -
                        <table class="formula_dl">
         | 
| 814 | 
            -
                          <tr>
         | 
| 815 | 
            -
                            <td align="left" valign="top">
         | 
| 816 | 
            -
                              <p align="left" style="margin-left:0pt;text-align:left;">
         | 
| 817 | 
            -
                                <span class="stem">(#(r)#)</span>
         | 
| 818 | 
            -
                              </p>
         | 
| 819 | 
            -
                            </td>
         | 
| 820 | 
            -
                            <td valign="top">
         | 
| 821 | 
            -
                              <p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
         | 
| 822 | 
            -
                            </td>
         | 
| 823 | 
            -
                          </tr>
         | 
| 824 | 
            -
                          <tr>
         | 
| 825 | 
            -
                            <td align="left" valign="top">
         | 
| 826 | 
            -
                              <p align="left" style="margin-left:0pt;text-align:left;">
         | 
| 827 | 
            -
                                <span class="stem">(#(s_1)#)</span>
         | 
| 828 | 
            -
                              </p>
         | 
| 829 | 
            -
                            </td>
         | 
| 830 | 
            -
                            <td valign="top">
         | 
| 831 | 
            -
                              <p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
         | 
| 832 | 
            -
                            </td>
         | 
| 833 | 
            -
                          </tr>
         | 
| 834 | 
            -
                        </table>
         | 
| 835 | 
            -
                        <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
         | 
| 836 | 
            -
                          <p class='Note'>
         | 
| 837 | 
            -
                                <span class='note_label'>NOTE</span>
         | 
| 838 | 
            -
                            <span style='mso-tab-count:1'>  </span>
         | 
| 839 | 
            -
                            [durationUnits] is essentially a duration statement without the "P"
         | 
| 840 | 
            -
                            prefix. "P" is unnecessary because between "G" and "U" duration is
         | 
| 841 | 
            -
                            always expressed.
         | 
| 842 | 
            -
                          </p>
         | 
| 843 | 
            -
                        </div>
         | 
| 844 | 
            -
                      </div>
         | 
| 845 | 
            -
                      <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
         | 
| 846 | 
            -
                        <p>
         | 
| 847 | 
            -
                          <span class='stem'>(#(r = 1 %)#)</span>
         | 
| 848 | 
            -
                          <span style='mso-tab-count:1'>  </span>
         | 
| 849 | 
            -
                          (1)
         | 
| 850 | 
            -
                        </p>
         | 
| 851 | 
            -
                      </div>
         | 
| 852 | 
            -
                    </div>
         | 
| 853 | 
            -
                  </div>
         | 
| 854 | 
            -
                OUTPUT
         | 
| 855 | 
            -
                output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input,
         | 
| 856 | 
            -
                                                                             true)
         | 
| 857 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(presxml)
         | 
| 858 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true)
         | 
| 859 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(html)
         | 
| 860 | 
            -
                output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
         | 
| 861 | 
            -
                expect(xmlpp(output
         | 
| 862 | 
            -
                  .sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">')
         | 
| 863 | 
            -
                  .sub(%r{<p> </p>\s*</div>.*$}m, ""))).to be_equivalent_to xmlpp(word)
         | 
| 864 | 
            -
              end
         | 
| 865 | 
            -
             | 
| 866 | 
            -
              it "processes formulae with single definition list entry" do
         | 
| 867 | 
            -
                output = IsoDoc::Iso::HtmlConvert.new({})
         | 
| 868 | 
            -
            .convert("test", <<~"INPUT", true)
         | 
| 869 | 
            -
                                                                    <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 870 | 
            -
                                                                      <preface>
         | 
| 871 | 
            -
                                                                        <foreword>
         | 
| 872 | 
            -
                                                                          <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
         | 
| 873 | 
            -
                                                                            <stem type="AsciiMath">r = 1 %</stem>
         | 
| 874 | 
            -
                                                                            <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
         | 
| 875 | 
            -
                                                                              <dt>
         | 
| 876 | 
            -
                                                                                <stem type="AsciiMath">r</stem>
         | 
| 877 | 
            -
                                                                              </dt>
         | 
| 878 | 
            -
                                                                              <dd>
         | 
| 879 | 
            -
                                                                                <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
         | 
| 880 | 
            -
                                                                              </dd>
         | 
| 881 | 
            -
                                                                            </dl>
         | 
| 882 | 
            -
                                                                            <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
         | 
| 883 | 
            -
                                                                              <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
         | 
| 884 | 
            -
                                                                            </note>
         | 
| 885 | 
            -
                                                                          </formula>
         | 
| 886 | 
            -
                                                                          <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
         | 
| 887 | 
            -
                                                                            <name>1</name>
         | 
| 888 | 
            -
                                                                            <stem type="AsciiMath">r = 1 %</stem>
         | 
| 889 | 
            -
                                                                          </formula>
         | 
| 890 | 
            -
                                                                        </foreword>
         | 
| 891 | 
            -
                                                                      </preface>
         | 
| 892 | 
            -
                                                                    </iso-standard>
         | 
| 893 | 
            -
                                                                  INPUT
         | 
| 894 | 
            -
                expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
         | 
| 895 | 
            -
                  #{HTML_HDR}
         | 
| 896 | 
            -
                          <br/>
         | 
| 897 | 
            -
                          <div>
         | 
| 898 | 
            -
                            <h1 class="ForewordTitle">Foreword</h1>
         | 
| 899 | 
            -
                            <div id="_be9158af-7e93-4ee2-90c5-26d31c181934">
         | 
| 900 | 
            -
                              <div class="formula">
         | 
| 901 | 
            -
                                <p><span class="stem">(#(r = 1 %)#)</span></p>
         | 
| 902 | 
            -
                              </div>
         | 
| 903 | 
            -
                              <span class='zzMoveToFollowing'>
         | 
| 904 | 
            -
                                where <span class='stem'>(#(r)#)</span>
         | 
| 905 | 
            -
                              </span>
         | 
| 906 | 
            -
                              <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
         | 
| 907 | 
            -
                              <div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note">
         | 
| 908 | 
            -
                                <p>  [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
         | 
| 909 | 
            -
                              </div>
         | 
| 910 | 
            -
                            </div>
         | 
| 911 | 
            -
                            <div id="_be9158af-7e93-4ee2-90c5-26d31c181935">
         | 
| 912 | 
            -
                              <div class="formula">
         | 
| 913 | 
            -
                                <p><span class="stem">(#(r = 1 %)#)</span>  (1)</p>
         | 
| 914 | 
            -
                              </div>
         | 
| 915 | 
            -
                            </div>
         | 
| 916 | 
            -
                          </div>
         | 
| 917 | 
            -
                        <p class="zzSTDTitle1"/>
         | 
| 918 | 
            -
                      </div>
         | 
| 919 | 
            -
                    </body>
         | 
| 920 | 
            -
                  </html>
         | 
| 921 | 
            -
                OUTPUT
         | 
| 922 | 
            -
              end
         | 
| 923 | 
            -
             | 
| 924 | 
            -
              it "adds ordered list classes for HTML" do
         | 
| 925 | 
            -
                input = <<~INPUT
         | 
| 926 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 927 | 
            -
                  <preface><foreword>
         | 
| 928 | 
            -
                    <ol>
         | 
| 929 | 
            -
                    <li><p>A</p></li>
         | 
| 930 | 
            -
                    <li><p>B</p></li>
         | 
| 931 | 
            -
                    <li><ol>
         | 
| 932 | 
            -
                    <li>C</li>
         | 
| 933 | 
            -
                    <li>D</li>
         | 
| 934 | 
            -
                    <li><ol>
         | 
| 935 | 
            -
                    <li>E</li>
         | 
| 936 | 
            -
                    <li>F</li>
         | 
| 937 | 
            -
                    <li><ol>
         | 
| 938 | 
            -
                    <li>G</li>
         | 
| 939 | 
            -
                    <li>H</li>
         | 
| 940 | 
            -
                    <li><ol>
         | 
| 941 | 
            -
                    <li>I</li>
         | 
| 942 | 
            -
                    <li>J</li>
         | 
| 943 | 
            -
                    <li><ol>
         | 
| 944 | 
            -
                    <li>K</li>
         | 
| 945 | 
            -
                    <li>L</li>
         | 
| 946 | 
            -
                    <li>M</li>
         | 
| 947 | 
            -
                    </ol></li>
         | 
| 948 | 
            -
                    <li>N</li>
         | 
| 949 | 
            -
                    </ol></li>
         | 
| 950 | 
            -
                    <li>O</li>
         | 
| 951 | 
            -
                    </ol></li>
         | 
| 952 | 
            -
                    <li>P</li>
         | 
| 953 | 
            -
                    </ol></li>
         | 
| 954 | 
            -
                    <li>Q</li>
         | 
| 955 | 
            -
                    </ol></li>
         | 
| 956 | 
            -
                    <li>R</li>
         | 
| 957 | 
            -
                    </ol>
         | 
| 958 | 
            -
                  </foreword></preface>
         | 
| 959 | 
            -
                  </iso-standard>
         | 
| 960 | 
            -
                INPUT
         | 
| 961 | 
            -
                    presxml = <<~INPUT
         | 
| 962 | 
            -
                           <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
         | 
| 963 | 
            -
                     <preface>
         | 
| 964 | 
            -
                       <foreword displayorder='1'>
         | 
| 965 | 
            -
                         <ol type='alphabet'>
         | 
| 966 | 
            -
                           <li>
         | 
| 967 | 
            -
                             <p>A</p>
         | 
| 968 | 
            -
                           </li>
         | 
| 969 | 
            -
                           <li>
         | 
| 970 | 
            -
                             <p>B</p>
         | 
| 971 | 
            -
                           </li>
         | 
| 972 | 
            -
                           <li>
         | 
| 973 | 
            -
                             <ol type='arabic'>
         | 
| 974 | 
            -
                               <li>C</li>
         | 
| 975 | 
            -
                               <li>D</li>
         | 
| 976 | 
            -
                               <li>
         | 
| 977 | 
            -
                                 <ol type='roman'>
         | 
| 978 | 
            -
                                   <li>E</li>
         | 
| 979 | 
            -
                                   <li>F</li>
         | 
| 980 | 
            -
                                   <li>
         | 
| 981 | 
            -
                                     <ol type='alphabet_upper'>
         | 
| 982 | 
            -
                                       <li>G</li>
         | 
| 983 | 
            -
                                       <li>H</li>
         | 
| 984 | 
            -
                                       <li>
         | 
| 985 | 
            -
                                         <ol type='roman_upper'>
         | 
| 986 | 
            -
                                           <li>I</li>
         | 
| 987 | 
            -
                                           <li>J</li>
         | 
| 988 | 
            -
                                           <li>
         | 
| 989 | 
            -
                                             <ol type='alphabet'>
         | 
| 990 | 
            -
                                               <li>K</li>
         | 
| 991 | 
            -
                                               <li>L</li>
         | 
| 992 | 
            -
                                               <li>M</li>
         | 
| 993 | 
            -
                                             </ol>
         | 
| 994 | 
            -
                                           </li>
         | 
| 995 | 
            -
                                           <li>N</li>
         | 
| 996 | 
            -
                                         </ol>
         | 
| 997 | 
            -
                                       </li>
         | 
| 998 | 
            -
                                       <li>O</li>
         | 
| 999 | 
            -
                                     </ol>
         | 
| 1000 | 
            -
                                   </li>
         | 
| 1001 | 
            -
                                   <li>P</li>
         | 
| 1002 | 
            -
                                 </ol>
         | 
| 1003 | 
            -
                               </li>
         | 
| 1004 | 
            -
                               <li>Q</li>
         | 
| 1005 | 
            -
                             </ol>
         | 
| 1006 | 
            -
                           </li>
         | 
| 1007 | 
            -
                           <li>R</li>
         | 
| 1008 | 
            -
                         </ol>
         | 
| 1009 | 
            -
                       </foreword>
         | 
| 1010 | 
            -
                     </preface>
         | 
| 1011 | 
            -
                   </iso-standard>
         | 
| 1012 | 
            -
                INPUT
         | 
| 1013 | 
            -
                html = <<~OUTPUT
         | 
| 1014 | 
            -
                  #{HTML_HDR}
         | 
| 1015 | 
            -
                                <br/>
         | 
| 1016 | 
            -
                         <div>
         | 
| 1017 | 
            -
                           <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 1018 | 
            -
                                          <ol type='a' class='alphabet'>
         | 
| 1019 | 
            -
                             <li>
         | 
| 1020 | 
            -
                               <p>A</p>
         | 
| 1021 | 
            -
                             </li>
         | 
| 1022 | 
            -
                             <li>
         | 
| 1023 | 
            -
                               <p>B</p>
         | 
| 1024 | 
            -
                             </li>
         | 
| 1025 | 
            -
                             <li>
         | 
| 1026 | 
            -
                               <ol type='1' class='arabic'>
         | 
| 1027 | 
            -
                                 <li>C</li>
         | 
| 1028 | 
            -
                                 <li>D</li>
         | 
| 1029 | 
            -
                                 <li>
         | 
| 1030 | 
            -
                                   <ol type='i' class='roman'>
         | 
| 1031 | 
            -
                                     <li>E</li>
         | 
| 1032 | 
            -
                                     <li>F</li>
         | 
| 1033 | 
            -
                                     <li>
         | 
| 1034 | 
            -
                                       <ol type='A' class='alphabet_upper'>
         | 
| 1035 | 
            -
                                         <li>G</li>
         | 
| 1036 | 
            -
                                         <li>H</li>
         | 
| 1037 | 
            -
                                         <li>
         | 
| 1038 | 
            -
                                           <ol type='I' class='roman_upper'>
         | 
| 1039 | 
            -
                                             <li>I</li>
         | 
| 1040 | 
            -
                                             <li>J</li>
         | 
| 1041 | 
            -
                                             <li>
         | 
| 1042 | 
            -
                                               <ol type='a' class='alphabet'>
         | 
| 1043 | 
            -
                                                 <li>K</li>
         | 
| 1044 | 
            -
                                                 <li>L</li>
         | 
| 1045 | 
            -
                                                 <li>M</li>
         | 
| 1046 | 
            -
                                               </ol>
         | 
| 1047 | 
            -
                                             </li>
         | 
| 1048 | 
            -
                                             <li>N</li>
         | 
| 1049 | 
            -
                                           </ol>
         | 
| 1050 | 
            -
                                         </li>
         | 
| 1051 | 
            -
                                         <li>O</li>
         | 
| 1052 | 
            -
                                       </ol>
         | 
| 1053 | 
            -
                                     </li>
         | 
| 1054 | 
            -
                                     <li>P</li>
         | 
| 1055 | 
            -
                                   </ol>
         | 
| 1056 | 
            -
                                 </li>
         | 
| 1057 | 
            -
                                 <li>Q</li>
         | 
| 1058 | 
            -
                               </ol>
         | 
| 1059 | 
            -
                             </li>
         | 
| 1060 | 
            -
                             <li>R</li>
         | 
| 1061 | 
            -
                           </ol>
         | 
| 1062 | 
            -
                         </div>
         | 
| 1063 | 
            -
                         <p class='zzSTDTitle1'/>
         | 
| 1064 | 
            -
                       </div>
         | 
| 1065 | 
            -
                     </body>
         | 
| 1066 | 
            -
                   </html>
         | 
| 1067 | 
            -
                OUTPUT
         | 
| 1068 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 1069 | 
            -
                  .convert("test", input, true)))
         | 
| 1070 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 1071 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 1072 | 
            -
                  .convert("test", presxml, true)))
         | 
| 1073 | 
            -
                  .to be_equivalent_to xmlpp(html)
         | 
| 1074 | 
            -
              end
         | 
| 1075 | 
            -
             | 
| 1076 | 
            -
              it "processes ordered lists with start" do
         | 
| 1077 | 
            -
                input = <<~INPUT
         | 
| 1078 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 1079 | 
            -
                  <preface><foreword>
         | 
| 1080 | 
            -
                  <ol start="4">
         | 
| 1081 | 
            -
                  <li>List</li>
         | 
| 1082 | 
            -
                  </ol>
         | 
| 1083 | 
            -
                  </foreword></preface>
         | 
| 1084 | 
            -
                  </iso-standard>
         | 
| 1085 | 
            -
                INPUT
         | 
| 1086 | 
            -
                presxml = <<~INPUT
         | 
| 1087 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
         | 
| 1088 | 
            -
                     <preface>
         | 
| 1089 | 
            -
                       <foreword displayorder='1'>
         | 
| 1090 | 
            -
                         <ol start='4' type='alphabet'>
         | 
| 1091 | 
            -
                           <li>List</li>
         | 
| 1092 | 
            -
                         </ol>
         | 
| 1093 | 
            -
                       </foreword>
         | 
| 1094 | 
            -
                     </preface>
         | 
| 1095 | 
            -
                   </iso-standard>
         | 
| 1096 | 
            -
                INPUT
         | 
| 1097 | 
            -
                html = <<~OUTPUT
         | 
| 1098 | 
            -
                  #{HTML_HDR}
         | 
| 1099 | 
            -
                                <br/>
         | 
| 1100 | 
            -
                         <div>
         | 
| 1101 | 
            -
                           <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 1102 | 
            -
                           <ol type='a' start='4'  class='alphabet'>
         | 
| 1103 | 
            -
                             <li>List</li>
         | 
| 1104 | 
            -
                           </ol>
         | 
| 1105 | 
            -
                         </div>
         | 
| 1106 | 
            -
                         <p class='zzSTDTitle1'/>
         | 
| 1107 | 
            -
                       </div>
         | 
| 1108 | 
            -
                     </body>
         | 
| 1109 | 
            -
                   </html>
         | 
| 1110 | 
            -
                OUTPUT
         | 
| 1111 | 
            -
                word = <<~OUTPUT
         | 
| 1112 | 
            -
                  <div class='WordSection2'>
         | 
| 1113 | 
            -
                    <p>
         | 
| 1114 | 
            -
                      <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
         | 
| 1115 | 
            -
                    </p>
         | 
| 1116 | 
            -
                    <div>
         | 
| 1117 | 
            -
                      <h1 class='ForewordTitle'>Foreword</h1>
         | 
| 1118 | 
            -
                      <ol type='a' start='4'>
         | 
| 1119 | 
            -
                        <li>List</li>
         | 
| 1120 | 
            -
                      </ol>
         | 
| 1121 | 
            -
                    </div>
         | 
| 1122 | 
            -
                    <p> </p>
         | 
| 1123 | 
            -
                  </div>
         | 
| 1124 | 
            -
                OUTPUT
         | 
| 1125 | 
            -
             | 
| 1126 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 1127 | 
            -
                  .convert("test", input, true)))
         | 
| 1128 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 1129 | 
            -
                expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
         | 
| 1130 | 
            -
                  .convert("test", presxml, true)))
         | 
| 1131 | 
            -
                  .to be_equivalent_to xmlpp(html)
         | 
| 1132 | 
            -
                expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::WordConvert.new({})
         | 
| 1133 | 
            -
                  .convert("test", presxml, true))
         | 
| 1134 | 
            -
                  .at("//div[@class = 'WordSection2']").to_xml))
         | 
| 1135 | 
            -
                  .to be_equivalent_to xmlpp(word)
         | 
| 1136 | 
            -
              end
         | 
| 1137 | 
            -
             | 
| 1138 | 
            -
              it "ignores intervening ul in numbering ol" do
         | 
| 1139 | 
            -
                input = <<~INPUT
         | 
| 1140 | 
            -
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         | 
| 1141 | 
            -
                  <preface><foreword>
         | 
| 1142 | 
            -
                  <ul>
         | 
| 1143 | 
            -
                  <li>A</li>
         | 
| 1144 | 
            -
                  <li>
         | 
| 1145 | 
            -
                  <ol>
         | 
| 1146 | 
            -
                  <li>List</li>
         | 
| 1147 | 
            -
                  </ol>
         | 
| 1148 | 
            -
                  </li>
         | 
| 1149 | 
            -
                  </ul>
         | 
| 1150 | 
            -
                  </foreword></preface>
         | 
| 1151 | 
            -
                  </iso-standard>
         | 
| 1152 | 
            -
                INPUT
         | 
| 1153 | 
            -
                presxml = <<~INPUT
         | 
| 1154 | 
            -
                  <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
         | 
| 1155 | 
            -
                     <preface>
         | 
| 1156 | 
            -
                       <foreword displayorder='1'>
         | 
| 1157 | 
            -
                         <ul>
         | 
| 1158 | 
            -
                           <li>A</li>
         | 
| 1159 | 
            -
                           <li>
         | 
| 1160 | 
            -
                             <ol type='alphabet'>
         | 
| 1161 | 
            -
                               <li>List</li>
         | 
| 1162 | 
            -
                             </ol>
         | 
| 1163 | 
            -
                           </li>
         | 
| 1164 | 
            -
                         </ul>
         | 
| 1165 | 
            -
                       </foreword>
         | 
| 1166 | 
            -
                     </preface>
         | 
| 1167 | 
            -
                   </iso-standard>
         | 
| 1168 | 
            -
                INPUT
         | 
| 1169 | 
            -
                expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
         | 
| 1170 | 
            -
                  .convert("test", input, true)))
         | 
| 1171 | 
            -
                  .to be_equivalent_to xmlpp(presxml)
         | 
| 1172 | 
            -
             | 
| 1173 | 
            -
              end
         | 
| 1174 | 
            -
            end
         |