metanorma-standoc 1.11.3 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -31
  3. data/.gitignore +23 -0
  4. data/Gemfile +0 -1
  5. data/lib/asciidoctor/standoc/base.rb +2 -145
  6. data/lib/asciidoctor/standoc/blocks.rb +2 -238
  7. data/lib/asciidoctor/standoc/blocks_notes.rb +2 -100
  8. data/lib/asciidoctor/standoc/cleanup.rb +2 -208
  9. data/lib/asciidoctor/standoc/cleanup_amend.rb +2 -53
  10. data/lib/asciidoctor/standoc/cleanup_block.rb +2 -172
  11. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +2 -212
  12. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +2 -108
  13. data/lib/asciidoctor/standoc/cleanup_image.rb +2 -69
  14. data/lib/asciidoctor/standoc/cleanup_inline.rb +2 -189
  15. data/lib/asciidoctor/standoc/cleanup_maths.rb +2 -221
  16. data/lib/asciidoctor/standoc/cleanup_ref.rb +2 -169
  17. data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +2 -103
  18. data/lib/asciidoctor/standoc/cleanup_reqt.rb +2 -110
  19. data/lib/asciidoctor/standoc/cleanup_section.rb +2 -184
  20. data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -91
  21. data/lib/asciidoctor/standoc/cleanup_symbols.rb +2 -47
  22. data/lib/asciidoctor/standoc/cleanup_table.rb +2 -67
  23. data/lib/asciidoctor/standoc/cleanup_terms.rb +2 -139
  24. data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +2 -192
  25. data/lib/asciidoctor/standoc/cleanup_text.rb +2 -95
  26. data/lib/asciidoctor/standoc/cleanup_toc.rb +3 -0
  27. data/lib/asciidoctor/standoc/cleanup_xref.rb +2 -106
  28. data/lib/asciidoctor/standoc/converter.rb +2 -123
  29. data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +2 -56
  30. data/lib/asciidoctor/standoc/datamodel/diagram_preprocessor.rb +2 -102
  31. data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +3 -404
  32. data/lib/asciidoctor/standoc/deprecated.rb +5 -0
  33. data/lib/asciidoctor/standoc/front.rb +2 -219
  34. data/lib/asciidoctor/standoc/front_contributor.rb +2 -191
  35. data/lib/asciidoctor/standoc/inline.rb +2 -231
  36. data/lib/asciidoctor/standoc/lists.rb +2 -119
  37. data/lib/asciidoctor/standoc/macros.rb +2 -203
  38. data/lib/asciidoctor/standoc/macros_form.rb +2 -62
  39. data/lib/asciidoctor/standoc/macros_note.rb +2 -44
  40. data/lib/asciidoctor/standoc/macros_plantuml.rb +2 -112
  41. data/lib/asciidoctor/standoc/macros_terms.rb +2 -180
  42. data/lib/asciidoctor/standoc/ref.rb +2 -251
  43. data/lib/asciidoctor/standoc/ref_sect.rb +2 -153
  44. data/lib/asciidoctor/standoc/ref_utility.rb +2 -0
  45. data/lib/asciidoctor/standoc/render.rb +2 -116
  46. data/lib/asciidoctor/standoc/reqt.rb +2 -89
  47. data/lib/asciidoctor/standoc/section.rb +2 -194
  48. data/lib/asciidoctor/standoc/table.rb +2 -84
  49. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +2 -178
  50. data/lib/asciidoctor/standoc/terms.rb +2 -153
  51. data/lib/asciidoctor/standoc/utils.rb +2 -100
  52. data/lib/asciidoctor/standoc/validate.rb +2 -157
  53. data/lib/asciidoctor/standoc/validate_section.rb +2 -54
  54. data/lib/isodoc/html/htmlstyle.css +44 -29
  55. data/lib/isodoc/html/htmlstyle.scss +17 -12
  56. data/lib/metanorma/standoc/base.rb +163 -0
  57. data/lib/{asciidoctor → metanorma}/standoc/basicdoc.rng +0 -0
  58. data/lib/{asciidoctor → metanorma}/standoc/biblio.rng +2 -2
  59. data/lib/metanorma/standoc/blocks.rb +239 -0
  60. data/lib/metanorma/standoc/blocks_notes.rb +101 -0
  61. data/lib/metanorma/standoc/cleanup.rb +157 -0
  62. data/lib/metanorma/standoc/cleanup_amend.rb +54 -0
  63. data/lib/metanorma/standoc/cleanup_block.rb +173 -0
  64. data/lib/metanorma/standoc/cleanup_boilerplate.rb +213 -0
  65. data/lib/metanorma/standoc/cleanup_footnotes.rb +109 -0
  66. data/lib/metanorma/standoc/cleanup_image.rb +70 -0
  67. data/lib/metanorma/standoc/cleanup_inline.rb +190 -0
  68. data/lib/metanorma/standoc/cleanup_maths.rb +222 -0
  69. data/lib/metanorma/standoc/cleanup_ref.rb +170 -0
  70. data/lib/metanorma/standoc/cleanup_ref_dl.rb +104 -0
  71. data/lib/metanorma/standoc/cleanup_reqt.rb +111 -0
  72. data/lib/metanorma/standoc/cleanup_section.rb +212 -0
  73. data/lib/metanorma/standoc/cleanup_section_names.rb +92 -0
  74. data/lib/metanorma/standoc/cleanup_symbols.rb +48 -0
  75. data/lib/metanorma/standoc/cleanup_table.rb +68 -0
  76. data/lib/metanorma/standoc/cleanup_terms.rb +140 -0
  77. data/lib/metanorma/standoc/cleanup_terms_designations.rb +199 -0
  78. data/lib/metanorma/standoc/cleanup_text.rb +74 -0
  79. data/lib/metanorma/standoc/cleanup_toc.rb +98 -0
  80. data/lib/metanorma/standoc/cleanup_xref.rb +107 -0
  81. data/lib/metanorma/standoc/converter.rb +126 -0
  82. data/lib/metanorma/standoc/datamodel/attributes_table_preprocessor.rb +57 -0
  83. data/lib/metanorma/standoc/datamodel/diagram_preprocessor.rb +103 -0
  84. data/lib/metanorma/standoc/datamodel/plantuml_renderer.rb +409 -0
  85. data/lib/metanorma/standoc/front.rb +224 -0
  86. data/lib/metanorma/standoc/front_contributor.rb +192 -0
  87. data/lib/metanorma/standoc/inline.rb +232 -0
  88. data/lib/{asciidoctor → metanorma}/standoc/isodoc.rng +104 -3
  89. data/lib/metanorma/standoc/lists.rb +120 -0
  90. data/lib/metanorma/standoc/macros.rb +205 -0
  91. data/lib/metanorma/standoc/macros_embed.rb +72 -0
  92. data/lib/metanorma/standoc/macros_form.rb +63 -0
  93. data/lib/metanorma/standoc/macros_note.rb +45 -0
  94. data/lib/metanorma/standoc/macros_plantuml.rb +113 -0
  95. data/lib/metanorma/standoc/macros_terms.rb +194 -0
  96. data/lib/metanorma/standoc/ref.rb +243 -0
  97. data/lib/metanorma/standoc/ref_sect.rb +153 -0
  98. data/lib/{asciidoctor/standoc/ref_date_id.rb → metanorma/standoc/ref_utility.rb} +43 -5
  99. data/lib/metanorma/standoc/render.rb +115 -0
  100. data/lib/metanorma/standoc/reqt.rb +90 -0
  101. data/lib/{asciidoctor → metanorma}/standoc/reqt.rng +0 -0
  102. data/lib/metanorma/standoc/section.rb +209 -0
  103. data/lib/metanorma/standoc/table.rb +85 -0
  104. data/lib/metanorma/standoc/term_lookup_cleanup.rb +179 -0
  105. data/lib/metanorma/standoc/terms.rb +160 -0
  106. data/lib/metanorma/standoc/utils.rb +101 -0
  107. data/lib/metanorma/standoc/validate.rb +158 -0
  108. data/lib/metanorma/standoc/validate_section.rb +55 -0
  109. data/lib/metanorma/standoc/version.rb +1 -1
  110. data/lib/{asciidoctor → metanorma}/standoc/views/datamodel/model_representation.adoc.erb +0 -0
  111. data/lib/{asciidoctor → metanorma}/standoc/views/datamodel/plantuml_representation.adoc.erb +0 -0
  112. data/lib/metanorma-standoc.rb +1 -1
  113. data/metanorma-standoc.gemspec +1 -1
  114. data/spec/assets/a1.adoc +8 -0
  115. data/spec/assets/a2.adoc +8 -0
  116. data/spec/assets/a3.adoc +9 -0
  117. data/spec/assets/a4.adoc +4 -0
  118. data/spec/{asciidoctor → metanorma}/base_spec.rb +499 -407
  119. data/spec/{asciidoctor → metanorma}/blank_spec.rb +1 -1
  120. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  121. data/spec/{asciidoctor → metanorma}/cleanup_blocks_spec.rb +1 -1
  122. data/spec/{asciidoctor → metanorma}/cleanup_sections_spec.rb +1 -1
  123. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +5 -5
  124. data/spec/{asciidoctor → metanorma}/cleanup_terms_spec.rb +227 -119
  125. data/spec/{asciidoctor → metanorma}/datamodel/attributes_table_preprocessor_spec.rb +1 -1
  126. data/spec/{asciidoctor → metanorma}/datamodel/diagram_preprocessor_spec.rb +1 -1
  127. data/spec/{asciidoctor → metanorma}/inline_spec.rb +170 -1
  128. data/spec/{asciidoctor → metanorma}/isobib_cache_spec.rb +1 -1
  129. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  130. data/spec/{asciidoctor → metanorma}/macros_json2text_spec.rb +0 -0
  131. data/spec/{asciidoctor → metanorma}/macros_plantuml_spec.rb +3 -3
  132. data/spec/{asciidoctor → metanorma}/macros_spec.rb +97 -6
  133. data/spec/{asciidoctor → metanorma}/macros_yaml2text_spec.rb +0 -0
  134. data/spec/metanorma/refs_dl_spec.rb +863 -0
  135. data/spec/{asciidoctor → metanorma}/refs_spec.rb +522 -15
  136. data/spec/{asciidoctor → metanorma}/section_spec.rb +59 -1
  137. data/spec/{asciidoctor → metanorma}/table_spec.rb +1 -1
  138. data/spec/{asciidoctor → metanorma}/validate_spec.rb +2 -2
  139. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +46 -46
  140. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
  141. data/spec/vcr_cassettes/hide_refs.yml +599 -0
  142. data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
  143. data/spec/vcr_cassettes/isobib_get_123_1.yml +24 -24
  144. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +35 -35
  145. data/spec/vcr_cassettes/isobib_get_123_2001.yml +13 -13
  146. data/spec/vcr_cassettes/isobib_get_124.yml +10 -10
  147. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +18 -18
  148. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
  149. metadata +88 -32
  150. data/spec/asciidoctor/refs_dl_spec.rb +0 -864
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Standoc do
4
+ RSpec.describe Metanorma::Standoc do
5
5
  it "processes a blank document" do
