Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Jan 23, 2023
1 parent 1ec0dfe commit fbf86a8
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 295 deletions.
2 changes: 1 addition & 1 deletion lib/metanorma/ieee/cleanup_ref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def designator_or_name(bib)

def designator_docid(bib)
n = bib.at("./docidentifier[@primary]") ||
bib.at("./docidentifier[not(#{OTHERIDS})]")
bib.at("./docidentifier[not(#{skip_docid})]")
n or return "ZZZZ"
@isodoc.docid_prefix(n["type"], n.children.to_xml)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/ieee/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Metanorma
module IEEE
VERSION = "1.0.3".freeze
VERSION = "1.0.4".freeze
end
end
54 changes: 27 additions & 27 deletions spec/isodoc/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,73 +235,73 @@
<thead>
<tr>
<td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: left">Description</p>
<p class="IEEEStdsTableColumnHead" style="text-align: left;page-break-after:avoid">Description</p>
</td>
<td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: center">Rice sample</p>
<p class="IEEEStdsTableColumnHead" style="text-align: center;page-break-after:avoid">Rice sample</p>
</td>
</tr>
<tr>
<td align="left" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: left">Arborio</p>
<p class="IEEEStdsTableColumnHead" style="text-align: left;page-break-after:avoid">Arborio</p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: center">
<p class="IEEEStdsTableColumnHead" style="text-align: center;page-break-after:avoid">
Drago
<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div><a name="ftntableD-1a" id="ftntableD-1a"/><span><span class="TableFootnoteRef"><a name="tableD-1a" id="tableD-1a"/>a</span><span style="mso-tab-count:1">  </span></span><p class="IEEEStdsParagraph"><a name="_" id="_"/>Parboiled rice.</p></div></aside></p>
<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div style="page-break-after:avoid"><a name="ftntableD-1a" id="ftntableD-1a"/><span><span class="TableFootnoteRef"><a name="tableD-1a" id="tableD-1a"/>a</span><span style="mso-tab-count:1">  </span></span><p style="page-break-after:avoid" class="IEEEStdsParagraph"><a name="_" id="_"/>Parboiled rice.</p></div></aside></p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: center">
<p class="IEEEStdsTableColumnHead" style="text-align: center;page-break-after:avoid">
Balilla
<a href="#tableD-1a" class="TableFootnoteRef">a</a></p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:avoid;">
<p class="IEEEStdsTableColumnHead" style="text-align: center">Thaibonnet</p>
<p class="IEEEStdsTableColumnHead" style="text-align: center;page-break-after:avoid">Thaibonnet</p>
</td>
</tr>
</thead>
<tbody>
<tr>
<th align="left" style="font-weight:bold;border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableLineHead" style="text-align: left">Number of laboratories retained after eliminating outliers</p>
<p class="IEEEStdsTableLineSubhead" style="text-align: left">
<p class="IEEEStdsTableLineHead" style="text-align: left;page-break-after:avoid">Number of laboratories retained after eliminating outliers</p>
<p class="IEEEStdsTableLineSubhead" style="text-align: left;page-break-after:avoid">
Laboratory count</p>
</th>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableData-Center" style="text-align: center">13</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:avoid">13</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableData-Center" style="text-align: center">11</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:avoid">11</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableData-Center" style="text-align: center">13</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:avoid">13</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;page-break-after:avoid;">
<p class="IEEEStdsTableData-Center" style="text-align: center">13</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:avoid">13</p>
</td>
</tr>
<tr>
<td align="left" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Left" style="text-align: left">Mean value, g/100 g</p>
<p class="IEEEStdsTableData-Left" style="text-align: left;page-break-after:auto">Mean value, g/100 g</p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">81,2</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">81,2</p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">82,0</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">82,0</p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">81,8</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">81,8</p>
</td>
<td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">77,7</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">77,7</p>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Left" style="text-align: left">
<p class="IEEEStdsTableData-Left" style="text-align: left;page-break-after:auto">
Reproducibility limit,
<span class="stem"><oMath><r><t>R</t></r></oMath></span>
(= 2,83
Expand All @@ -310,16 +310,16 @@
</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">2,89</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">2,89</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">0,57</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">0,57</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">2,26</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">2,26</p>
</td>
<td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;page-break-after:auto;">
<p class="IEEEStdsTableData-Center" style="text-align: center">6,06</p>
<p class="IEEEStdsTableData-Center" style="text-align: center;page-break-after:auto">6,06</p>
</td>
</tr>
</tfoot>
Expand All @@ -336,7 +336,7 @@
</div>
</div>
WORD
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new({})
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
expect(xmlpp(Nokogiri::XML(IsoDoc::IEEE::HtmlConvert.new({})
.convert("test", presxml, true))
Expand Down Expand Up @@ -528,7 +528,7 @@
</div>
</div>
OUTPUT
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new({})
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true).gsub(/&lt;/, "&#x3c;")))
.to be_equivalent_to xmlpp(presxml)
expect(xmlpp(strip_guid(Nokogiri::XML(IsoDoc::IEEE::HtmlConvert.new({})
Expand Down Expand Up @@ -643,7 +643,7 @@
</div>
</body>
OUTPUT
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new({})
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true).gsub(/&lt;/, "&#x3c;")))
.to be_equivalent_to xmlpp(presxml)
expect(xmlpp(Nokogiri::XML(IsoDoc::IEEE::HtmlConvert.new({})
Expand Down Expand Up @@ -1061,7 +1061,7 @@
</clause>
OUTPUT
expect(xmlpp(Nokogiri::XML(
IsoDoc::IEEE::PresentationXMLConvert.new({})
IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true),
).at("//xmlns:clause[@id = 'A']").to_xml))
.to be_equivalent_to xmlpp(presxml)
Expand Down
32 changes: 16 additions & 16 deletions spec/isodoc/inline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe IsoDoc::IEEE do
it "processes eref content" do
output = IsoDoc::IEEE::PresentationXMLConvert.new({})
output = IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", <<~"INPUT", true)
<iso-standard xmlns="http://riboseinc.com/isoxml">
<preface>
Expand Down Expand Up @@ -99,20 +99,20 @@
</locality>
IEV, 1-2-3
</eref>
<eref bibitemid='ISO712' citeas='ISO 712' type='inline'>ISO 712</eref>
<eref bibitemid='ISO712' type='inline'>ISO 712</eref>
<eref bibitemid='ISO712' citeas='ISO 712' type='inline'>ISO&#xa0;712</eref>
<eref bibitemid='ISO712' type='inline'>ISO&#xa0;712</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='table'>
<referenceFrom>1</referenceFrom>
</locality>
ISO 712, Table 1
ISO&#xa0;712, Table 1
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='table'>
<referenceFrom>1</referenceFrom>
<referenceTo>1</referenceTo>
</locality>
ISO 712, Table 1&#x2013;1
ISO&#xa0;712, Table 1&#x2013;1
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='clause'>
Expand All @@ -121,7 +121,7 @@
<locality type='table'>
<referenceFrom>1</referenceFrom>
</locality>
ISO 712, Clause 1, Table 1
ISO&#xa0;712, Clause 1, Table 1
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='clause'>
Expand All @@ -130,19 +130,19 @@
<locality type='list'>
<referenceFrom>a</referenceFrom>
</locality>
ISO 712, Clause 1, List a)
ISO&#xa0;712, Clause 1, List a)
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='clause'>
<referenceFrom>1</referenceFrom>
</locality>
ISO 712, Clause 1
ISO&#xa0;712, Clause 1
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='clause'>
<referenceFrom>1.5</referenceFrom>
</locality>
ISO 712, 1.5
ISO&#xa0;712, 1.5
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='table'>
Expand All @@ -152,16 +152,16 @@
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='whole'/>
ISO 712, Whole of text
ISO&#xa0;712, Whole of text
</eref>
<eref bibitemid='ISO712' type='inline'>
<locality type='locality:prelude'>
<referenceFrom>7</referenceFrom>
</locality>
ISO 712, Prelude 7
ISO&#xa0;712, Prelude 7
</eref>
<eref bibitemid='ISO712' citeas='ISO 712' type='inline'>A</eref>
<eref bibitemid='ISO712' citeas='ISO/IEC DIR 1' type='inline'>ISO/IEC DIR 1</eref>
<eref bibitemid='ISO712' citeas='ISO/IEC DIR 1' type='inline'>ISO/IEC&#xa0;DIR&#xa0;1</eref>
</p>
</foreword>
</preface>
Expand All @@ -175,8 +175,8 @@
<bibitem id='ISO712' type='standard'>
<formattedref>Cereals and cereal products.</formattedref>
<title format='text/plain'>Cereals and cereal products</title>
<docidentifier>ISO 712</docidentifier>
<biblio-tag>ISO 712, </biblio-tag>
<docidentifier>ISO&#xa0;712</docidentifier>
<biblio-tag>ISO&#xa0;712, </biblio-tag>
</bibitem>
</references>
</bibliography>
Expand Down Expand Up @@ -249,7 +249,7 @@
</p>
</itu-standard>
OUTPUT
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new({})
expect(xmlpp(IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
end

Expand Down Expand Up @@ -378,7 +378,7 @@
</p>
</foreword>
OUTPUT
xml = Nokogiri::XML(IsoDoc::IEEE::PresentationXMLConvert.new({})
xml = Nokogiri::XML(IsoDoc::IEEE::PresentationXMLConvert.new(presxml_options)
.convert("test", input, true))
expect(xmlpp(xml.at("//xmlns:foreword").to_xml))
.to be_equivalent_to xmlpp(presxml)
Expand Down
Loading

0 comments on commit fbf86a8

Please sign in to comment.