metanorma-iec 1.3.0 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.github/workflows/rake.yml +12 -11
 - data/.hound.yml +3 -1
 - data/.rubocop.yml +4 -8
 - data/lib/asciidoctor/iec/biblio.rng +1 -0
 - data/lib/asciidoctor/iec/front.rb +11 -5
 - data/lib/asciidoctor/iec/iec.rng +4 -0
 - data/lib/asciidoctor/iec/iec_intro_en.xml +1 -1
 - data/lib/asciidoctor/iec/isodoc.rng +191 -3
 - data/lib/asciidoctor/iec/isostandard.rng +12 -0
 - data/lib/isodoc/iec/base_convert.rb +20 -14
 - data/lib/isodoc/iec/html_convert.rb +6 -6
 - data/lib/isodoc/iec/iec.international-standard.xsl +533 -67
 - data/lib/isodoc/iec/metadata.rb +1 -1
 - data/lib/isodoc/iec/pdf_convert.rb +1 -1
 - data/lib/isodoc/iec/presentation_xml_convert.rb +17 -17
 - data/lib/isodoc/iec/word_convert.rb +69 -19
 - data/lib/metanorma/iec/version.rb +1 -1
 - data/metanorma-iec.gemspec +1 -1
 - data/spec/asciidoctor/base_spec.rb +818 -801
 - data/spec/asciidoctor/blocks_spec.rb +212 -154
 - data/spec/asciidoctor/section_spec.rb +0 -38
 - data/spec/isodoc/blocks_spec.rb +2 -2
 - data/spec/isodoc/i18n_spec.rb +346 -432
 - data/spec/isodoc/iev_spec.rb +508 -519
 - data/spec/isodoc/inline_spec.rb +2 -2
 - data/spec/isodoc/ref_spec.rb +6 -6
 - data/spec/isodoc/section_spec.rb +334 -339
 - data/spec/isodoc/terms_spec.rb +1 -1
 - metadata +3 -3
 
    
        data/spec/isodoc/inline_spec.rb
    CHANGED
    
    | 
         @@ -187,7 +187,7 @@ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INP 
     | 
|
| 
       187 
187 
     | 
    
         
             
            <?xml version='1.0'?>
         
     | 
| 
       188 
188 
     | 
    
         
             
                   <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
         
     | 
| 
       189 
189 
     | 
    
         
             
                     <preface>
         
     | 
| 
       190 
     | 
    
         
            -
                       <foreword>
         
     | 
| 
      
 190 
     | 
    
         
            +
                       <foreword displayorder="1">
         
     | 
| 
       191 
191 
     | 
    
         
             
                         <p>
         
     | 
| 
       192 
192 
     | 
    
         
             
                           <eref type='inline' bibitemid='IEV' citeas='IEV'>
         
     | 
| 
       193 
193 
     | 
    
         
             
                             <locality type='clause'>
         
     | 
| 
         @@ -261,7 +261,7 @@ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INP 
     | 
|
| 
       261 
261 
     | 
    
         
             
                       </foreword>
         
     | 
| 
       262 
262 
     | 
    
         
             
                     </preface>
         
     | 
| 
       263 
263 
     | 
    
         
             
                     <bibliography>
         
     | 
| 
       264 
     | 
    
         
            -
                       <references id='_normative_references' obligation='informative' normative='true'>
         
     | 
| 
      
 264 
     | 
    
         
            +
                       <references id='_normative_references' obligation='informative' normative='true' displayorder="2">
         
     | 
| 
       265 
265 
     | 
    
         
             
                       <title depth='1'>
         
     | 
| 
       266 
266 
     | 
    
         
             
              1
         
     | 
| 
       267 
267 
     | 
    
         
             
              <tab/>
         
     | 
    
        data/spec/isodoc/ref_spec.rb
    CHANGED
    
    | 
         @@ -130,7 +130,7 @@ RSpec.describe IsoDoc::Iec do 
     | 
|
| 
       130 
130 
     | 
    
         
             
                        <bibdata>
         
     | 
| 
       131 
131 
     | 
    
         
             
                        <language current="true">en</language>
         
     | 
| 
       132 
132 
     | 
    
         
             
                        </bibdata>
         
     | 
| 
       133 
     | 
    
         
            -
                        <preface><foreword>
         
     | 
| 
      
 133 
     | 
    
         
            +
                        <preface><foreword displayorder="1">
         
     | 
| 
       134 
134 
     | 
    
         
             
                      <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
         
     | 
| 
       135 
135 
     | 
    
         
             
                      <eref bibitemid="ISO712">[110]</eref>
         
     | 
| 
       136 
136 
     | 
    
         
             
                      <eref bibitemid="ISBN">[1]</eref>
         
     | 
| 
         @@ -142,7 +142,7 @@ RSpec.describe IsoDoc::Iec do 
     | 
|
| 
       142 
142 
     | 
    
         
             
                      <eref bibitemid="zip_ffs">[5]</eref>
         
     | 
| 
       143 
143 
     | 
    
         
             
                      </p>
         
     | 
| 
       144 
144 
     | 
    
         
             
                        </foreword></preface>
         
     | 
| 
       145 
     | 
    
         
            -
                        <bibliography><references id="_normative_references" obligation="informative" normative="true"><title depth="1">1<tab/>Normative References</title>
         
     | 
| 
      
 145 
     | 
    
         
            +
                        <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="2"><title depth="1">1<tab/>Normative References</title>
         
     | 
| 
       146 
146 
     | 
    
         
             
                        <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
         
     | 
| 
       147 
147 
     | 
    
         
             
                    <bibitem id="ISO712" type="standard">
         
     | 
| 
       148 
148 
     | 
    
         
             
                      <title format="text/plain">Cereals or cereal products</title>
         
     | 
| 
         @@ -186,13 +186,13 @@ RSpec.describe IsoDoc::Iec do 
     | 
|
| 
       186 
186 
     | 
    
         
             
                    </bibitem>
         
     | 
| 
       187 
187 
     | 
    
         
             
                    <bibitem id="ref1">
         
     | 
| 
       188 
188 
     | 
    
         
             
                      <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
         
     | 
| 
       189 
     | 
    
         
            -
                      <docidentifier type="ICC">167</docidentifier>
         
     | 
| 
      
 189 
     | 
    
         
            +
                      <docidentifier type="ICC">ICC 167</docidentifier>
         
     | 
| 
       190 
190 
     | 
    
         
             
                    </bibitem>
         
     | 
| 
       191 
191 
     | 
    
         
             
                    <note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
         
     | 
| 
       192 
192 
     | 
    
         
             
                        <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
         
     | 
| 
       193 
193 
     | 
    
         | 
| 
       194 
194 
     | 
    
         | 
| 
       195 
     | 
    
         
            -
                    </references><references id="_bibliography" obligation="informative" normative="false">
         
     | 
| 
      
 195 
     | 
    
         
            +
                    </references><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
         
     | 
| 
       196 
196 
     | 
    
         
             
                      <title depth="1">Bibliography</title>
         
     | 
| 
       197 
197 
     | 
    
         
             
                    <bibitem id="ISBN" type="ISBN">
         
     | 
| 
       198 
198 
     | 
    
         
             
                      <title format="text/plain">Chemicals for analytical laboratory use</title>
         
     | 
| 
         @@ -234,12 +234,12 @@ RSpec.describe IsoDoc::Iec do 
     | 
|
| 
       234 
234 
     | 
    
         
             
                    </bibitem>
         
     | 
| 
       235 
235 
     | 
    
         
             
                    <bibitem id="ref11">
         
     | 
| 
       236 
236 
     | 
    
         
             
                      <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
         
     | 
| 
       237 
     | 
    
         
            -
                      <docidentifier type="IETF">RFC 10</docidentifier>
         
     | 
| 
      
 237 
     | 
    
         
            +
                      <docidentifier type="IETF">IETF RFC 10</docidentifier>
         
     | 
| 
       238 
238 
     | 
    
         
             
                    </bibitem>
         
     | 
| 
       239 
239 
     | 
    
         
             
                    <bibitem id="ref12">
         
     | 
| 
       240 
240 
     | 
    
         
             
                      <formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
         
     | 
| 
       241 
241 
     | 
    
         
             
                      <docidentifier type="metanorma">[Citn]</docidentifier>
         
     | 
| 
       242 
     | 
    
         
            -
                      <docidentifier type="IETF">RFC 20</docidentifier>
         
     | 
| 
      
 242 
     | 
    
         
            +
                      <docidentifier type="IETF">IETF RFC 20</docidentifier>
         
     | 
| 
       243 
243 
     | 
    
         
             
                    </bibitem>
         
     | 
| 
       244 