6
6
  input = <<~INPUT
7
7
  #{ASCIIDOC_BLANK_HDR}
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "open3"
3
3
 
4
- RSpec.describe Asciidoctor::Standoc do
4
+ RSpec.describe Metanorma::Standoc do
5
5
  it "processes format-specific pass blocks" do
6
6
  input = <<~INPUT
7
7
  #{ASCIIDOC_BLANK_HDR}
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Standoc do
4
+ RSpec.describe Metanorma::Standoc do
5
5
  it "processes svgmap" do
6
6
  FileUtils.cp "spec/fixtures/action_schemaexpg1.svg",
7
7
  "action_schemaexpg1.svg"
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
  require "relaton_iec"
3
3
  require "fileutils"
4
4
 
5
- RSpec.describe Asciidoctor::Standoc do
5
+ RSpec.describe Metanorma::Standoc do
6
6
  it "appends any initial user-supplied text to boilerplate in terms and definitions" do
7
7
  input = <<~INPUT
8
8
  #{ASCIIDOC_BLANK_HDR}
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
  require "relaton_iec"
3
3
  require "fileutils"
4
4
 
5
- RSpec.describe Asciidoctor::Standoc do
5
+ RSpec.describe Metanorma::Standoc do
6
6
  it "applies smartquotes by default" do
