metanorma-standoc 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/lib/isodoc/html/htmlstyle.css +25 -19
- data/lib/isodoc/html/htmlstyle.scss +7 -2
- data/lib/metanorma/standoc/base.rb +14 -0
- data/lib/metanorma/standoc/cleanup.rb +12 -1
- data/lib/metanorma/standoc/converter.rb +1 -0
- data/lib/metanorma/standoc/macros_terms.rb +13 -0
- data/lib/metanorma/standoc/version.rb +1 -1
- data/spec/metanorma/base_spec.rb +440 -413
- data/spec/metanorma/cleanup_terms_spec.rb +203 -203
- data/spec/metanorma/macros_spec.rb +2 -0
- data/spec/metanorma/refs_spec.rb +101 -6
- data/spec/vcr_cassettes/hide_refs.yml +599 -0
- metadata +3 -2
@@ -723,91 +723,91 @@ RSpec.describe Metanorma::Standoc do
|
|
723
723
|
Sensitivity #2
|
724
724
|
INPUT
|
725
725
|
output = <<~OUTPUT
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
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
811
|
OUTPUT
|
812
812
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
813
813
|
.to be_equivalent_to xmlpp(output)
|
@@ -1332,124 +1332,124 @@ RSpec.describe Metanorma::Standoc do
|
|
1332
1332
|
x^2^:: Definition
|
1333
1333
|
INPUT
|
1334
1334
|
output = <<~OUTPUT
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
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>λ</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>μ</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>μ</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>
|
1453
1453
|
OUTPUT
|
1454
1454
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1455
1455
|
.to be_equivalent_to xmlpp(output)
|
@@ -6,6 +6,7 @@ RSpec.describe Metanorma::Standoc do
|
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
preferred:[term0]
|
8
8
|
alt:[term1]
|
9
|
+
admitted:[term1a]
|
9
10
|
deprecated:[term2]
|
10
11
|
domain:[term3]
|
11
12
|
inherit:[<<ref1>>]
|
@@ -23,6 +24,7 @@ RSpec.describe Metanorma::Standoc do
|
|
23
24
|
<title>Foreword</title>
|
24
25
|
<preferred><expression><name>term0</name></expression></preferred>
|
25
26
|
<admitted><expression><name>term1</name></expression></admitted>
|
27
|
+
<admitted><expression><name>term1a</name></expression></admitted>
|
26
28
|
<deprecates><expression><name>term2</name></expression></deprecates>
|
27
29
|
<domain>term3</domain>
|
28
30
|
<inherit>
|
data/spec/metanorma/refs_spec.rb
CHANGED
@@ -1252,13 +1252,108 @@ RSpec.describe Metanorma::Standoc do
|
|
1252
1252
|
</references>
|
1253
1253
|
<references id='_' normative='false' obligation='informative'>
|
1254
1254
|
<title>Bibliography</title>
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1255
|
+
<bibitem id='iso125' type='standard' hidden='true'>
|
1256
|
+
<fetched/>
|
1257
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Natural rubber latex concentrate</title>
|
1258
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Determination of alkalinity</title>
|
1259
|
+
<title type='main' format='text/plain' language='en' script='Latn'>
|
1260
|
+
Natural rubber latex concentrate — Determination of
|
1261
|
+
alkalinity
|
1262
|
+
</title>
|
1263
|
+
<uri type='src'>https://www.iso.org/standard/72849.html</uri>
|
1264
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1265
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1266
|
+
<docidentifier type='ISO'>ISO 125</docidentifier>
|
1267
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7:en</docidentifier>
|
1268
|
+
<docnumber>125</docnumber>
|
1269
|
+
<contributor>
|
1270
|
+
<role type='publisher'/>
|
1271
|
+
<organization>
|
1272
|
+
<name>International Organization for Standardization</name>
|
1273
|
+
<abbreviation>ISO</abbreviation>
|
1274
|
+
<uri>www.iso.org</uri>
|
1275
|
+
</organization>
|
1276
|
+
</contributor>
|
1277
|
+
<edition>7</edition>
|
1278
|
+
<language>en</language>
|
1279
|
+
<script>Latn</script>
|
1280
|
+
<status>
|
1281
|
+
<stage>60</stage>
|
1282
|
+
<substage>60</substage>
|
1283
|
+
</status>
|
1284
|
+
<copyright>
|
1285
|
+
<from>2020</from>
|
1286
|
+
<owner>
|
1287
|
+
<organization>
|
1288
|
+
<name>ISO</name>
|
1289
|
+
</organization>
|
1290
|
+
</owner>
|
1291
|
+
</copyright>
|
1292
|
+
<relation type='obsoletes'>
|
1293
|
+
<bibitem type='standard'>
|
1294
|
+
<formattedref format='text/plain'>ISO 125:2011</formattedref>
|
1295
|
+
</bibitem>
|
1296
|
+
</relation>
|
1297
|
+
<relation type='instance'>
|
1298
|
+
<bibitem type='standard'>
|
1299
|
+
<fetched/>
|
1300
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Natural rubber latex concentrate</title>
|
1301
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Determination of alkalinity</title>
|
1302
|
+
<title type='main' format='text/plain' language='en' script='Latn'>
|
1303
|
+
Natural rubber latex concentrate — Determination
|
1304
|
+
of alkalinity
|
1305
|
+
</title>
|
1306
|
+
<uri type='src'>https://www.iso.org/standard/72849.html</uri>
|
1307
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:72849:en</uri>
|
1308
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/07/28/72849.detail.rss</uri>
|
1309
|
+
<docidentifier type='ISO'>ISO 125:2020</docidentifier>
|
1310
|
+
<docidentifier type='URN'>urn:iso:std:iso:125:stage-60.60:ed-7:en</docidentifier>
|
1311
|
+
<docnumber>125</docnumber>
|
1312
|
+
<date type='published'>
|
1313
|
+
<on>2020-02</on>
|
1314
|
+
</date>
|
1315
|
+
<contributor>
|
1316
|
+
<role type='publisher'/>
|
1317
|
+
<organization>
|
1318
|
+
<name>International Organization for Standardization</name>
|
1319
|
+
<abbreviation>ISO</abbreviation>
|
1320
|
+
<uri>www.iso.org</uri>
|
1321
|
+
</organization>
|
1322
|
+
</contributor>
|
1323
|
+
<edition>7</edition>
|
1324
|
+
<language>en</language>
|
1325
|
+
<script>Latn</script>
|
1326
|
+
<abstract format='text/plain' language='en' script='Latn'>
|
1327
|
+
This document specifies a method for the determination of the
|
1328
|
+
alkalinity of natural rubber latex concentrate. The method is not
|
1329
|
+
necessarily suitable for latices from natural sources other than
|
1330
|
+
Hevea brasiliensis or for synthetic rubber latices, compounded
|
1331
|
+
latex, vulcanized latex or artificial dispersions of rubber. NOTE
|
1332
|
+
A method for the determination of the alkalinity of
|
1333
|
+
polychloroprene latex is specified in ISO 13773.
|
1334
|
+
</abstract>
|
1335
|
+
<status>
|
1336
|
+
<stage>60</stage>
|
1337
|
+
<substage>60</substage>
|
1338
|
+
</status>
|
1339
|
+
<copyright>
|
1340
|
+
<from>2020</from>
|
1341
|
+
<owner>
|
1342
|
+
<organization>
|
1343
|
+
<name>ISO</name>
|
1344
|
+
</organization>
|
1345
|
+
</owner>
|
1346
|
+
</copyright>
|
1347
|
+
<relation type='obsoletes'>
|
1348
|
+
<bibitem type='standard'>
|
1349
|
+
<formattedref format='text/plain'>ISO 125:2011</formattedref>
|
1261
1350
|
</bibitem>
|
1351
|
+
</relation>
|
1352
|
+
<place>Geneva</place>
|
1353
|
+
</bibitem>
|
1354
|
+
</relation>
|
1355
|
+
<place>Geneva</place>
|
1356
|
+
</bibitem>
|
1262
1357
|
<bibitem id='iso126' hidden='true'>
|
1263
1358
|
<formattedref format='application/x-isodoc+xml'>
|
1264
1359
|
<em>Standard</em>
|