244 
     | 
    
         | 
| 
       245 
245 
     | 
    
         | 
    
        data/spec/isodoc/section_spec.rb
    CHANGED
    
    | 
         @@ -69,23 +69,23 @@ RSpec.describe IsoDoc do 
     | 
|
| 
       69 
69 
     | 
    
         
             
                INPUT
         
     | 
| 
       70 
70 
     | 
    
         | 
| 
       71 
71 
     | 
    
         
             
                presxml = <<~OUTPUT
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
      
 72 
     | 
    
         
            +
                    <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
         
     | 
| 
       73 
73 
     | 
    
         
             
                    <preface>
         
     | 
| 
       74 
     | 
    
         
            -
                    <foreword obligation="informative">
         
     | 
| 
      
 74 
     | 
    
         
            +
                    <foreword obligation="informative" displayorder="1">
         
     | 
| 
       75 
75 
     | 
    
         
             
                       <title>Foreword</title>
         
     | 
| 
       76 
76 
     | 
    
         
             
                       <p id="A">This is a preamble</p>
         
     | 
| 
       77 
77 
     | 
    
         
             
                     </foreword>
         
     | 
| 
       78 
     | 
    
         
            -
                      <introduction id="B" obligation="informative"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
         
     | 
| 
      
 78 
     | 
    
         
            +
                      <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
         
     | 
| 
       79 
79 
     | 
    
         
             
                       <title depth="2">0.1<tab/>Introduction Subsection</title>
         
     | 
| 
       80 
80 
     | 
    
         
             
                     </clause>
         
     | 
| 
       81 
81 
     | 
    
         
             
                     <p>This is patent boilerplate</p>
         
     | 
| 
       82 
82 
     | 
    
         
             
                     </introduction></preface><sections>
         
     | 
| 
       83 
     | 
    
         
            -
                     <clause id="D" obligation="normative" type="scope">
         
     | 
| 
      
 83 
     | 
    
         
            +
                     <clause id="D" obligation="normative" type="scope" displayorder="3">
         
     | 
| 
       84 
84 
     | 
    
         
             
                       <title depth="1">1<tab/>Scope</title>
         
     | 
| 
       85 
85 
     | 
    
         
             
                       <p id="E">Text</p>
         
     | 
| 
       86 
86 
     | 
    
         
             
                     </clause>
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
                     <clause id="H" obligation="normative"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
         
     | 
| 
      
 87 
     | 
    
         
            +
                  
         
     | 
| 
      
 88 
     | 
    
         
            +
                     <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
         
     | 
| 
       89 
89 
     | 
    
         
             
                       <title depth="2">3.1<tab/>Normal Terms</title>
         
     | 
| 
       90 
90 
     | 
    
         
             
                       <term id="J"><name>3.1.1</name>
         
     | 
| 
       91 
91 
     | 
    
         
             
                       <preferred>Term2</preferred>
         
     | 
| 
         @@ -98,20 +98,20 @@ RSpec.describe IsoDoc do 
     | 
|
| 
       98 
98 
     | 
    
         
             
                       </dl>
         
     | 
| 
       99 
99 
     | 
    
         
             
                     </definitions>
         
     | 
| 
       100 
100 
     | 
    
         
             
                     </clause>
         
     | 
| 
       101 
     | 
    
         
            -
                     <definitions id="L"><title>4</title>
         
     | 
| 
      
 101 
     | 
    
         
            +
                     <definitions id="L" displayorder="6"><title>4</title>
         
     | 
| 
       102 
102 
     | 
    
         
             
                       <dl>
         
     | 
| 
       103 
103 
     | 
    
         
             
                       <dt>Symbol</dt>
         
     | 
| 
       104 
104 
     | 
    
         
             
                       <dd>Definition</dd>
         
     | 
| 
       105 
105 
     | 
    
         
             
                       </dl>
         
     | 
| 
       106 
106 
     | 
    
         
             
                     </definitions>
         
     | 
| 
       107 
     | 
    
         
            -
                     <clause id="M" inline-header="false" obligation="normative"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
         
     | 
| 
      
 107 
     | 
    
         
            +
                     <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
         
     | 
| 
       108 
108 
     | 
    
         
             
                       <title depth="2">5.1<tab/>Introduction</title>
         
     | 
| 
       109 
109 
     | 
    
         
             
                     </clause>
         
     | 
| 
       110 
110 
     | 
    
         
             
                     <clause id="O" inline-header="false" obligation="normative">
         
     | 
| 
       111 
111 
     | 
    
         
             
                       <title depth="2">5.2<tab/>Clause 4.2</title>
         
     | 
| 
       112 
112 
     | 
    
         
             
                     </clause></clause>
         
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
                     </sections><annex id="P" inline-header="false" obligation="normative">
         
     | 
| 
      
 113 
     | 
    
         
            +
                  
         
     | 
| 
      
 114 
     | 
    
         
            +
                     </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
         
     | 
| 
       115 
115 
     | 
    
         
             
                       <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
         
     | 
| 
       116 
116 
     | 
    
         
             
                       <clause id="Q" inline-header="false" obligation="normative">
         
     | 
| 
       117 
117 
     | 
    
         
             
                       <title depth="2">A.1<tab/>Annex A.1</title>
         
     | 
| 
         @@ -122,9 +122,9 @@ RSpec.describe IsoDoc do 
     | 
|
| 
       122 
122 
     | 
    
         
             
                            <appendix id="Q2" inline-header="false" obligation="normative">
         
     | 
| 
       123 
123 
     | 
    
         
             
                       <title depth="2">Appendix 1<tab/>An Appendix</title>
         
     | 
| 
       124 
124 
     | 
    
         
             
                     </appendix>
         
     | 
| 
       125 
     | 
    
         
            -
                     </annex><bibliography><references id="R" obligation="informative" normative="true">
         
     | 
| 
      
 125 
     | 
    
         
            +
                     </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
         
     | 
| 
       126 
126 
     | 
    
         
             
                       <title depth="1">2<tab/>Normative References</title>
         
     | 
| 
       127 
     | 
    
         
            -
                     </references><clause id="S" obligation="informative">
         
     | 
| 
      
 127 
     | 
    
         
            +
                     </references><clause id="S" obligation="informative" displayorder="9">
         
     | 
| 
       128 
128 
     | 
    
         
             
                       <title depth="1">Bibliography</title>
         
     | 
| 
       129 
129 
     | 
    
         
             
                       <references id="T" obligation="informative" normative="false">
         
     | 
| 
       130 
130 
     | 
    
         
             
                       <title depth="2">Bibliography Subsection</title>
         
     | 
| 
         @@ -135,178 +135,176 @@ RSpec.describe IsoDoc do 
     | 
|
| 
       135 
135 
     | 
    
         
             
                OUTPUT
         
     | 
| 
       136 
136 
     | 
    
         | 
| 
       137 
137 
     | 
    
         
             
                html = <<~OUTPUT
         
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
      
 138 
     | 
    
         
            +
                  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
         
     | 
| 
      
 139 
     | 
    
         
            +
                       <head/>
         
     | 
| 
      
 140 
     | 
    
         
            +
                       <body lang="en">
         
     | 
| 
      
 141 
     | 
    
         
            +
                         <div class="title-section">
         
     | 
| 
      
 142 
     | 
    
         
            +
                           <p> </p>
         
     | 
| 
      
 143 
     | 
    
         
            +
                         </div>
         
     | 
| 
      
 144 
     | 
    
         
            +
                         <br/>
         
     | 
| 
      
 145 
     | 
    
         
            +
                         <div class="prefatory-section">
         
     | 
| 
      
 146 
     | 
    
         
            +
                           <p> </p>
         
     | 
| 
      
 147 
     | 
    
         
            +
                         </div>
         
     | 
| 
      
 148 
     | 
    
         
            +
                         <br/>
         
     | 
| 
      
 149 
     | 
    
         
            +
                         <div class="main-section">
         
     | 
| 
      
 150 
     | 
    
         
            +
                           <br/>
         
     | 
| 
      
 151 
     | 
    
         
            +
                           #{IEC_TITLE}
         
     | 
| 
      
 152 
     | 
    
         
            +
                              <div>
         
     | 
| 
      
 153 
     | 
    
         
            +
                                <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 154 
     | 
    
         
            +
                                <div class="boilerplate_legal"/>
         
     | 
| 
      
 155 
     | 
    
         
            +
                                <p id="A">This is a preamble</p>
         
     | 
| 
      
 156 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 157 
     | 
    
         
            +
                              <br/>
         
     | 
| 
      
 158 
     | 
    
         
            +
                              <div class="Section3" id="B">
         
     | 
