isodoc 1.8.0 → 1.8.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -100,16 +100,19 @@ locality: {
100
100
  formula: Formula
101
101
  }
102
102
  grammar_abbrevs:
103
- masculine: masc
104
- feminine: fem
105
- neuter: neut
103
+ masculine: m
104
+ feminine: f
105
+ neuter: n
106
106
  common: common
107
+ singular: sg
108
+ dual: dual
109
+ pl: pl
107
110
  isPreposition: prep
108
111
  isParticiple: part
109
112
  isAdjective: adj
110
113
  isAdverb: adv
111
- isNoun: n
112
- isVerb: v
114
+ isNoun: noun
115
+ isVerb: verb
113
116
  relatedterms:
114
117
  deprecates: deprecates
115
118
  supersedes: supersedes
@@ -100,6 +100,9 @@ grammar_abbrevs:
100
100
  feminine: fem
101
101
  neuter: neut
102
102
  common: epicen@
103
+ singular: sg
104
+ dual: dual
105
+ plural: pl
103
106
  isPreposition: prep
104
107
  isParticiple: part
105
108
  isAdjective: adj
@@ -97,6 +97,9 @@ grammar_abbrevs:
97
97
  feminine: fem
98
98
  neuter: neut
99
99
  common: épicène
100
+ singular: sg
101
+ dual: duel
102
+ plural: pl
100
103
  isPreposition: prép
101
104
  isParticiple: part
102
105
  isAdjective: adj
@@ -103,6 +103,9 @@ grammar_abbrevs:
103
103
  feminine: жен
104
104
  neuter: ср
105
105
  common: общего рода
106
+ singular: ед
107
+ dual: дв
108
+ plural: мн
106
109
  isPreposition: предл
107
110
  isParticiple: прич
108
111
  isAdjective: прил
@@ -98,6 +98,9 @@ grammar_abbrevs:
98
98
  feminine: 阴性
99
99
  neuter: 中性的
100
100
  common: 通性
101
+ singular: 单数
102
+ dual: 双
103
+ plural: 复数
101
104
  isPreposition: 介词
102
105
  isParticiple: 分词
103
106
  isAdjective: 形容词
@@ -809,8 +809,11 @@ RSpec.describe IsoDoc do
809
809
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
810
810
  .convert("test", input, true)
811
811
  .gsub(/</, "<")
