metanorma-iso 1.5.5 → 1.5.10
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/lib/asciidoctor/iso/basicdoc.rng +23 -0
- data/lib/asciidoctor/iso/front.rb +9 -15
- data/lib/asciidoctor/iso/isodoc.rng +121 -15
- data/lib/asciidoctor/iso/isostandard.rng +8 -1
- data/lib/asciidoctor/iso/section.rb +0 -7
- data/lib/isodoc/iso/html/isodoc.css +16 -4
- data/lib/isodoc/iso/html/isodoc.scss +18 -4
- data/lib/isodoc/iso/html/style-human.css +1 -1
- data/lib/isodoc/iso/html/style-iso.css +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +982 -291
- data/lib/isodoc/iso/iso.international-standard.xsl +982 -291
- data/lib/isodoc/iso/isosts_convert.rb +31 -0
- data/lib/isodoc/iso/xref.rb +7 -11
- data/lib/metanorma-iso.rb +1 -0
- data/lib/metanorma/iso/processor.rb +4 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +7 -39
- data/spec/asciidoctor-iso/base_spec.rb +122 -6
- data/spec/asciidoctor-iso/cleanup_spec.rb +30 -30
- data/spec/asciidoctor-iso/table_spec.rb +111 -111
- data/spec/asciidoctor-iso/validate_spec.rb +35 -15
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/isodoc/amd_spec.rb +32 -23
- data/spec/isodoc/blocks_spec.rb +1 -1
- data/spec/isodoc/i18n_spec.rb +17 -4
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/iso_spec.rb +5 -5
- data/spec/isodoc/metadata_spec.rb +2 -16
- data/spec/isodoc/postproc_spec.rb +4 -1
- data/spec/isodoc/ref_spec.rb +5 -2
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +11 -11
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcacb0045dc41c1bd31e2623205d83815c60dc4e020bbe6c0485ee0abd2f24d6
|
4
|
+
data.tar.gz: 795cf80c9d0c18c0aebfeff25f7e919c790b47fbf3352746e5f28cf90701a728
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ebb4928526e51d726f697c99798f2375f3e26c34b7e641e463a074a9d467a3e94e4d60c68a129ac71552e7826a757af0f20c871aefe5f7b27a2f21e0e17b74
|
7
|
+
data.tar.gz: 8507e683e4534458a8a3af9908862608e6e07675b2c6cdd9f29788b84ef36b3456fb4a859c33efd8a89f1f91206b2bc6e3dd00ef281ffbcebe8cad5599d08fe7
|
@@ -402,6 +402,16 @@
|
|
402
402
|
</choice>
|
403
403
|
</attribute>
|
404
404
|
</optional>
|
405
|
+
<optional>
|
406
|
+
<attribute name="valign">
|
407
|
+
<choice>
|
408
|
+
<value>top</value>
|
409
|
+
<value>middle</value>
|
410
|
+
<value>bottom</value>
|
411
|
+
<value>baseline</value>
|
412
|
+
</choice>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
405
415
|
<choice>
|
406
416
|
<zeroOrMore>
|
407
417
|
<ref name="TextElement"/>
|
@@ -429,6 +439,16 @@
|
|
429
439
|
</choice>
|
430
440
|
</attribute>
|
431
441
|
</optional>
|
442
|
+
<optional>
|
443
|
+
<attribute name="valign">
|
444
|
+
<choice>
|
445
|
+
<value>top</value>
|
446
|
+
<value>middle</value>
|
447
|
+
<value>bottom</value>
|
448
|
+
<value>baseline</value>
|
449
|
+
</choice>
|
450
|
+
</attribute>
|
451
|
+
</optional>
|
432
452
|
<choice>
|
433
453
|
<zeroOrMore>
|
434
454
|
<ref name="TextElement"/>
|
@@ -998,6 +1018,9 @@
|
|
998
1018
|
<value>alphabet_upper</value>
|
999
1019
|
</choice>
|
1000
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1001
1024
|
<oneOrMore>
|
1002
1025
|
<ref name="li"/>
|
1003
1026
|
</oneOrMore>
|
@@ -18,18 +18,9 @@ module Asciidoctor
|
|
18
18
|
xml.updates_document_type a
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
24
|
-
org.name "International Organization for Standardization"
|
25
|
-
org.abbreviation "ISO"
|
26
|
-
elsif ["IEC",
|
27
|
-
"International Electrotechnical Commission"].include? orgname
|
28
|
-
org.name "International Electrotechnical Commission"
|
29
|
-
org.abbreviation "IEC"
|
30
|
-
else
|
31
|
-
org.name orgname
|
32
|
-
end
|
21
|
+
def org_abbrev
|
22
|
+
{ "International Organization for Standardization" => "ISO",
|
23
|
+
"International Electrotechnical Commission" => "IEC" }
|
33
24
|
end
|
34
25
|
|
35
26
|
def metadata_author(node, xml)
|
@@ -37,7 +28,7 @@ module Asciidoctor
|
|
37
28
|
csv_split(publishers).each do |p|
|
38
29
|
xml.contributor do |c|
|
39
30
|
c.role **{ type: "author" }
|
40
|
-
c.organization { |a| organization(a, p) }
|
31
|
+
c.organization { |a| organization(a, p, node, !node.attr("publisher")) }
|
41
32
|
end
|
42
33
|
end
|
43
34
|
end
|
@@ -47,7 +38,7 @@ module Asciidoctor
|
|
47
38
|
csv_split(publishers).each do |p|
|
48
39
|
xml.contributor do |c|
|
49
40
|
c.role **{ type: "publisher" }
|
50
|
-
c.organization { |a| organization(a, p) }
|
41
|
+
c.organization { |a| organization(a, p, node, !node.attr("publisher")) }
|
51
42
|
end
|
52
43
|
end
|
53
44
|
end
|
@@ -58,7 +49,10 @@ module Asciidoctor
|
|
58
49
|
xml.copyright do |c|
|
59
50
|
c.from (node.attr("copyright-year") || Date.today.year)
|
60
51
|
c.owner do |owner|
|
61
|
-
owner.organization
|
52
|
+
owner.organization do |o|
|
53
|
+
organization(o, p, node,
|
54
|
+
!(node.attr("copyright-holder") || node.attr("publisher")))
|
55
|
+
end
|
62
56
|
end
|
63
57
|
end
|
64
58
|
end
|
@@ -42,7 +42,6 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
-
<!-- attribute target { xsd:IDREF }, -->
|
46
45
|
<attribute name="target">
|
47
46
|
<data type="string">
|
48
47
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
@@ -64,6 +63,11 @@
|
|
64
63
|
</choice>
|
65
64
|
</attribute>
|
66
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
67
71
|
<text/>
|
68
72
|
</element>
|
69
73
|
</define>
|
@@ -581,6 +585,8 @@
|
|
581
585
|
<ref name="ol"/>
|
582
586
|
<ref name="dl"/>
|
583
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
584
590
|
</choice>
|
585
591
|
</oneOrMore>
|
586
592
|
</element>
|
@@ -664,6 +670,16 @@
|
|
664
670
|
</choice>
|
665
671
|
</attribute>
|
666
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
667
683
|
<choice>
|
668
684
|
<zeroOrMore>
|
669
685
|
<choice>
|
@@ -700,6 +716,16 @@
|
|
700
716
|
</choice>
|
701
717
|
</attribute>
|
702
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
703
729
|
<choice>
|
704
730
|
<zeroOrMore>
|
705
731
|
<choice>
|
@@ -837,6 +863,13 @@
|
|
837
863
|
</define>
|
838
864
|
<define name="standard-document">
|
839
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
840
873
|
<ref name="bibdata"/>
|
841
874
|
<optional>
|
842
875
|
<ref name="boilerplate"/>
|
@@ -858,7 +891,7 @@
|
|
858
891
|
<oneOrMore>
|
859
892
|
<choice>
|
860
893
|
<ref name="content"/>
|
861
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
862
895
|
<ref name="foreword"/>
|
863
896
|
<ref name="introduction"/>
|
864
897
|
<ref name="acknowledgements"/>
|
@@ -1052,14 +1085,17 @@
|
|
1052
1085
|
<ref name="section-title"/>
|
1053
1086
|
</optional>
|
1054
1087
|
<group>
|
1055
|
-
<
|
1056
|
-
<
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1060
|
-
<
|
1061
|
-
|
1062
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1063
1099
|
<zeroOrMore>
|
1064
1100
|
<choice>
|
1065
1101
|
<ref name="clause-subsection"/>
|
@@ -1456,11 +1492,6 @@
|
|
1456
1492
|
</optional>
|
1457
1493
|
</element>
|
1458
1494
|
</define>
|
1459
|
-
<define name="preface_abstract">
|
1460
|
-
<element name="abstract">
|
1461
|
-
<ref name="Basic-Section"/>
|
1462
|
-
</element>
|
1463
|
-
</define>
|
1464
1495
|
<define name="term-clause">
|
1465
1496
|
<element name="clause">
|
1466
1497
|
<optional>
|
@@ -1510,4 +1541,79 @@
|
|
1510
1541
|
<ref name="CitationType"/>
|
1511
1542
|
</element>
|
1512
1543
|
</define>
|
1544
|
+
<define name="amend">
|
1545
|
+
<element name="amend">
|
1546
|
+
<optional>
|
1547
|
+
<attribute name="id">
|
1548
|
+
<data type="ID"/>
|
1549
|
+
</attribute>
|
1550
|
+
</optional>
|
1551
|
+
<attribute name="change">
|
1552
|
+
<choice>
|
1553
|
+
<value>add</value>
|
1554
|
+
<value>modify</value>
|
1555
|
+
<value>delete</value>
|
1556
|
+
</choice>
|
1557
|
+
</attribute>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="path"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<attribute name="path_end"/>
|
1563
|
+
</optional>
|
1564
|
+
<optional>
|
1565
|
+
<attribute name="title"/>
|
1566
|
+
</optional>
|
1567
|
+
<optional>
|
1568
|
+
<element name="location">
|
1569
|
+
<zeroOrMore>
|
1570
|
+
<ref name="locality"/>
|
1571
|
+
</zeroOrMore>
|
1572
|
+
</element>
|
1573
|
+
</optional>
|
1574
|
+
<zeroOrMore>
|
1575
|
+
<ref name="autonumber"/>
|
1576
|
+
</zeroOrMore>
|
1577
|
+
<optional>
|
1578
|
+
<element name="description">
|
1579
|
+
<zeroOrMore>
|
1580
|
+
<ref name="BasicBlock"/>
|
1581
|
+
</zeroOrMore>
|
1582
|
+
</element>
|
1583
|
+
</optional>
|
1584
|
+
<optional>
|
1585
|
+
<element name="newcontent">
|
1586
|
+
<zeroOrMore>
|
1587
|
+
<ref name="BasicBlock"/>
|
1588
|
+
</zeroOrMore>
|
1589
|
+
</element>
|
1590
|
+
</optional>
|
1591
|
+
<optional>
|
1592
|
+
<element name="description">
|
1593
|
+
<zeroOrMore>
|
1594
|
+
<ref name="BasicBlock"/>
|
1595
|
+
</zeroOrMore>
|
1596
|
+
</element>
|
1597
|
+
</optional>
|
1598
|
+
</element>
|
1599
|
+
</define>
|
1600
|
+
<define name="autonumber">
|
1601
|
+
<element name="autonumber">
|
1602
|
+
<attribute name="type">
|
1603
|
+
<choice>
|
1604
|
+
<value>requirement</value>
|
1605
|
+
<value>recommendation</value>
|
1606
|
+
<value>permission</value>
|
1607
|
+
<value>table</value>
|
1608
|
+
<value>figure</value>
|
1609
|
+
<value>admonition</value>
|
1610
|
+
<value>formula</value>
|
1611
|
+
<value>sourcecode</value>
|
1612
|
+
<value>example</value>
|
1613
|
+
<value>note</value>
|
1614
|
+
</choice>
|
1615
|
+
</attribute>
|
1616
|
+
<text/>
|
1617
|
+
</element>
|
1618
|
+
</define>
|
1513
1619
|
</grammar>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
<define name="preface">
|
254
254
|
<element name="preface">
|
255
255
|
<optional>
|
256
|
-
<ref name="
|
256
|
+
<ref name="abstract"/>
|
257
257
|
</optional>
|
258
258
|
<ref name="foreword"/>
|
259
259
|
<optional>
|
@@ -405,6 +405,13 @@
|
|
405
405
|
-->
|
406
406
|
<define name="iso-standard">
|
407
407
|
<element name="iso-standard">
|
408
|
+
<attribute name="version"/>
|
409
|
+
<attribute name="type">
|
410
|
+
<choice>
|
411
|
+
<value>semantic</value>
|
412
|
+
<value>presentation</value>
|
413
|
+
</choice>
|
414
|
+
</attribute>
|
408
415
|
<ref name="bibdata"/>
|
409
416
|
<zeroOrMore>
|
410
417
|
<ref name="termdocsource"/>
|
@@ -30,13 +30,6 @@ module Asciidoctor
|
|
30
30
|
xml << node.content
|
31
31
|
end
|
32
32
|
|
33
|
-
def section_attributes(node)
|
34
|
-
super.merge(
|
35
|
-
change: @amd ? node.attr("change") : nil,
|
36
|
-
locality: @amd ? node.attr("locality") : nil,
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
33
|
def sectiontype(node, level = true)
|
41
34
|
return nil if @amd
|
42
35
|
super
|
@@ -652,7 +652,7 @@ div.figdl p, table.figdl p {
|
|
652
652
|
table.formula_dl {
|
653
653
|
margin-left: 20.15pt; }
|
654
654
|
|
655
|
-
table.MsoISOTable {
|
655
|
+
table.MsoISOTable, table.MsoISOTableBig {
|
656
656
|
mso-style-name: "Table ISO";
|
657
657
|
mso-tstyle-rowband-size: 0;
|
658
658
|
mso-tstyle-colband-size: 0;
|
@@ -673,17 +673,17 @@ table.MsoISOTable {
|
|
673
673
|
font-size: 10.0pt;
|
674
674
|
font-family: {{bodyfont}}; }
|
675
675
|
|
676
|
-
table.MsoISOTable th {
|
676
|
+
table.MsoISOTable th, table.MsoISOTableBig th {
|
677
677
|
border: solid windowtext 1pt;
|
678
678
|
mso-border-alt: solid windowtext 1pt;
|
679
679
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
680
680
|
|
681
|
-
table.MsoISOTable td {
|
681
|
+
table.MsoISOTable td, table.MsoISOTableBig td {
|
682
682
|
border: solid windowtext 1pt;
|
683
683
|
mso-border-alt: solid windowtext 1pt;
|
684
684
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
685
685
|
|
686
|
-
table.MsoISOTable p {
|
686
|
+
table.MsoISOTable p, table.MsoISOTableBig p {
|
687
687
|
font-size: 10.0pt; }
|
688
688
|
|
689
689
|
table.MsoTableGrid {
|
@@ -855,8 +855,20 @@ div.example p.MsoListParagraph {
|
|
855
855
|
font-size: 10.0pt; }
|
856
856
|
|
857
857
|
div.Note p.MsoListParagraph {
|
858
|
+
font-size: 10.0pt;
|
859
|
+
margin-left: 1.0cm; }
|
860
|
+
|
861
|
+
div.Note span.stem {
|
858
862
|
font-size: 10.0pt; }
|
859
863
|
|
864
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
865
|
+
font-size: 8.0pt;
|
866
|
+
margin-left: 1.0cm; }
|
867
|
+
|
868
|
+
div.Note table.dl {
|
869
|
+
font-size: 10.0pt;
|
870
|
+
margin-left: 1.0cm; }
|
871
|
+
|
860
872
|
span.note_label, span.example_label, td.example_label, td.note_label {
|
861
873
|
font-size: 10.0pt;
|
862
874
|
font-family: {{bodyfont}}; }
|
@@ -627,7 +627,7 @@ table.formula_dl {
|
|
627
627
|
margin-left:20.15pt;
|
628
628
|
}
|
629
629
|
|
630
|
-
table.MsoISOTable
|
630
|
+
table.MsoISOTable, table.MsoISOTableBig
|
631
631
|
{mso-style-name:"Table ISO";
|
632
632
|
mso-tstyle-rowband-size:0;
|
633
633
|
mso-tstyle-colband-size:0;
|
@@ -647,15 +647,15 @@ table.MsoISOTable
|
|
647
647
|
mso-border-insidev:.75pt solid windowtext;
|
648
648
|
font-size:10.0pt;
|
649
649
|
font-family:$bodyfont;}
|
650
|
-
table.MsoISOTable th
|
650
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
651
651
|
{border:solid windowtext 1pt;
|
652
652
|
mso-border-alt:solid windowtext 1pt;
|
653
653
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
654
|
-
table.MsoISOTable td
|
654
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
655
655
|
{border:solid windowtext 1pt;
|
656
656
|
mso-border-alt:solid windowtext 1pt;
|
657
657
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
658
|
-
table.MsoISOTable p
|
658
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
659
659
|
{font-size:10.0pt; }
|
660
660
|
table.MsoTableGrid
|
661
661
|
{mso-style-name:"Table Grid";
|
@@ -842,6 +842,20 @@ div.example p.MsoListParagraph {
|
|
842
842
|
|
843
843
|
div.Note p.MsoListParagraph {
|
844
844
|
font-size: 10.0pt;
|
845
|
+
margin-left: 1.0cm;
|
846
|
+
}
|
847
|
+
|
848
|
+
div.Note span.stem {
|
849
|
+
font-size: 10.0pt; }
|
850
|
+
|
851
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
852
|
+
font-size: 8.0pt;
|
853
|
+
margin-left: 1.0cm;
|
854
|
+
}
|
855
|
+
|
856
|
+
div.Note table.dl {
|
857
|
+
font-size: 10.0pt;
|
858
|
+
margin-left: 1.0cm;
|
845
859
|
}
|
846
860
|
|
847
861
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
|
|
16
16
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
17
17
|
article, aside, canvas, details, embed,
|
18
18
|
figure, figcaption, footer, header, hgroup,
|
19
|
-
menu,
|
19
|
+
menu, output, ruby, section, summary,
|
20
20
|
time, mark, audio, video {
|
21
21
|
margin: 0;
|
22
22
|
padding: 0; }
|