| 
      
 159 
     | 
    
         
            +
                                <h1 class="IntroTitle">0  Introduction</h1>
         
     | 
| 
      
 160 
     | 
    
         
            +
                                <div id="C">
         
     | 
| 
      
 161 
     | 
    
         
            +
                         <h2>0.1  Introduction Subsection</h2>
         
     | 
| 
       143 
162 
     | 
    
         
             
                       </div>
         
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
      
 163 
     | 
    
         
            +
                                <p>This is patent boilerplate</p>
         
     | 
| 
      
 164 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 165 
     | 
    
         
            +
                              #{IEC_TITLE1}
         
     | 
| 
      
 166 
     | 
    
         
            +
                              <div id="D">
         
     | 
| 
      
 167 
     | 
    
         
            +
                                <h1>1  Scope</h1>
         
     | 
| 
      
 168 
     | 
    
         
            +
                                <p id="E">Text</p>
         
     | 
| 
      
 169 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 170 
     | 
    
         
            +
                              <div>
         
     | 
| 
      
 171 
     | 
    
         
            +
                                <h1>2  Normative References</h1>
         
     | 
| 
      
 172 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 173 
     | 
    
         
            +
                              <div id="H"><h1>3  Terms, definitions, symbols and abbreviated terms</h1>
         
     | 
| 
      
 174 
     | 
    
         
            +
                      <div id="I">
         
     | 
| 
      
 175 
     | 
    
         
            +
                         <h2>3.1  Normal Terms</h2>
         
     | 
| 
      
 176 
     | 
    
         
            +
                         <p class="TermNum" id="J">3.1.1</p>
         
     | 
| 
      
 177 
     | 
    
         
            +
                         <p class="Terms" style="text-align:left;">Term2</p>
         
     | 
| 
      
 178 
     | 
    
         
            +
                       </div><div id="K"><h2>3.2</h2>
         
     | 
| 
      
 179 
     | 
    
         
            +
                         <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
         
     | 
| 
      
 180 
     | 
    
         
            +
                       </div></div>
         
     | 
| 
      
 181 
     | 
    
         
            +
                              <div id="L" class="Symbols">
         
     | 
| 
      
 182 
     | 
    
         
            +
                                <h1>4</h1>
         
     | 
| 
      
 183 
     | 
    
         
            +
                                <dl>
         
     | 
| 
      
 184 
     | 
    
         
            +
                                  <dt>
         
     | 
| 
      
 185 
     | 
    
         
            +
                                    <p>Symbol</p>
         
     | 
| 
      
 186 
     | 
    
         
            +
                                  </dt>
         
     | 
| 
      
 187 
     | 
    
         
            +
                                  <dd>Definition</dd>
         
     | 
| 
      
 188 
     | 
    
         
            +
                                </dl>
         
     | 
| 
      
 189 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 190 
     | 
    
         
            +
                              <div id="M">
         
     | 
| 
      
 191 
     | 
    
         
            +
                                <h1>5  Clause 4</h1>
         
     | 
| 
      
 192 
     | 
    
         
            +
                                <div id="N">
         
     | 
| 
      
 193 
     | 
    
         
            +
                         <h2>5.1  Introduction</h2>
         
     | 
| 
       147 
194 
     | 
    
         
             
                       </div>
         
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
                         <br/>
         
     | 
| 
       151 
     | 
    
         
            -
                         #{IEC_TITLE}
         
     | 
| 
       152 
     | 
    
         
            -
                            <div>
         
     | 
| 
       153 
     | 
    
         
            -
                              <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
       154 
     | 
    
         
            -
                              <div class="boilerplate_legal"/>
         
     | 
| 
       155 
     | 
    
         
            -
                              <p id="A">This is a preamble</p>
         
     | 
| 
       156 
     | 
    
         
            -
                            </div>
         
     | 
| 
       157 
     | 
    
         
            -
                            <br/>
         
     | 
| 
       158 
     | 
    
         
            -
                            <div class="Section3" id="B">
         
     | 
| 
       159 
     | 
    
         
            -
                              <h1 class="IntroTitle">0  Introduction</h1>
         
     | 
| 
       160 
     | 
    
         
            -
                              <div id="C">
         
     | 
| 
       161 
     | 
    
         
            -
                       <h2>0.1  Introduction Subsection</h2>
         
     | 
| 
       162 
     | 
    
         
            -
                     </div>
         
     | 
| 
       163 
     | 
    
         
            -
                              <p>This is patent boilerplate</p>
         
     | 
| 
       164 
     | 
    
         
            -
                            </div>
         
     | 
| 
       165 
     | 
    
         
            -
                            #{IEC_TITLE1}
         
     | 
| 
       166 
     | 
    
         
            -
                            <div id="D">
         
     | 
| 
       167 
     | 
    
         
            -
                              <h1>1  Scope</h1>
         
     | 
| 
       168 
     | 
    
         
            -
                              <p id="E">Text</p>
         
     | 
| 
       169 
     | 
    
         
            -
                            </div>
         
     | 
| 
       170 
     | 
    
         
            -
                            <div>
         
     | 
| 
       171 
     | 
    
         
            -
                              <h1>2  Normative References</h1>
         
     | 
| 
       172 
     | 
    
         
            -
                            </div>
         
     | 
| 
       173 
     | 
    
         
            -
                            <div id="H"><h1>3  Terms, definitions, symbols and abbreviated terms</h1>
         
     | 
| 
       174 
     | 
    
         
            -
                    <div id="I">
         
     | 
| 
       175 
     | 
    
         
            -
                       <h2>3.1  Normal Terms</h2>
         
     | 
| 
       176 
     | 
    
         
            -
                       <p class="TermNum" id="J">3.1.1</p>
         
     | 
| 
       177 
     | 
    
         
            -
                       <p class="Terms" style="text-align:left;">Term2</p>
         
     | 
| 
       178 
     | 
    
         
            -
                  
         
     | 
| 
       179 
     | 
    
         
            -
                     </div><div id="K"><h2>3.2</h2>
         
     | 
| 
       180 
     | 
    
         
            -
                       <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
         
     | 
| 
       181 
     | 
    
         
            -
                     </div></div>
         
     | 
| 
       182 
     | 
    
         
            -
                            <div id="L" class="Symbols">
         
     | 
| 
       183 
     | 
    
         
            -
                              <h1>4</h1>
         
     | 
| 
       184 
     | 
    
         
            -
                              <dl>
         
     | 
| 
       185 
     | 
    
         
            -
                                <dt>
         
     | 
| 
       186 
     | 
    
         
            -
                                  <p>Symbol</p>
         
     | 
| 
       187 
     | 
    
         
            -
                                </dt>
         
     | 
| 
       188 
     | 
    
         
            -
                                <dd>Definition</dd>
         
     | 
| 
       189 
     | 
    
         
            -
                              </dl>
         
     | 
| 
       190 
     | 
    
         
            -
                            </div>
         
     | 
| 
       191 
     | 
    
         
            -
                            <div id="M">
         
     | 
| 
       192 
     | 
    
         
            -
                              <h1>5  Clause 4</h1>
         
     | 
| 
       193 
     | 
    
         
            -
                              <div id="N">
         
     | 
| 
       194 
     | 
    
         
            -
                       <h2>5.1  Introduction</h2>
         
     | 
| 
       195 
     | 
    
         
            -
                     </div>
         
     | 
| 
       196 
     | 
    
         
            -
                              <div id="O">
         
     | 
| 
       197 
     | 
    
         
            -
                       <h2>5.2  Clause 4.2</h2>
         
     | 
| 
       198 
     | 
    
         
            -
                     </div>
         
     | 
| 
       199 
     | 
    
         
            -
                            </div>
         
     | 
| 
       200 
     | 
    
         
            -
                            <br/>
         
     | 
| 
       201 
     | 
    
         
            -
                            <div id="P" class="Section3">
         
     | 
| 
       202 
     | 
    
         
            -
                              <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
         
     | 
| 
       203 
     | 
    
         
            -
                              <div id="Q">
         
     | 
| 
       204 
     | 
    
         
            -
                       <h2>A.1  Annex A.1</h2>
         
     | 
| 
       205 
     | 
    
         
            -
                       <div id="Q1">
         
     | 
| 
       206 
     | 
    
         
            -
                       <h3>A.1.1  Annex A.1a</h3>
         
     | 
| 
      
 195 
     | 
    
         
            +
                                <div id="O">
         
     | 
| 
      
 196 
     | 
    
         
            +
                         <h2>5.2  Clause 4.2</h2>
         
     | 
| 
       207 
197 
     | 
    
         
             
                       </div>
         
     | 
| 
       208 
     | 
    
         
            -
             
     | 