812
- .gsub(%r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile')
813
- )).to be_equivalent_to xmlpp(presxml.gsub(%r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile'))
812
+ .gsub(%r{data:application/x-msmetafile[^"']+},
813
+ "data:application/x-msmetafile")))
814
+ .to be_equivalent_to xmlpp(presxml
815
+ .gsub(%r{data:application/x-msmetafile[^"']+},
816
+ "data:application/x-msmetafile"))
814
817
  expect(xmlpp(strip_guid(IsoDoc::HtmlConvert.new({})
815
818
  .convert("test", presxml, true)))).to be_equivalent_to xmlpp(html)
816
819
  expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
@@ -900,9 +903,11 @@ RSpec.describe IsoDoc do
900
903
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
901
904
  .convert("test", input, true)
902
905
  .gsub(/</, "<")
903
- .gsub(%r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile')))
906
+ .gsub(%r{data:application/x-msmetafile[^"']+},
907
+ "data:application/x-msmetafile")))
904
908
  .to be_equivalent_to xmlpp(presxml
905
- .gsub( %r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile'))
909
+ .gsub(%r{data:application/x-msmetafile[^"']+},
910
+ "data:application/x-msmetafile"))
906
911
  expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
907
912
  .convert("test", presxml, true)
908
913
  .gsub(/['"][^'".]+(?<!odf1)(?<!odf)\.emf['"]/, "'_.emf'")
@@ -991,9 +996,11 @@ RSpec.describe IsoDoc do
991
996
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
992
997
  .convert("test", input, true)
993
998
  .gsub(/&lt;/, "&#x3c;")
994
- .gsub(%r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile')))
999
+ .gsub(%r{data:application/x-msmetafile[^"']+},
1000
+ "data:application/x-msmetafile")))
995
1001
  .to be_equivalent_to xmlpp(presxml
996
- .gsub( %r{data:application/x-msmetafile[^"']+}, 'data:application/x-msmetafile'))
1002
+ .gsub(%r{data:application/x-msmetafile[^"']+},
1003
+ "data:application/x-msmetafile"))
997
1004
  expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
998
1005
  .convert("test", presxml, true)
999
1006
  .gsub(/['"][^'".]+(?<!odf1)(?<!odf)\.svg['"]/, "'_.svg'")
@@ -2521,8 +2528,7 @@ RSpec.describe IsoDoc do
2521
2528
  .convert("test", input, true))
2522
2529
  .sub(%r{<localized-strings>.*</localized-strings>}m, "")
2523
2530
  .gsub(%r{"\.\\}, '"./')
2524
- .gsub(%r{'\.\\}, "'./")
2525
- )
2531
+ .gsub(%r{'\.\\}, "'./"))
2526
2532
  .to be_equivalent_to xmlpp(output)
2527
2533
  end
2528
2534
 
@@ -88,7 +88,7 @@ RSpec.describe IsoDoc do
88
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
- <preferred>Term2</preferred>
91
+ <preferred><strong>Term2</strong></preferred>
92
92
  </term>
93
93
  </terms>
94
94
  <definitions id="K"><title>3.2.</title>
@@ -159,7 +159,7 @@ RSpec.describe IsoDoc do
159
159
  <div id="I">
160
160
  <h2>3.1.&#160; Normal Terms</h2>
161
161
  <p class="TermNum" id="J">3.1.1.</p>
162
- <p class="Terms" style="text-align:left;">Term2</p>
162
+ <p class="Terms" style="text-align:left;"><b>Term2</b></p>
163
163
  </div><div id="K"><h2>3.2.</h2>
164
164
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
165
165
  </div></div>
@@ -211,7 +211,7 @@ RSpec.describe IsoDoc do
211
211
  end
212
212
 
213
213
  it "defaults to English" do
214
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
214
+ input = <<~INPUT
215
215
  <iso-standard xmlns="http://riboseinc.com/isoxml">
216
216
  <bibdata>
217
217
  <language>tlh</language>
@@ -275,6 +275,7 @@ RSpec.describe IsoDoc do
275
275
  </bibliography>
276
276
  </iso-standard>
277
277
  INPUT
278
+ output = <<~OUTPUT
278
279
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
279
280
  <bibdata>
280
281
  <language current="true">tlh</language>
@@ -295,7 +296,7 @@ RSpec.describe IsoDoc do
295
296
  <clause id="H" obligation="normative" displayorder="5"><title depth="1">3.<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
296
297
  <title depth="2">3.1.<tab/>Normal Terms</title>
297
298
  <term id="J"><name>3.1.1.</name>
298
- <preferred>Term2</preferred>
299
+ <preferred><strong>Term2</strong></preferred>
299
300
  </term>
300
301
  </terms>
301
302
  <definitions id="K"><title>3.2.</title>
@@ -336,6 +337,10 @@ RSpec.describe IsoDoc do
336
337
  </bibliography>
337
338
  </iso-standard>
338
339
  OUTPUT
340
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
341
+ .convert("test", input, true)
342
+ .sub(%r{<localized-strings>.*</localized-strings>}m, "")))
343
+ .to be_equivalent_to xmlpp(output)
339
344
  end
340
345
 
341
346
  it "processes French" do
@@ -425,7 +430,7 @@ RSpec.describe IsoDoc do
425
430
  <clause id="H" obligation="normative" displayorder="5"><title depth="1">3.<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
426
431
  <title depth="2">3.1.<tab/>Normal Terms</title>
427
432
  <term id="J"><name>3.1.1.</name>
428
- <preferred>Term2</preferred>
433
+ <preferred><strong>Term2</strong></preferred>
429
434
  </term>
430
435
  </terms>
431
436
  <definitions id="K"><title>3.2.</title>
@@ -496,7 +501,7 @@ RSpec.describe IsoDoc do
496
501
  <div id="I">
497
502
  <h2>3.1.&#160; Normal Terms</h2>
498
503
  <p class="TermNum" id="J">3.1.1.</p>
499
- <p class="Terms" style="text-align:left;">Term2</p>
504
+ <p class="Terms" style="text-align:left;"><b>Term2</b></p>
500
505
  </div><div id="K"><h2>3.2.</h2>
501
506
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
502
507
  </div></div>
@@ -644,7 +649,7 @@ RSpec.describe IsoDoc do
644
649
  <clause id="H" obligation="normative" displayorder="5"><title depth="1">3.<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
645
650
  <title depth="2">3.1.<tab/>Normal Terms</title>
646
651
  <term id="J"><name>3.1.1.</name>
647
- <preferred>Term2</preferred>
652
+ <preferred><strong>Term2</strong></preferred>
648
653
  </term>
649
654
  </terms>
650
655
  <definitions id="K"><title>3.2.</title>
@@ -728,7 +733,7 @@ RSpec.describe IsoDoc do
728
733
  <div id="I">
729
734
  <h2>3.1.&#12288;Normal Terms</h2>
730
735
  <p class="TermNum" id="J">3.1.1.</p>
731
- <p class="Terms" style="text-align:left;">Term2</p>
736
+ <p class="Terms" style="text-align:left;"><b>Term2</b></p>
732
737
  </div><div id="K"><h2>3.2.</h2>
733
738
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
734
739
  </div></div>
@@ -896,7 +901,7 @@ RSpec.describe IsoDoc do
896
901
  <clause id="H" obligation="normative" displayorder="5"><title depth="1">3.<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
897
902
  <title depth="2">3.1.<tab/>Normal Terms</title>
898
903
  <term id="J"><name>3.1.1.</name>
899
- <preferred>Term2</preferred>
904
+ <preferred><strong>Term2</strong></preferred>
900
905
  </term>
901
906
  </terms>
902
907
  <definitions id="K"><title>3.2.</title>
@@ -1002,7 +1007,7 @@ RSpec.describe IsoDoc do
1002
1007
  <div id='I'>
1003
1008
  <h2>3.1.&#160; Normal Terms</h2>
1004
1009
  <p class='TermNum' id='J'>3.1.1.</p>
1005
- <p class='Terms' style='text-align:left;'>Term2</p>
1010
+ <p class='Terms' style='text-align:left;'><b>Term2</b></p>
1006
1011
  </div>
1007
1012
  <div id='K'>
1008
1013
  <h2>3.2.</h2>
@@ -636,11 +636,10 @@ RSpec.describe IsoDoc do
636
636
  <expression>
637
637
  <name>Second Term</name>
638
638
  </expression>
639
+ <field-of-application>Field</field-of-application>
640
+ <usage-info>Usage Info 1</usage-info>
639
641
  </preferred>
640
- <usageinfo>
641
- <p id='B'>Usage Info 1.</p>
642
- </usageinfo>
643
- <definition><verbaldefinition>Definition 1</verbaldefinition></definition>
642
+ <definition><verbal-definition>Definition 1</verbal-definition></definition>
644
643
  </term>
645
644
  <term id="C">
646
645
  <preferred language='fr' script='Latn' type='prefix'>
@@ -658,49 +657,40 @@ RSpec.describe IsoDoc do
658
657
  </preferred>
659
658
  <xref target='second'/>
660
659
  </related>
661
- <definition><verbaldefinition>Definition 2</verbaldefinition></definition>
660
+ <definition><verbal-definition>Definition 2</verbal-definition></definition>
662
661
  </term>
663
662
  </terms>
664
663
  </sections>
665
664
  </iso-standard>
666
665
  INPUT
667
666
  output = <<~OUTPUT
668
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
669
- <sections>
670
- <terms id='A' obligation='normative' displayorder='1'>
671
- <title depth='1'>
672
- 1.
673
- <tab/>
674
- Terms and definitions
675
- </title>
676
- <term id='second'>
677
- <name>1.1.</name>
678
- <preferred>Second Term</preferred>
679
- <usageinfo>
680
- <p id='B'>Usage Info 1.</p>
681
- </usageinfo>
682
- <definition>Definition 1</definition>
683
- </term>
684
- <term id='C'>
685
- <name>1.2.</name>
686
- <preferred language='fr' script='Latn' type='prefix'>First Designation</preferred>
687
- <p>
688
- <strong>CONTRAST:</strong>
689
- <em>
690
- <preferred>Fifth Designation neut</preferred>
691
- </em>
692
- (
693
- <xref target='second'>Clause 1.1</xref>
694
- )
695
- </p>
696
- <definition>Definition 2</definition>
697
- </term>
698
- </terms>
699
- </sections>
700
- </iso-standard>
667
+ <?xml version='1.0'?>
668
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
669
+ <sections>
670
+ <terms id='A' obligation='normative' displayorder='1'>
671
+ <title depth='1'>1.<tab/>Terms and definitions</title>
672
+ <term id='second'>
673
+ <name>1.1.</name>
674
+ <preferred><strong>Second Term, &#x3c;Field, Usage Info 1&#x3e;</strong></preferred>
675
+ <definition>Definition 1</definition>
676
+ </term>
677
+ <term id='C'>
678
+ <name>1.2.</name>
679
+ <preferred language='fr' script='Latn' type='prefix'><strong>First Designation</strong></preferred>
680
+ <p>
681
+ <strong>CONTRAST:</strong>
682
+ <em>
683
+ <preferred><strong>Fifth Designation</strong>, n</preferred>
684
+ </em> (<xref target='second'>Clause 1.1</xref>)
685
+ </p>
686
+ <definition>Definition 2</definition>
687
+ </term>
688
+ </terms>
689
+ </sections>
690
+ </iso-standard>
701
691
  OUTPUT
702
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
703
- .convert("test", input, true))).to be_equivalent_to xmlpp(output)
692
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
693
+ .convert("test", input, true))).to be_equivalent_to xmlpp(output)
704
694
  end
705
695
 
706
696
  it "processes embedded inline formatting" do
@@ -802,9 +792,9 @@ RSpec.describe IsoDoc do
802
792
  <iso-standard xmlns="http://riboseinc.com/isoxml">
803
793
  <preface><foreword>
804
794
  <p>
805
- <link updatetype="true" target="http://example.com"/>
806
- <link updatetype="true" target="list.adoc">example</link>
807
- <link updatetype="true" target="list" alt="tip">example</link>
795
+ <link update-type="true" target="http://example.com"/>
796
+ <link update-type="true" target="list.adoc">example</link>
797
+ <link update-type="true" target="list" alt="tip">example</link>
808
798
  </p>
809
799
  </foreword></preface>
810
800
  <sections>