7
7
  input = <<~INPUT
8
8
  #{ASCIIDOC_BLANK_HDR}
@@ -778,7 +778,7 @@ RSpec.describe Asciidoctor::Standoc do
778
778
  </sections>
779
779
  </standard-document>
780
780
  OUTPUT
781
- expect(Asciidoctor::Standoc::Converter.new(nil, *OPTIONS)
781
+ expect(Metanorma::Standoc::Converter.new(nil, *OPTIONS)
782
782
  .cleanup(Nokogiri::XML(input)).to_xml)
783
783
  .to be_equivalent_to xmlpp(output)
784
784
  end
@@ -836,7 +836,7 @@ RSpec.describe Asciidoctor::Standoc do
836
836
  </bibliography>
837
837
  </standard-document>
838
838
  OUTPUT
839
- expect(Asciidoctor::Standoc::Converter.new(nil, *OPTIONS)
839
+ expect(Metanorma::Standoc::Converter.new(nil, *OPTIONS)
840
840
  .cleanup(Nokogiri::XML(input)).to_xml)
841
841
  .to be_equivalent_to xmlpp(output)
842
842
  end
@@ -1822,7 +1822,7 @@ RSpec.describe Asciidoctor::Standoc do
1822
1822
  <stage>published</stage>
1823
1823
  </status>
1824
1824
  <copyright>
1825
- <from>2021</from>
1825
+ <from>#{Time.now.year}</from>
1826
1826
  </copyright>
1827
1827
  <ext>
1828
1828
  <doctype>article</doctype>
@@ -1865,7 +1865,7 @@ RSpec.describe Asciidoctor::Standoc do
1865
1865
  private
1866
1866
 
1867
1867
  def mock_mathml_italicise(string)
1868
- allow_any_instance_of(::Asciidoctor::Standoc::Cleanup)
1868
+ allow_any_instance_of(::Metanorma::Standoc::Cleanup)
1869
1869
  .to receive(:mathml_mi_italics).and_return(string)
1870
1870
  end
1871
1871
 
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
  require "relaton_iec"
3
3
  require "fileutils"
4
4
 
5
- RSpec.describe Asciidoctor::Standoc do
5
+ RSpec.describe Metanorma::Standoc do
6
6
  it "processes term and designation metadata and term sources" do
7
7
  input = <<~INPUT
8
8
  #{ASCIIDOC_BLANK_HDR}
@@ -705,6 +705,114 @@ RSpec.describe Asciidoctor::Standoc do
705
705
  .to be_equivalent_to xmlpp(output)
706
706
  end
707
707
 
708
+ it "differentiates stem-only and mixed terms" do
709
+ input = <<~INPUT
710
+ #{ASCIIDOC_BLANK_HDR}
711
+ == Terms and Definitions
712
+
713
+ === stem:[t_90]
714
+
715
+ Time
716
+
717
+ === stem:[t_90]-sensitivity
718
+
719
+ Sensitivity
720
+
721
+ === sensitivity to stem:[t_90]
722
+
723
+ Sensitivity #2
724
+ INPUT
725
+ output = <<~OUTPUT
726
+ #{BLANK_HDR}
727
+ <sections>
728
+ <terms id='_' obligation='normative'>
729
+ <title>Terms and definitions</title>
730
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
731
+ <term id='term-_-t90-'>
732
+ <preferred>
733
+ <letter-symbol>
734
+ <name>
735
+ <stem type='MathML'>
736
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
737
+ <msub>
738
+ <mrow>
739
+ <mi>t</mi>
740
+ </mrow>
741
+ <mrow>
742
+ <mn>90</mn>
743
+ </mrow>
744
+ </msub>
745
+ </math>
746
+ </stem>
747
+ </name>
748
+ </letter-symbol>
749
+ </preferred>
750
+ <definition>
751
+ <verbal-definition>
752
+ <p id='_'>Time</p>
753
+ </verbal-definition>
754
+ </definition>
755
+ </term>
756
+ <term id='term-t90-sensitivity'>
757
+ <preferred>
758
+ <expression>
759
+ <name>
760
+ <stem type='MathML'>
761
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
762
+ <msub>
763
+ <mrow>
764
+ <mi>t</mi>
765
+ </mrow>
766
+ <mrow>
767
+ <mn>90</mn>
768
+ </mrow>
769
+ </msub>
770
+ </math>
771
+ </stem>
772
+ -sensitivity
773
+ </name>
774
+ </expression>
775
+ </preferred>
776
+ <definition>
777
+ <verbal-definition>
778
+ <p id='_'>Sensitivity</p>
779
+ </verbal-definition>
780
+ </definition>
781
+ </term>
782
+ <term id='term-sensitivity-to-t90'>
783
+ <preferred>
784
+ <expression>
785
+ <name>
786
+ sensitivity to#{' '}
787
+ <stem type='MathML'>
788
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
789
+ <msub>
790
+ <mrow>
791
+ <mi>t</mi>
792
+ </mrow>
793
+ <mrow>
794
+ <mn>90</mn>
795
+ </mrow>
796
+ </msub>
797
+ </math>
798
+ </stem>
799
+ </name>
800
+ </expression>
801
+ </preferred>
802
+ <definition>
803
+ <verbal-definition>
804
+ <p id='_'>Sensitivity #2</p>
805
+ </verbal-definition>
806
+ </definition>
807
+ </term>
808
+ </terms>
809
+ </sections>
810
+ </standard-document>
811
+ OUTPUT
812
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
813
+ .to be_equivalent_to xmlpp(output)
814
+ end
815
+
708
816
  it "moves term domains out of the term definition paragraph" do
709
817
  input = <<~INPUT
710
818
  #{ASCIIDOC_BLANK_HDR}
@@ -1224,124 +1332,124 @@ RSpec.describe Asciidoctor::Standoc do
1224
1332
  x^2^:: Definition
1225
1333
  INPUT
1226
1334
  output = <<~OUTPUT
1227
- <standard-document xmlns='https://www.metanorma.org/ns/standoc' type='semantic' version='1.11.2'>
1228
- <bibdata type='standard'>
1229
- <title language='en' format='text/plain'>Document title</title>
1230
- <language>en</language>
1231
- <script>Latn</script>
1232
- <status>
1233
- <stage>published</stage>
1234
- </status>
1235
- <copyright>
1236
- <from>2021</from>
1237
- </copyright>
1238
- <ext>
1239
- <doctype>article</doctype>
1240
- </ext>
1241
- </bibdata>
1242
- <sections>
1243
- <terms id='_' obligation='normative'>
1244
- <title>Terms and definitions</title>
1245
- <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1246
- <term id='term-term'>
1247
- <preferred>
1248
- <expression>
1249
- <name>
1250
- Term
1251
- <index>
1252
- <primary>Term</primary>
1253
- </index>
1254
- </name>
1255
- </expression>
1256
- </preferred>
1257
- <admitted>
1258
- <letter-symbol>
1259
- <name>
1260
- <stem type='MathML'>
1261
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
1262
- <mi>&#955;</mi>
1263
- </math>
1264
- </stem>
1265
- </name>
1266
- </letter-symbol>
1267
- </admitted>
1268
- <definition>
1269
- <verbal-definition>
1270
- <p id='_'>admitted:[x]</p>
1271
- </verbal-definition>
1272
- </definition>
1273
- </term>
1274
- <term id='term-term2'>
1275
- <preferred>
1276
- <expression>
1277
- <name>
1278
- Term2
1279
- <index>
1280
- <primary>Term2</primary>
1281
- </index>
1282
- </name>
1283
- </expression>
1284
- </preferred>
1285
- <preferred>
1286
- <letter-symbol>
1287
- <name>
1288
- <stem type='MathML'>
1289
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
1290
- <msub>
1291
- <mrow>
1292
- <mi>&#956;</mi>
1293
- </mrow>
1294
- <mrow>
1295
- <mn>0</mn>
1296
- </mrow>
1297
- </msub>
1298
- <mo>/</mo>
1299
- <mn>2</mn>
1300
- </math>
1301
- </stem>
1302
- <index>
1303
- <primary>
1304
- <stem type='MathML'>
1305
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
1306
- <msub>
1307
- <mrow>
1308
- <mi>&#956;</mi>
1309
- </mrow>
1310
- <mrow>
1311
- <mn>0</mn>
1312
- </mrow>
1313
- </msub>
1314
- <mo>/</mo>
1315
- <mn>2</mn>
1316
- </math>
1317
- </stem>
1318
- </primary>
1319
- </index>
1320
- </name>
1321
- </letter-symbol>
1322
- </preferred>
1323
- </term>
1324
- </terms>
1325
- <definitions id='_' obligation='normative'>
1326
- <title>Symbols and abbreviated terms</title>
1327
- <dl id='_'>
1328
- <dt id='symbol-x2'>
1329
- x
1330
- <sup>2</sup>
1331
- <index>
1332
- <primary>
1333
- x
1334
- <sup>2</sup>
1335
- </primary>
1336
- </index>
1337
- </dt>
1338
- <dd>
1339
- <p id='_'>Definition</p>
1340
- </dd>
1341
- </dl>
1342
- </definitions>
1343
- </sections>
1344
- </standard-document>
1335
+ <standard-document xmlns='https://www.metanorma.org/ns/standoc' type='semantic' version='#{Metanorma::Standoc::VERSION}'>
1336
+ <bibdata type='standard'>
1337
+ <title language='en' format='text/plain'>Document title</title>
1338
+ <language>en</language>
1339
+ <script>Latn</script>
1340
+ <status>
1341
+ <stage>published</stage>
1342
+ </status>
1343
+ <copyright>
1344
+ <from>#{Time.now.year}</from>
1345
+ </copyright>
1346
+ <ext>
1347
+ <doctype>article</doctype>
1348
+ </ext>
1349
+ </bibdata>
1350
+ <sections>
1351
+ <terms id='_' obligation='normative'>
1352
+ <title>Terms and definitions</title>
1353
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1354
+ <term id='term-term'>
1355
+ <preferred>
1356
+ <expression>
1357
+ <name>
1358
+ Term
1359
+ <index>
1360
+ <primary>Term</primary>
1361
+ </index>
1362
+ </name>
1363
+ </expression>
1364
+ </preferred>
1365
+ <admitted>
1366
+ <expression>
1367
+ <name>x</name>
1368
+ </expression>
1369
+ </admitted>
1370
+ <admitted>
1371
+ <letter-symbol>
1372
+ <name>
1373
+ <stem type='MathML'>
1374
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1375
+ <mi>&#955;</mi>
1376
+ </math>
1377
+ </stem>
1378
+ </name>
1379
+ </letter-symbol>
1380
+ </admitted>
1381
+ </term>
1382
+ <term id='term-term2'>
1383
+ <preferred>
1384
+ <expression>
1385
+ <name>
1386
+ Term2
1387
+ <index>
1388
+ <primary>Term2</primary>
1389
+ </index>
1390
+ </name>
1391
+ </expression>
1392
+ </preferred>
1393
+ <preferred>
1394
+ <letter-symbol>
1395
+ <name>
1396
+ <stem type='MathML'>
1397
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1398
+ <msub>
1399
+ <mrow>
1400
+ <mi>&#956;</mi>
1401
+ </mrow>
1402
+ <mrow>
1403
+ <mn>0</mn>
1404
+ </mrow>
1405
+ </msub>
1406
+ <mo>/</mo>
1407
+ <mn>2</mn>
1408
+ </math>
1409
+ </stem>
1410
+ <index>
1411
+ <primary>
1412
+ <stem type='MathML'>
1413
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
1414
+ <msub>
1415
+ <mrow>
1416
+ <mi>&#956;</mi>
1417
+ </mrow>
1418
+ <mrow>
1419
+ <mn>0</mn>
1420
+ </mrow>
1421
+ </msub>
1422
+ <mo>/</mo>
1423
+ <mn>2</mn>
1424
+ </math>
1425
+ </stem>
1426
+ </primary>
1427
+ </index>
1428
+ </name>
1429
+ </letter-symbol>
1430
+ </preferred>
1431
+ </term>
1432
+ </terms>
1433
+ <definitions id='_' obligation='normative'>
1434
+ <title>Symbols and abbreviated terms</title>
1435
+ <dl id='_'>
1436
+ <dt id='symbol-x2'>
1437
+ x
1438
+ <sup>2</sup>
1439
+ <index>
1440
+ <primary>
1441
+ x
1442
+ <sup>2</sup>
1443
+ </primary>
1444
+ </index>
1445
+ </dt>
1446
+ <dd>
1447
+ <p id='_'>Definition</p>
1448
+ </dd>
1449
+ </dl>
1450
+ </definitions>
1451
+ </sections>
1452
+ </standard-document>
1345
1453
  OUTPUT
1346
1454
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1347
1455
  .to be_equivalent_to xmlpp(output)
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
5
+ RSpec.describe Metanorma::Standoc::Datamodel::AttributesTablePreprocessor do
6
6
  describe "#process" do
7
7
  context "when simple models without relations" do
8
8
  let(:datamodel_file) do
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- RSpec.describe Asciidoctor::Standoc::Datamodel::DiagramPreprocessor do
5
+ RSpec.describe Metanorma::Standoc::Datamodel::DiagramPreprocessor do
6
6
  describe "#process" do
7
7
  context "when simple models without relations" do
8
8
  let(:datamodel_file) do