| 
       209 
     | 
    
         
            -
                              < 
     | 
| 
       210 
     | 
    
         
            -
             
     | 
| 
       211 
     | 
    
         
            -
             
     | 
| 
       212 
     | 
    
         
            -
             
     | 
| 
       213 
     | 
    
         
            -
             
     | 
| 
       214 
     | 
    
         
            -
             
     | 
| 
       215 
     | 
    
         
            -
             
     | 
| 
       216 
     | 
    
         
            -
             
     | 
| 
      
 198 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 199 
     | 
    
         
            +
                              <br/>
         
     | 
| 
      
 200 
     | 
    
         
            +
                              <div id="P" class="Section3">
         
     | 
| 
      
 201 
     | 
    
         
            +
                                <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
         
     | 
| 
      
 202 
     | 
    
         
            +
                                <div id="Q">
         
     | 
| 
      
 203 
     | 
    
         
            +
                         <h2>A.1  Annex A.1</h2>
         
     | 
| 
      
 204 
     | 
    
         
            +
                         <div id="Q1">
         
     | 
| 
      
 205 
     | 
    
         
            +
                         <h3>A.1.1  Annex A.1a</h3>
         
     | 
| 
      
 206 
     | 
    
         
            +
                         </div>
         
     | 
| 
      
 207 
     | 
    
         
            +
                       </div>
         
     | 
| 
      
 208 
     | 
    
         
            +
                                <div id="Q2">
         
     | 
| 
      
 209 
     | 
    
         
            +
                              <h2>Appendix 1  An Appendix</h2>
         
     | 
| 
      
 210 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 211 
     | 
    
         
            +
                              </div>
         
     | 
| 
      
 212 
     | 
    
         
            +
                              <br/>
         
     | 
| 
       217 
213 
     | 
    
         
             
                              <div>
         
     | 
| 
       218 
     | 
    
         
            -
                                < 
     | 
| 
      
 214 
     | 
    
         
            +
                                <h1 class="Section3">Bibliography</h1>
         
     | 
| 
      
 215 
     | 
    
         
            +
                                <div>
         
     | 
| 
      
 216 
     | 
    
         
            +
                                  <h2 class="Section3">Bibliography Subsection</h2>
         
     | 
| 
      
 217 
     | 
    
         
            +
                                </div>
         
     | 
| 
       219 
218 
     | 
    
         
             
                              </div>
         
     | 
| 
       220 
219 
     | 
    
         
             
                            </div>
         
     | 
| 
       221 
     | 
    
         
            -
                          </ 
     | 
| 
       222 
     | 
    
         
            -
             
     | 
| 
       223 
     | 
    
         
            -
             
     | 
| 
       224 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
      
 220 
     | 
    
         
            +
                          </body>
         
     | 
| 
      
 221 
     | 
    
         
            +
                      </html>
         
     | 
| 
      
 222 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
       225 
223 
     | 
    
         | 
| 
       226 
224 
     | 
    
         
             
                word = <<~OUTPUT
         
     | 
| 
       227 
     | 
    
         
            -
             
     | 
| 
       228 
     | 
    
         
            -
             
     | 
| 
       229 
     | 
    
         
            -
             
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
             
     | 
| 
       232 
     | 
    
         
            -
             
     | 
| 
       233 
     | 
    
         
            -
             
     | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
       235 
     | 
    
         
            -
             
     | 
| 
       236 
     | 
    
         
            -
             
     | 
| 
       237 
     | 
    
         
            -
             
     | 
| 
       238 
     | 
    
         
            -
             
     | 
| 
       239 
     | 
    
         
            -
             
     | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
             
     | 
| 
       242 
     | 
    
         
            -
             
     | 
| 
       243 
     | 
    
         
            -
             
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
             
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
     | 
    
         
            -
             
     | 
| 
       248 
     | 
    
         
            -
             
     | 
| 
       249 
     | 
    
         
            -
             
     | 
| 
       250 
     | 
    
         
            -
             
     | 
| 
       251 
     | 
    
         
            -
             
     | 
| 
       252 
     | 
    
         
            -
             
     | 
| 
       253 
     | 
    
         
            -
             
     | 
| 
       254 
     | 
    
         
            -
             
     | 
| 
       255 
     | 
    
         
            -
             
     | 
| 
       256 
     | 
    
         
            -
             
     | 
| 
       257 
     | 
    
         
            -
             
     | 
| 
       258 
     | 
    
         
            -
             
     | 
| 
       259 
     | 
    
         
            -
             
     | 
| 
       260 
     | 
    
         
            -
             
     | 
| 
      
 225 
     | 
    
         
            +
                      <body lang="EN-US" link="blue" vlink="#954F72">
         
     | 
| 
      
 226 
     | 
    
         
            +
                        <div class="WordSection2">
         
     | 
| 
      
 227 
     | 
    
         
            +
                          <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
         
     | 
| 
      
 228 
     | 
    
         
            +
                          #{IEC_TITLE}
         
     | 
| 
      
 229 
     | 
    
         
            +
                          <div>
         
     | 
| 
      
 230 
     | 
    
         
            +
                            <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 231 
     | 
    
         
            +
                            <div class="boilerplate_legal"/>
         
     | 
| 
      
 232 
     | 
    
         
            +
                            <p id="A">This is a preamble</p>
         
     | 
| 
      
 233 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 234 
     | 
    
         
            +
                          <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
         
     | 
| 
      
 235 
     | 
    
         
            +
                          <div class="Section3" id="B">
         
     | 
| 
      
 236 
     | 
    
         
            +
                            <h1 class="IntroTitle">0<span style="mso-tab-count:1">  </span>Introduction</h1>
         
     | 
| 
      
 237 
     | 
    
         
            +
                            <div id="C">
         
     | 
| 
      
 238 
     | 
    
         
            +
                     <h2>0.1<span style="mso-tab-count:1">  </span>Introduction Subsection</h2>
         
     | 
| 
      
 239 
     | 
    
         
            +
                   </div>
         
     | 
| 
      
 240 
     | 
    
         
            +
                            <p>This is patent boilerplate</p>
         
     | 
| 
      
 241 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 242 
     | 
    
         
            +
                          <p> </p>
         
     | 
| 
      
 243 
     | 
    
         
            +
                        </div>
         
     | 
| 
      
 244 
     | 
    
         
            +
                        <p><br clear="all" class="section"/></p>
         
     | 
| 
      
 245 
     | 
    
         
            +
                        <div class="WordSection3">
         
     | 
| 
      
 246 
     | 
    
         
            +
                        #{IEC_TITLE1}
         
     | 
| 
      
 247 
     | 
    
         
            +
                          <div id="D">
         
     | 
| 
      
 248 
     | 
    
         
            +
                            <h1>1<span style="mso-tab-count:1">  </span>Scope</h1>
         
     | 
| 
      
 249 
     | 
    
         
            +
                            <p id="E">Text</p>
         
     | 
| 
      
 250 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 251 
     | 
    
         
            +
                          <div>
         
     | 
| 
      
 252 
     | 
    
         
            +
                            <h1>2<span style="mso-tab-count:1">  </span>Normative References</h1>
         
     | 
| 
      
 253 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 254 
     | 
    
         
            +
                          <div id="H"><h1>3<span style="mso-tab-count:1">  </span>Terms, definitions, symbols and abbreviated terms</h1>
         
     | 
| 
      
 255 
     | 
    
         
            +
                  <div id="I">
         
     | 
| 
      
 256 
     | 
    
         
            +
                     <h2>3.1<span style="mso-tab-count:1">  </span>Normal Terms</h2>
         
     | 
| 
      
 257 
     | 
    
         
            +
                     <p class="TermNum" id="J">3.1.1</p>
         
     | 
| 
      
 258 
     | 
    
         
            +
                     <p class="Terms" style="text-align:left;">Term2</p>
         
     | 
| 
       261 
259 
     | 
    
         | 
| 
       262 
     | 
    
         
            -
             
     | 
| 
       263 
     | 
    
         
            -
             
     | 
| 
       264 
     | 
    
         
            -
             
     | 
| 
       265 
     | 
    
         
            -
             
     | 
| 
       266 
     | 
    
         
            -
             
     | 
| 
       267 
     | 
    
         
            -
             
     | 
| 
       268 
     | 
    
         
            -
             
     | 
| 
       269 
     | 
    
         
            -
             
     | 
| 
       270 
     | 
    
         
            -
             
     | 
| 
       271 
     | 
    
         
            -
             
     | 
| 
       272 
     | 
    
         
            -
             
     | 
| 
       273 
     | 
    
         
            -
             
     | 
| 
       274 
     | 
    
         
            -
             
     | 
| 
       275 
     | 
    
         
            -
             
     | 
| 
       276 
     | 
    
         
            -
             
     | 
| 
       277 
     | 
    
         
            -
             
     | 
| 
       278 
     | 
    
         
            -
             
     | 
| 
       279 
     | 
    
         
            -
             
     | 
| 
       280 
     | 
    
         
            -
             
     | 
| 
       281 
     | 
    
         
            -
             
     | 
| 
       282 
     | 
    
         
            -
             
     | 
| 
       283 
     | 
    
         
            -
             
     | 
| 
       284 
     | 
    
         
            -
             
     | 
| 
       285 
     | 
    
         
            -
             
     | 
| 
       286 
     | 
    
         
            -
             
     | 
| 
       287 
     | 
    
         
            -
             
     | 
| 
       288 
     | 
    
         
            -
             
     | 
| 
       289 
     | 
    
         
            -
             
     | 
| 
       290 
     | 
    
         
            -
             
     | 
| 
       291 
     | 
    
         
            -
             
     | 
| 
       292 
     | 
    
         
            -
             
     | 
| 
       293 
     | 
    
         
            -
             
     | 
| 
       294 
     | 
    
         
            -
             
     | 
| 
       295 
     | 
    
         
            -
             
     | 
| 
       296 
     | 
    
         
            -
             
     | 
| 
       297 
     | 
    
         
            -
             
     | 
| 
       298 
     | 
    
         
            -
             
     | 
| 
       299 
     | 
    
         
            -
             
     | 
| 
       300 
     | 
    
         
            -
             
     | 
| 
       301 
     | 
    
         
            -
             
     | 
| 
       302 
     | 
    
         
            -
             
     | 
| 
       303 
     | 
    
         
            -
             
     | 
| 
       304 
     | 
    
         
            -
             
     | 
| 
       305 
     | 
    
         
            -
             
     | 
| 
       306 
     | 
    
         
            -
             
     | 
| 
       307 
     | 
    
         
            -
             
     | 
| 
       308 
     | 
    
         
            -
             
     | 
| 
       309 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
      
 260 
     | 
    
         
            +
                   </div><div id="K"><h2>3.2</h2>
         
     | 
| 
      
 261 
     | 
    
         
            +
                     <table class="dl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;">Symbol</p></td><td valign="top">Definition</td></tr></table>
         
     | 
| 
      
 262 
     | 
    
         
            +
                   </div></div>
         
     | 
| 
      
 263 
     | 
    
         
            +
                          <div id="L" class="Symbols">
         
     | 
| 
      
 264 
     | 
    
         
            +
                            <h1>4</h1>
         
     | 
| 
      
 265 
     | 
    
         
            +
                            <table class="dl">
         
     | 
| 
      
 266 
     | 
    
         
            +
                              <tr>
         
     | 
| 
      
 267 
     | 
    
         
            +
                                <td valign="top" align="left">
         
     | 
| 
      
 268 
     | 
    
         
            +
                                  <p align="left" style="margin-left:0pt;text-align:left;">Symbol</p>
         
     | 
| 
      
 269 
     | 
    
         
            +
                                </td>
         
     | 
| 
      
 270 
     | 
    
         
            +
                                <td valign="top">Definition</td>
         
     | 
| 
      
 271 
     | 
    
         
            +
                              </tr>
         
     | 
| 
      
 272 
     | 
    
         
            +
                            </table>
         
     | 
| 
      
 273 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 274 
     | 
    
         
            +
                          <div id="M">
         
     | 
| 
      
 275 
     | 
    
         
            +
                            <h1>5<span style="mso-tab-count:1">  </span>Clause 4</h1>
         
     | 
| 
      
 276 
     | 
    
         
            +
                            <div id="N">
         
     | 
| 
      
 277 
     | 
    
         
            +
                     <h2>5.1<span style="mso-tab-count:1">  </span>Introduction</h2>
         
     | 
| 
      
 278 
     | 
    
         
            +
                   </div>
         
     | 
| 
      
 279 
     | 
    
         
            +
                            <div id="O">
         
     | 
| 
      
 280 
     | 
    
         
            +
                     <h2>5.2<span style="mso-tab-count:1">  </span>Clause 4.2</h2>
         
     | 
| 
      
 281 
     | 
    
         
            +
                   </div>
         
     | 
| 
      
 282 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 283 
     | 
    
         
            +
                          <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
         
     | 
| 
      
 284 
     | 
    
         
            +
                          <div id="P" class="Section3">
         
     | 
| 
      
 285 
     | 
    
         
            +
                            <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
         
     | 
| 
      
 286 
     | 
    
         
            +
                            <div id="Q">
         
     | 
| 
      
 287 
     | 
    
         
            +
                     <h2>A.1<span style="mso-tab-count:1">  </span>Annex A.1</h2>
         
     | 
| 
      
 288 
     | 
    
         
            +
                     <div id="Q1">
         
     | 
| 
      
 289 
     | 
    
         
            +
                     <h3>A.1.1<span style="mso-tab-count:1">  </span>Annex A.1a</h3>
         
     | 
| 
      
 290 
     | 
    
         
            +
                     </div>
         
     | 
| 
      
 291 
     | 
    
         
            +
                   </div>
         
     | 
| 
      
 292 
     | 
    
         
            +
                            <div id="Q2">
         
     | 
| 
      
 293 
     | 
    
         
            +
                     <h2>Appendix 1<span style="mso-tab-count:1">  </span>An Appendix</h2>
         
     | 
| 
      
 294 
     | 
    
         
            +
                   </div>
         
     | 
| 
      
 295 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 296 
     | 
    
         
            +
                          <p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
         
     | 
| 
      
 297 
     | 
    
         
            +
                          <div>
         
     | 
| 
      
 298 
     | 
    
         
            +
                            <h1 class="Section3">Bibliography</h1>
         
     | 
| 
      
 299 
     | 
    
         
            +
                            <div>
         
     | 
| 
      
 300 
     | 
    
         
            +
                              <h2 class="Section3">Bibliography Subsection</h2>
         
     | 
| 
      
 301 
     | 
    
         
            +
                            </div>
         
     | 
| 
      
 302 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 303 
     | 
    
         
            +
                        </div>
         
     | 
| 
      
 304 
     | 
    
         
            +
                        <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         
     | 
| 
      
 305 
     | 
    
         
            +
                        <div class="colophon"/>
         
     | 
| 
      
 306 
     | 
    
         
            +
                      </body>
         
     | 
| 
      
 307 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
       310 
308 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
         
     | 
| 
       311 
309 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
         
     | 
| 
       312 
310 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(word)
         
     | 
| 
         @@ -314,111 +312,109 @@ OUTPUT 
     | 
|
| 
       314 
312 
     | 
    
         | 
| 
       315 
313 
     | 
    
         
             
              it "processes subclauses with and without titles" do
         
     | 
| 
       316 
314 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       317 
     | 
    
         
            -
             
     | 
| 
       318 
     | 
    
         
            -
             
     | 
| 
       319 
     | 
    
         
            -
             
     | 
| 
       320 
     | 
    
         
            -
             
     | 
| 
       321 
     | 
    
         
            -
            <clause id="D1" obligation="normative">
         
     | 
| 
       322 
     | 
    
         
            -
             
     | 
| 
       323 
     | 
    
         
            -
             
     | 
| 
       324 
     | 
    
         
            -
            <clause id="D2" obligation="normative">
         
     | 
| 
       325 
     | 
    
         
            -
             
     | 
| 
       326 
     | 
    
         
            -
             
     | 
| 
       327 
     | 
    
         
            -
             
     | 
| 
       328 
     | 
    
         
            -
             
     | 
| 
       329 
     | 
    
         
            -
            INPUT
         
     | 
| 
       330 
     | 
    
         
            -
            <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
         
     | 
| 
       331 
     | 
    
         
            -
             
     | 
| 
       332 
     | 
    
         
            -
             
     | 
| 
       333 
     | 
    
         
            -
             
     | 
| 
       334 
     | 
    
         
            -
             
     | 
| 
       335 
     | 
    
         
            -
             
     | 
| 
       336 
     | 
    
         
            -
             
     | 
| 
       337 
     | 
    
         
            -
             
     | 
| 
       338 
     | 
    
         
            -
             
     | 
| 
       339 
     | 
    
         
            -
             
     | 
| 
       340 
     | 
    
         
            -
             
     | 
| 
       341 
     | 
    
         
            -
             
     | 
| 
       342 
     | 
    
         
            -
             
     | 
| 
       343 
     | 
    
         
            -
             
     | 
| 
       344 
     | 
    
         
            -
             
     | 
| 
       345 
     | 
    
         
            -
             
     | 
| 
       346 
     | 
    
         
            -
             
     | 
| 
       347 
     | 
    
         
            -
             
     | 
| 
       348 
     | 
    
         
            -
             
     | 
| 
       349 
     | 
    
         
            -
             
     | 
| 
       350 
     | 
    
         
            -
            </iso-standard>
         
     | 
| 
       351 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
       352 
     | 
    
         
            -
             
     | 
| 
       353 
     | 
    
         
            -
             
     | 
| 
      
 315 
     | 
    
         
            +
                        <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
      
 316 
     | 
    
         
            +
                         <sections>
         
     | 
| 
      
 317 
     | 
    
         
            +
                         <clause id="D" obligation="normative">
         
     | 
| 
      
 318 
     | 
    
         
            +
                           <title>Scope</title>
         
     | 
| 
      
 319 
     | 
    
         
            +
                  <clause id="D1" obligation="normative">
         
     | 
| 
      
 320 
     | 
    
         
            +
                           <title>Scope 1</title>
         
     | 
| 
      
 321 
     | 
    
         
            +
                           </clause>
         
     | 
| 
      
 322 
     | 
    
         
            +
                  <clause id="D2" obligation="normative">
         
     | 
| 
      
 323 
     | 
    
         
            +
                           </clause>
         
     | 
| 
      
 324 
     | 
    
         
            +
                         </clause>
         
     | 
| 
      
 325 
     | 
    
         
            +
                         </sections>
         
     | 
| 
      
 326 
     | 
    
         
            +
                         </iso-standard>
         
     | 
| 
      
 327 
     | 
    
         
            +
                INPUT
         
     | 
| 
      
 328 
     | 
    
         
            +
                  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
         
     | 
| 
      
 329 
     | 
    
         
            +
                    <sections>
         
     | 
| 
      
 330 
     | 
    
         
            +
                      <clause id='D' obligation='normative' displayorder="1">
         
     | 
| 
      
 331 
     | 
    
         
            +
                        <title depth='1'>
         
     | 
| 
      
 332 
     | 
    
         
            +
                          1
         
     | 
| 
      
 333 
     | 
    
         
            +
                          <tab/>
         
     | 
| 
      
 334 
     | 
    
         
            +
                          Scope
         
     | 
| 
      
 335 
     | 
    
         
            +
                        </title>
         
     | 
| 
      
 336 
     | 
    
         
            +
                        <clause id='D1' obligation='normative'>
         
     | 
| 
      
 337 
     | 
    
         
            +
                          <title depth='2'>
         
     | 
| 
      
 338 
     | 
    
         
            +
                            1.1
         
     | 
| 
      
 339 
     | 
    
         
            +
                            <tab/>
         
     | 
| 
      
 340 
     | 
    
         
            +
                            Scope 1
         
     | 
| 
      
 341 
     | 
    
         
            +
                          </title>
         
     | 
| 
      
 342 
     | 
    
         
            +
                        </clause>
         
     | 
| 
      
 343 
     | 
    
         
            +
                        <clause id='D2' obligation='normative'>
         
     | 
| 
      
 344 
     | 
    
         
            +
                          <title>1.2</title>
         
     | 
| 
      
 345 
     | 
    
         
            +
                        </clause>
         
     | 
| 
      
 346 
     | 
    
         
            +
                      </clause>
         
     | 
| 
      
 347 
     | 
    
         
            +
                    </sections>
         
     | 
| 
      
 348 
     | 
    
         
            +
                  </iso-standard>
         
     | 
| 
      
 349 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 350 
     | 
    
         
            +
              end
         
     | 
| 
       354 
351 
     | 
    
         | 
| 
       355 
352 
     | 
    
         
             
              it "processes simple terms & definitions" do
         
     | 
| 
       356 
     | 
    
         
            -
             
     | 
| 
       357 
     | 
    
         
            -
             
     | 
| 
       358 
     | 
    
         
            -
             
     | 
| 
       359 
     | 
    
         
            -
             
     | 
| 
       360 
     | 
    
         
            -
             
     | 
| 
       361 
     | 
    
         
            -
             
     | 
| 
       362 
     | 
    
         
            -
             
     | 
| 
       363 
     | 
    
         
            -
             
     | 
| 
       364 
     | 
    
         
            -
             
     | 
| 
       365 
     | 
    
         
            -
             
     | 
| 
       366 
     | 
    
         
            -
             
     | 
| 
      
 353 
     | 
    
         
            +
                expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
      
 354 
     | 
    
         
            +
                          <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
      
 355 
     | 
    
         
            +
                  <sections>
         
     | 
| 
      
 356 
     | 
    
         
            +
                  <terms id="H" obligation="normative"><title>1<tab/>Terms, Definitions, Symbols and Abbreviated Terms</title>
         
     | 
| 
      
 357 
     | 
    
         
            +
                    <term id="J">
         
     | 
| 
      
 358 
     | 
    
         
            +
                    <name>1.1</name>
         
     | 
| 
      
 359 
     | 
    
         
            +
                    <preferred>Term2</preferred>
         
     | 
| 
      
 360 
     | 
    
         
            +
                  </term>
         
     | 
| 
      
 361 
     | 
    
         
            +
                   </terms>
         
     | 
| 
      
 362 
     | 
    
         
            +
                   </sections>
         
     | 
| 
      
 363 
     | 
    
         
            +
                   </iso-standard>
         
     | 
| 
       367 
364 
     | 
    
         
             
                INPUT
         
     | 
| 
       368 
     | 
    
         
            -
             
     | 
| 
       369 
     | 
    
         
            -
             
     | 
| 
       370 
     | 
    
         
            -
             
     | 
| 
       371 
     | 
    
         
            -
             
     | 
| 
       372 
     | 
    
         
            -
             </div>
         
     | 
| 
       373 
     | 
    
         
            -
            #{IEC_TITLE1}
         
     | 
| 
       374 
     | 
    
         
            -
                           <div id="H"><h1>1  Terms, Definitions, Symbols and Abbreviated Terms</h1>
         
     | 
| 
       375 
     | 
    
         
            -
                   <p class="TermNum" id="J">1.1</p>
         
     | 
| 
       376 
     | 
    
         
            -
                     <p class="Terms" style="text-align:left;">Term2</p>
         
     | 
| 
      
 365 
     | 
    
         
            +
                      #{HTML_HDR}
         
     | 
| 
      
 366 
     | 
    
         
            +
                                  <div id="">
         
     | 
| 
      
 367 
     | 
    
         
            +
                     <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 368 
     | 
    
         
            +
                     <div class="boilerplate_legal"/>
         
     | 
| 
       377 
369 
     | 
    
         
             
                   </div>
         
     | 
| 
      
 370 
     | 
    
         
            +
                  #{IEC_TITLE1}
         
     | 
| 
      
 371 
     | 
    
         
            +
                                 <div id="H"><h1>1  Terms, Definitions, Symbols and Abbreviated Terms</h1>
         
     | 
| 
      
 372 
     | 
    
         
            +
                         <p class="TermNum" id="J">1.1</p>
         
     | 
| 
      
 373 
     | 
    
         
            +
                           <p class="Terms" style="text-align:left;">Term2</p>
         
     | 
| 
       378 
374 
     | 
    
         
             
                         </div>
         
     | 
| 
       379 
     | 
    
         
            -
             
     | 
| 
       380 
     | 
    
         
            -
             
     | 
| 
      
 375 
     | 
    
         
            +
                               </div>
         
     | 
| 
      
 376 
     | 
    
         
            +
                             </body>
         
     | 
| 
      
 377 
     | 
    
         
            +
                         </html>
         
     | 
| 
       381 
378 
     | 
    
         
             
                OUTPUT
         
     | 
| 
       382 
379 
     | 
    
         
             
              end
         
     | 
| 
       383 
380 
     | 
    
         | 
| 
       384 
     | 
    
         
            -
             
     | 
| 
      
 381 
     | 
    
         
            +
              it "processes inline section headers" do
         
     | 
| 
       385 
382 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       386 
     | 
    
         
            -
             
     | 
| 
       387 
     | 
    
         
            -
             
     | 
| 
       388 
     | 
    
         
            -
             
     | 
| 
       389 
     | 
    
         
            -
            <clause id="N" inline-header="false" obligation="normative">
         
     | 
| 
       390 
     | 
    
         
            -
             
     | 
| 
       391 
     | 
    
         
            -
             
     | 
| 
       392 
     | 
    
         
            -
             
     | 
| 
       393 
     | 
    
         
            -
             
     | 
| 
       394 
     | 
    
         
            -
             
     | 
| 
       395 
     | 
    
         
            -
             
     | 
| 
       396 
     | 
    
         
            -
             
     | 
| 
       397 
     | 
    
         
            -
                  </iso-standard>
         
     | 
| 
      
 383 
     | 
    
         
            +
                        <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
      
 384 
     | 
    
         
            +
                        <sections>
         
     | 
| 
      
 385 
     | 
    
         
            +
                         <clause id="M" inline-header="false" obligation="normative"><title>1<tab/>Clause 4</title>
         
     | 
| 
      
 386 
     | 
    
         
            +
                  <clause id="N" inline-header="false" obligation="normative">
         
     | 
| 
      
 387 
     | 
    
         
            +
                           <title>1.1<tab/>Introduction</title>
         
     | 
| 
      
 388 
     | 
    
         
            +
                         </clause>
         
     | 
| 
      
 389 
     | 
    
         
            +
                         <clause id="O" inline-header="true" obligation="normative">
         
     | 
| 
      
 390 
     | 
    
         
            +
                           <title>1.2<tab/>Clause 4.2</title>
         
     | 
| 
      
 391 
     | 
    
         
            +
                         </clause></clause>
         
     | 
| 
      
 392 
     | 
    
         
            +
                         </sections>
         
     | 
| 
      
 393 
     | 
    
         
            +
                        </iso-standard>
         
     | 
| 
       398 
394 
     | 
    
         
             
                INPUT
         
     | 
| 
       399 
     | 
    
         
            -
             
     | 
| 
       400 
     | 
    
         
            -
             
     | 
| 
       401 
     | 
    
         
            -
             
     | 
| 
       402 
     | 
    
         
            -
             
     | 
| 
       403 
     | 
    
         
            -
            </div>
         
     | 
| 
       404 
     | 
    
         
            -
             
     | 
| 
       405 
     | 
    
         
            -
             
     | 
| 
       406 
     | 
    
         
            -
             
     | 
| 
       407 
     | 
    
         
            -
             
     | 
| 
       408 
     | 
    
         
            -
             
     | 
| 
       409 
     | 
    
         
            -
             
     | 
| 
       410 
     | 
    
         
            -
             
     | 
| 
       411 
     | 
    
         
            -
             
     | 
| 
       412 
     | 
    
         
            -
             
     | 
| 
       413 
     | 
    
         
            -
             
     | 
| 
       414 
     | 
    
         
            -
             
     | 
| 
       415 
     | 
    
         
            -
             
     | 
| 
       416 
     | 
    
         
            -
             
     | 
| 
       417 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
       418 
     | 
    
         
            -
             
     | 
| 
      
 395 
     | 
    
         
            +
                      #{HTML_HDR}
         
     | 
| 
      
 396 
     | 
    
         
            +
                      <div id="">
         
     | 
| 
      
 397 
     | 
    
         
            +
                    <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 398 
     | 
    
         
            +
                    <div class="boilerplate_legal"/>
         
     | 
| 
      
 399 
     | 
    
         
            +
                  </div>
         
     | 
| 
      
 400 
     | 
    
         
            +
                                 #{IEC_TITLE1}
         
     | 
| 
      
 401 
     | 
    
         
            +
                                 <div id="M">
         
     | 
| 
      
 402 
     | 
    
         
            +
                                   <h1>1  Clause 4</h1>
         
     | 
| 
      
 403 
     | 
    
         
            +
                                   <div id="N">
         
     | 
| 
      
 404 
     | 
    
         
            +
                            <h2>1.1  Introduction</h2>
         
     | 
| 
      
 405 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 406 
     | 
    
         
            +
                                   <div id="O">
         
     | 
| 
      
 407 
     | 
    
         
            +
                            <span class="zzMoveToFollowing"><b>1.2  Clause 4.2  </b></span>
         
     | 
| 
      
 408 
     | 
    
         
            +
                          </div>
         
     | 
| 
      
 409 
     | 
    
         
            +
                                 </div>
         
     | 
| 
      
 410 
     | 
    
         
            +
                               </div>
         
     | 
| 
      
 411 
     | 
    
         
            +
                             </body>
         
     | 
| 
      
 412 
     | 
    
         
            +
                         </html>
         
     | 
| 
      
 413 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 414 
     | 
    
         
            +
              end
         
     | 
| 
       419 
415 
     | 
    
         | 
| 
       420 
     | 
    
         
            -
             
     | 
| 
       421 
     | 
    
         
            -
             
     | 
| 
      
 416 
     | 
    
         
            +
              it "adds colophon to published standard (Word)" do
         
     | 
| 
      
 417 
     | 
    
         
            +
                expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       422 
418 
     | 
    
         
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
       423 
419 
     | 
    
         
             
                  <bibdata>
         
     | 
| 
       424 
420 
     | 
    
         
             
                    <status>
         
     | 
| 
         @@ -429,30 +425,30 @@ OUTPUT 
     | 
|
| 
       429 
425 
     | 
    
         
             
                  <sections>
         
     | 
| 
       430 
426 
     | 
    
         
             
                  </sections>
         
     | 
| 
       431 
427 
     | 
    
         
             
                  </iso-standard>
         
     | 
| 
       432 
     | 
    
         
            -
             
     | 
| 
       433 
     | 
    
         
            -
             
     | 
| 
       434 
     | 
    
         
            -
             
     | 
| 
       435 
     | 
    
         
            -
             
     | 
| 
       436 
     | 
    
         
            -
             
     | 
| 
       437 
     | 
    
         
            -
             
     | 
| 
       438 
     | 
    
         
            -
             
     | 
| 
       439 
     | 
    
         
            -
             
     | 
| 
       440 
     | 
    
         
            -
             
     | 
| 
       441 
     | 
    
         
            -
             
     | 
| 
       442 
     | 
    
         
            -
                    </div>
         
     | 
| 
       443 
     | 
    
         
            -
                          <p> </p>
         
     | 
| 
       444 
     | 
    
         
            -
                        </div>
         
     | 
| 
       445 
     | 
    
         
            -
                        <p><br clear="all" class="section"/></p>
         
     | 
| 
       446 
     | 
    
         
            -
                        <div class="WordSection3">
         
     | 
| 
       447 
     | 
    
         
            -
                        #{IEC_TITLE1}
         
     | 
| 
      
 428 
     | 
    
         
            +
                INPUT
         
     | 
| 
      
 429 
     | 
    
         
            +
                          <body lang="EN-US" link="blue" vlink="#954F72">
         
     | 
| 
      
 430 
     | 
    
         
            +
                            <div class="WordSection2">
         
     | 
| 
      
 431 
     | 
    
         
            +
                            <p>
         
     | 
| 
      
 432 
     | 
    
         
            +
                  <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         
     | 
| 
      
 433 
     | 
    
         
            +
                        </p>
         
     | 
| 
      
 434 
     | 
    
         
            +
                        #{IEC_TITLE}
         
     | 
| 
      
 435 
     | 
    
         
            +
                            <div id="">
         
     | 
| 
      
 436 
     | 
    
         
            +
                  <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 437 
     | 
    
         
            +
                  <div class="boilerplate_legal"/>
         
     | 
| 
       448 
438 
     | 
    
         
             
                        </div>
         
     | 
| 
       449 
     | 
    
         
            -
             
     | 
| 
       450 
     | 
    
         
            -
             
     | 
| 
       451 
     | 
    
         
            -
             
     | 
| 
       452 
     | 
    
         
            -
             
     | 
| 
       453 
     | 
    
         
            -
             
     | 
| 
      
 439 
     | 
    
         
            +
                              <p> </p>
         
     | 
| 
      
 440 
     | 
    
         
            +
                            </div>
         
     | 
| 
      
 441 
     | 
    
         
            +
                            <p><br clear="all" class="section"/></p>
         
     | 
| 
      
 442 
     | 
    
         
            +
                            <div class="WordSection3">
         
     | 
| 
      
 443 
     | 
    
         
            +
                            #{IEC_TITLE1}
         
     | 
| 
      
 444 
     | 
    
         
            +
                            </div>
         
     | 
| 
      
 445 
     | 
    
         
            +
                            <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
         
     | 
| 
      
 446 
     | 
    
         
            +
                            <div class="colophon"/>
         
     | 
| 
      
 447 
     | 
    
         
            +
                          </body>
         
     | 
| 
      
 448 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 449 
     | 
    
         
            +
              end
         
     | 
| 
       454 
450 
     | 
    
         | 
| 
       455 
     | 
    
         
            -
             
     | 
| 
      
 451 
     | 
    
         
            +
              it "does not add colophon to draft standard (Word)" do
         
     | 
| 
       456 
452 
     | 
    
         
             
                expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       457 
453 
     | 
    
         
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
       458 
454 
     | 
    
         
             
                  <bibdata>
         
     | 
| 
         @@ -464,29 +460,29 @@ OUTPUT 
     | 
|
| 
       464 
460 
     | 
    
         
             
                  <sections>
         
     | 
| 
       465 
461 
     | 
    
         
             
                  </sections>
         
     | 
| 
       466 
462 
     | 
    
         
             
                  </iso-standard>
         
     | 
| 
       467 
     | 
    
         
            -
             
     | 
| 
       468 
     | 
    
         
            -
             
     | 
| 
       469 
     | 
    
         
            -
             
     | 
| 
       470 
     | 
    
         
            -
             
     | 
| 
       471 
     | 
    
         
            -
             
     | 
| 
       472 
     | 
    
         
            -
             
     | 
| 
       473 
     | 
    
         
            -
             
     | 
| 
       474 
     | 
    
         
            -
             
     | 
| 
       475 
     | 
    
         
            -
             
     | 
| 
       476 
     | 
    
         
            -
             
     | 
| 
       477 
     | 
    
         
            -
             
     | 
| 
       478 
     | 
    
         
            -
             
     | 
| 
       479 
     | 
    
         
            -
             
     | 
| 
       480 
     | 
    
         
            -
             
     | 
| 
       481 
     | 
    
         
            -
             
     | 
| 
       482 
     | 
    
         
            -
             
     | 
| 
       483 
     | 
    
         
            -
             
     | 
| 
       484 
     | 
    
         
            -
             
     | 
| 
       485 
     | 
    
         
            -
             
     | 
| 
       486 
     | 
    
         
            -
             
     | 
| 
      
 463 
     | 
    
         
            +
                INPUT
         
     | 
| 
      
 464 
     | 
    
         
            +
                           <body lang="EN-US" link="blue" vlink="#954F72">
         
     | 
| 
      
 465 
     | 
    
         
            +
                             <div class="WordSection2">
         
     | 
| 
      
 466 
     | 
    
         
            +
                                <p>
         
     | 
| 
      
 467 
     | 
    
         
            +
                    <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
         
     | 
| 
      
 468 
     | 
    
         
            +
                  </p>
         
     | 
| 
      
 469 
     | 
    
         
            +
                  #{IEC_TITLE}
         
     | 
| 
      
 470 
     | 
    
         
            +
                  <div id="">
         
     | 
| 
      
 471 
     | 
    
         
            +
                    <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 472 
     | 
    
         
            +
                    <div class="boilerplate_legal"/>
         
     | 
| 
      
 473 
     | 
    
         
            +
                  </div>
         
     | 
| 
      
 474 
     | 
    
         
            +
                  <p> </p>
         
     | 
| 
      
 475 
     | 
    
         
            +
                             </div>
         
     | 
| 
      
 476 
     | 
    
         
            +
                             <p><br clear="all" class="section"/></p>
         
     | 
| 
      
 477 
     | 
    
         
            +
                             <div class="WordSection3">
         
     | 
| 
      
 478 
     | 
    
         
            +
                               #{IEC_TITLE1}
         
     | 
| 
      
 479 
     | 
    
         
            +
                             </div>
         
     | 
| 
      
 480 
     | 
    
         
            +
                           </body>
         
     | 
| 
      
 481 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 482 
     | 
    
         
            +
              end
         
     | 
| 
       487 
483 
     | 
    
         | 
| 
       488 
     | 
    
         
            -
              it "adds boilerplate to foreword" do 
     | 
| 
       489 
     | 
    
         
            -
             
     | 
| 
      
 484 
     | 
    
         
            +
              it "adds boilerplate to foreword" do
         
     | 
| 
      
 485 
     | 
    
         
            +
                expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       490 
486 
     | 
    
         
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
       491 
487 
     | 
    
         
             
                  <bibdata>
         
     | 
| 
       492 
488 
     | 
    
         
             
                    <ext><doctype>International Standard</doctype></ext>
         
     | 
| 
         @@ -499,22 +495,22 @@ OUTPUT 
     | 
|
| 
       499 
495 
     | 
    
         
             
                  <sections/>
         
     | 
| 
       500 
496 
     | 
    
         
             
                  </iso-standard>
         
     | 
| 
       501 
497 
     | 
    
         
             
                INPUT
         
     | 
| 
       502 
     | 
    
         
            -
             
     | 
| 
       503 
     | 
    
         
            -
             
     | 
| 
       504 
     | 
    
         
            -
             
     | 
| 
       505 
     | 
    
         
            -
             
     | 
| 
       506 
     | 
    
         
            -
             
     | 
| 
       507 
     | 
    
         
            -
             
     | 
| 
       508 
     | 
    
         
            -
            </div>
         
     | 
| 
       509 
     | 
    
         
            -
             
     | 
| 
       510 
     | 
    
         
            -
             
     | 
| 
       511 
     | 
    
         
            -
             
     | 
| 
       512 
     | 
    
         
            -
             
     | 
| 
       513 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
       514 
     | 
    
         
            -
             
     | 
| 
      
 498 
     | 
    
         
            +
                      #{HTML_HDR}
         
     | 
| 
      
 499 
     | 
    
         
            +
                      <div id="">
         
     | 
| 
      
 500 
     | 
    
         
            +
                    <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 501 
     | 
    
         
            +
                    <div class="boilerplate_legal">
         
     | 
| 
      
 502 
     | 
    
         
            +
                         <p>Boilerplate</p>
         
     | 
| 
      
 503 
     | 
    
         
            +
                                  </div>
         
     | 
| 
      
 504 
     | 
    
         
            +
                  </div>
         
     | 
| 
      
 505 
     | 
    
         
            +
                                 #{IEC_TITLE1}
         
     | 
| 
      
 506 
     | 
    
         
            +
                               </div>
         
     | 
| 
      
 507 
     | 
    
         
            +
                             </body>
         
     | 
| 
      
 508 
     | 
    
         
            +
                         </html>
         
     | 
| 
      
 509 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 510 
     | 
    
         
            +
              end
         
     | 
| 
       515 
511 
     | 
    
         | 
| 
       516 
     | 
    
         
            -
             
     | 
| 
       517 
     | 
    
         
            -
             
     | 
| 
      
 512 
     | 
    
         
            +
              it "does not add boilerplate to foreword in amendments" do
         
     | 
| 
      
 513 
     | 
    
         
            +
                expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
         
     | 
| 
       518 
514 
     | 
    
         
             
                  <iso-standard xmlns="http://riboseinc.com/isoxml">
         
     | 
| 
       519 
515 
     | 
    
         
             
                  <bibdata>
         
     | 
| 
       520 
516 
     | 
    
         
             
                    <ext><doctype>Amendment</doctype></ext>
         
     | 
| 
         @@ -527,15 +523,14 @@ OUTPUT 
     | 
|
| 
       527 
523 
     | 
    
         
             
                  <sections/>
         
     | 
| 
       528 
524 
     | 
    
         
             
                  </iso-standard>
         
     | 
| 
       529 
525 
     | 
    
         
             
                INPUT
         
     | 
| 
       530 
     | 
    
         
            -
             
     | 
| 
       531 
     | 
    
         
            -
             
     | 
| 
       532 
     | 
    
         
            -
             
     | 
| 
       533 
     | 
    
         
            -
            </div>
         
     | 
| 
       534 
     | 
    
         
            -
             
     | 
| 
       535 
     | 
    
         
            -
             
     | 
| 
       536 
     | 
    
         
            -
             
     | 
| 
       537 
     | 
    
         
            -
             
     | 
| 
       538 
     | 
    
         
            -
            OUTPUT
         
     | 
| 
       539 
     | 
    
         
            -
             
     | 
| 
       540 
     | 
    
         
            -
             
     | 
| 
      
 526 
     | 
    
         
            +
                      #{HTML_HDR}
         
     | 
| 
      
 527 
     | 
    
         
            +
                      <div id="">
         
     | 
| 
      
 528 
     | 
    
         
            +
                    <h1 class="ForewordTitle">FOREWORD</h1>
         
     | 
| 
      
 529 
     | 
    
         
            +
                  </div>
         
     | 
| 
      
 530 
     | 
    
         
            +
                                 #{IEC_TITLE1}
         
     | 
| 
      
 531 
     | 
    
         
            +
                               </div>
         
     | 
| 
      
 532 
     | 
    
         
            +
                             </body>
         
     | 
| 
      
 533 
     | 
    
         
            +
                         </html>
         
     | 
| 
      
 534 
     | 
    
         
            +
                OUTPUT
         
     | 
| 
      
 535 
     | 
    
         
            +
              end
         
     | 
| 
       541 
536 
     | 
    
         
             
            end
         
     |