metanorma-iso 1.8.1 → 1.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/iso/base.rb +1 -0
- data/lib/asciidoctor/iso/biblio.rng +1 -0
- data/lib/asciidoctor/iso/cleanup.rb +17 -5
- data/lib/asciidoctor/iso/front.rb +3 -1
- data/lib/asciidoctor/iso/front_id.rb +66 -50
- data/lib/asciidoctor/iso/isodoc.rng +209 -4
- data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -0
- data/lib/asciidoctor/iso/section.rb +2 -1
- data/lib/asciidoctor/iso/validate_section.rb +16 -9
- data/lib/isodoc/iso/base_convert.rb +13 -13
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +679 -473
- data/lib/isodoc/iso/iso.international-standard.xsl +679 -473
- data/lib/isodoc/iso/metadata.rb +3 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +18 -9
- data/lib/isodoc/iso/sts_convert.rb +10 -13
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/isodoc/iso/xref.rb +42 -27
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -4
- data/spec/asciidoctor/base_spec.rb +426 -334
- data/spec/asciidoctor/blocks_spec.rb +96 -34
- data/spec/asciidoctor/cleanup_spec.rb +383 -25
- data/spec/asciidoctor/section_spec.rb +0 -14
- data/spec/asciidoctor/validate_spec.rb +119 -39
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +282 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +492 -442
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +301 -306
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- data/spec/spec_helper.rb +16 -15
- metadata +9 -9
@@ -101,20 +101,6 @@ RSpec.describe Asciidoctor::ISO do
|
|
101
101
|
<title>Terms, definitions, symbols and abbreviated terms</title>
|
102
102
|
<terms id="_" obligation="normative">
|
103
103
|
<title>Normal Terms</title>
|
104
|
-
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
105
|
-
<p id="_">ISO and IEC maintain terminological databases for use in standardization at the following addresses:</p>
|
106
|
-
<ul id="_">
|
107
|
-
<li>
|
108
|
-
<p id="_">ISO Online browsing platform: available at
|
109
|
-
|
110
|
-
<link target="http://www.iso.org/obp"/></p>
|
111
|
-
</li>
|
112
|
-
<li>
|
113
|
-
<p id="_">IEC Electropedia: available at
|
114
|
-
|
115
|
-
<link target="http://www.electropedia.org"/></p>
|
116
|
-
</li>
|
117
|
-
</ul>
|
118
104
|
<term id="term-term2">
|
119
105
|
<preferred>Term2</preferred>
|
120
106
|
</term>
|
@@ -517,7 +517,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
517
517
|
<<iso123>>
|
518
518
|
INPUT
|
519
519
|
expect(File.read("test.err"))
|
520
|
-
.to include "iso123 does not have a corresponding anchor ID
|
520
|
+
.to include "iso123 does not have a corresponding anchor ID "\
|
521
|
+
"in the bibliography"
|
521
522
|
end
|
522
523
|
|
523
524
|
it "warns that undated reference has locality" do
|
@@ -530,9 +531,10 @@ RSpec.describe Asciidoctor::ISO do
|
|
530
531
|
[bibliography]
|
531
532
|
== Normative References
|
532
533
|
* [[[iso123,ISO 123]]] _Standard_
|
533
|
-
|
534
|
-
|
535
|
-
|
534
|
+
INPUT
|
535
|
+
expect(File.read("test.err"))
|
536
|
+
.to include "undated reference ISO 123 should not contain "\
|
537
|
+
"specific elements"
|
536
538
|
end
|
537
539
|
|
538
540
|
it "do not warn that undated reference which is a bibliographic reference has locality" do
|
@@ -545,9 +547,10 @@ RSpec.describe Asciidoctor::ISO do
|
|
545
547
|
[bibliography]
|
546
548
|
== Bibliography
|
547
549
|
* [[[iso123,1]]] _Standard_
|
548
|
-
|
549
|
-
|
550
|
-
|
550
|
+
INPUT
|
551
|
+
expect(File.read("test.err"))
|
552
|
+
.not_to include "undated reference [1] should not contain specific "\
|
553
|
+
"elements"
|
551
554
|
end
|
552
555
|
|
553
556
|
it "do not warn that undated IEV reference has locality" do
|
@@ -560,9 +563,10 @@ RSpec.describe Asciidoctor::ISO do
|
|
560
563
|
[bibliography]
|
561
564
|
== Normative References
|
562
565
|
* [[[iev,IEV]]] _Standard_
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
+
INPUT
|
567
|
+
expect(File.read("test.err"))
|
568
|
+
.not_to include "undated reference IEV should not contain specific "\
|
569
|
+
"elements"
|
566
570
|
end
|
567
571
|
|
568
572
|
it "do not warn that in print has locality" do
|
@@ -575,8 +579,10 @@ RSpec.describe Asciidoctor::ISO do
|
|
575
579
|
[bibliography]
|
576
580
|
== Normative References
|
577
581
|
* [[[iev,ISO 123:--]]] _Standard_
|
578
|
-
|
579
|
-
|
582
|
+
INPUT
|
583
|
+
expect(File.read("test.err"))
|
584
|
+
.not_to include "undated reference ISO 123 should not contain specific "\
|
585
|
+
"elements"
|
580
586
|
end
|
581
587
|
|
582
588
|
it "warns of Non-reference in bibliography" do
|
@@ -641,7 +647,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
641
647
|
== Clause
|
642
648
|
ISO 12121
|
643
649
|
INPUT
|
644
|
-
expect(File.read("test.err"))
|
650
|
+
expect(File.read("test.err"))
|
651
|
+
.not_to include "number not broken up in threes"
|
645
652
|
end
|
646
653
|
|
647
654
|
it "Style warning if decimal point" do
|
@@ -681,7 +688,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
681
688
|
== Clause
|
682
689
|
95 ± 5 %
|
683
690
|
INPUT
|
684
|
-
expect(File.read("test.err"))
|
691
|
+
expect(File.read("test.err"))
|
692
|
+
.to include "unbracketed tolerance before percent sign"
|
685
693
|
end
|
686
694
|
|
687
695
|
it "Style warning if dots in abbreviation" do
|
@@ -721,7 +729,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
721
729
|
== Clause
|
722
730
|
5 °
|
723
731
|
INPUT
|
724
|
-
expect(File.read("test.err"))
|
732
|
+
expect(File.read("test.err"))
|
733
|
+
.to include "space between number and degrees/minutes/seconds"
|
725
734
|
end
|
726
735
|
|
727
736
|
it "Style warning if no space between number and SI unit" do
|
@@ -731,7 +740,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
731
740
|
== Clause
|
732
741
|
A measurement of 5Bq was taken.
|
733
742
|
INPUT
|
734
|
-
expect(File.read("test.err"))
|
743
|
+
expect(File.read("test.err"))
|
744
|
+
.to include "no space between number and SI unit"
|
735
745
|
end
|
736
746
|
|
737
747
|
it "Style warning if mins used" do
|
@@ -777,7 +787,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
777
787
|
== Symbols and Abbreviated Terms
|
778
788
|
INPUT
|
779
789
|
expect(File.read("test.err"))
|
780
|
-
.to include "Only one Symbols and Abbreviated Terms section
|
790
|
+
.to include "Only one Symbols and Abbreviated Terms section "\
|
791
|
+
"in the standard"
|
781
792
|
end
|
782
793
|
|
783
794
|
it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
|
@@ -789,7 +800,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
789
800
|
Paragraph
|
790
801
|
INPUT
|
791
802
|
expect(File.read("test.err"))
|
792
|
-
.to include "Symbols and Abbreviated Terms can only contain
|
803
|
+
.to include "Symbols and Abbreviated Terms can only contain "\
|
804
|
+
"a definition list"
|
793
805
|
end
|
794
806
|
|
795
807
|
it "Warning if missing foreword" do
|
@@ -902,7 +914,9 @@ RSpec.describe Asciidoctor::ISO do
|
|
902
914
|
|
903
915
|
Paragraph
|
904
916
|
INPUT
|
905
|
-
expect(File.read("test.err"))
|
917
|
+
expect(File.read("test.err"))
|
918
|
+
.to include "Normative References must be followed by "\
|
919
|
+
"Terms and Definitions"
|
906
920
|
|
907
921
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
908
922
|
= Document title
|
@@ -924,7 +938,9 @@ RSpec.describe Asciidoctor::ISO do
|
|
924
938
|
|
925
939
|
Paragraph
|
926
940
|
INPUT
|
927
|
-
expect(File.read("test.err"))
|
941
|
+
expect(File.read("test.err"))
|
942
|
+
.not_to include "Normative References must be followed by "\
|
943
|
+
"Terms and Definitions"
|
928
944
|
end
|
929
945
|
|
930
946
|
it "Warning if there are no clauses in the document" do
|
@@ -944,7 +960,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
944
960
|
== Symbols and Abbreviated Terms
|
945
961
|
|
946
962
|
INPUT
|
947
|
-
expect(File.read("test.err"))
|
963
|
+
expect(File.read("test.err"))
|
964
|
+
.to include "Document must contain at least one clause"
|
948
965
|
|
949
966
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
950
967
|
= Document title
|
@@ -967,7 +984,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
967
984
|
== Symbols and Abbreviated Terms
|
968
985
|
|
969
986
|
INPUT
|
970
|
-
expect(File.read("test.err"))
|
987
|
+
expect(File.read("test.err"))
|
988
|
+
.not_to include "Document must contain at least one clause"
|
971
989
|
end
|
972
990
|
|
973
991
|
it "Warning if scope occurs after Terms and Definitions" do
|
@@ -989,7 +1007,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
989
1007
|
== Scope
|
990
1008
|
|
991
1009
|
INPUT
|
992
|
-
expect(File.read("test.err"))
|
1010
|
+
expect(File.read("test.err"))
|
1011
|
+
.to include "Scope must occur before Terms and Definitions"
|
993
1012
|
|
994
1013
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
995
1014
|
= Document title
|
@@ -1014,7 +1033,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1014
1033
|
== Scope
|
1015
1034
|
|
1016
1035
|
INPUT
|
1017
|
-
expect(File.read("test.err"))
|
1036
|
+
expect(File.read("test.err"))
|
1037
|
+
.not_to include "Scope must occur before Terms and Definitions"
|
1018
1038
|
end
|
1019
1039
|
|
1020
1040
|
it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
|
@@ -1036,7 +1056,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1036
1056
|
== Symbols and Abbreviated Terms
|
1037
1057
|
|
1038
1058
|
INPUT
|
1039
|
-
expect(File.read("test.err"))
|
1059
|
+
expect(File.read("test.err"))
|
1060
|
+
.to include "Only annexes and references can follow clauses"
|
1040
1061
|
|
1041
1062
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1042
1063
|
= Document title
|
@@ -1062,7 +1083,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1062
1083
|
== Symbols and Abbreviated Terms
|
1063
1084
|
|
1064
1085
|
INPUT
|
1065
|
-
expect(File.read("test.err"))
|
1086
|
+
expect(File.read("test.err"))
|
1087
|
+
.not_to include "Only annexes and references can follow clauses"
|
1066
1088
|
end
|
1067
1089
|
|
1068
1090
|
it "Warning if no normative references" do
|
@@ -1088,7 +1110,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1088
1110
|
== Appendix C
|
1089
1111
|
|
1090
1112
|
INPUT
|
1091
|
-
expect(File.read("test.err"))
|
1113
|
+
expect(File.read("test.err"))
|
1114
|
+
.to include "Document must include (references) Normative References"
|
1092
1115
|
|
1093
1116
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1094
1117
|
= Document title
|
@@ -1117,9 +1140,57 @@ RSpec.describe Asciidoctor::ISO do
|
|
1117
1140
|
== Appendix C
|
1118
1141
|
|
1119
1142
|
INPUT
|
1120
|
-
expect(File.read("test.err"))
|
1143
|
+
expect(File.read("test.err"))
|
1144
|
+
.not_to include "Document must include (references) Normative References"
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
it "Warning if there are two Terms sections" do
|
1148
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1149
|
+
#{VALIDATING_BLANK_HDR}
|
1150
|
+
|
1151
|
+
== Scope
|
1152
|
+
|
1153
|
+
== Terms and definitions
|
1154
|
+
|
1155
|
+
== A Clause
|
1156
|
+
|
1157
|
+
[heading=terms and definitions]
|
1158
|
+
== Terms related to clinical psychology
|
1159
|
+
|
1160
|
+
INPUT
|
1161
|
+
expect(File.read("test.err"))
|
1162
|
+
.to include "Only annexes and references can follow clauses"
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
it "No warning if there are two Terms sections in a Vocabulary document" do
|
1166
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1167
|
+
= Document title
|
1168
|
+
Author
|
1169
|
+
:docfile: test.adoc
|
1170
|
+
:nodoc:
|
1171
|
+
:no-isobib:
|
1172
|
+
:docsubtype: vocabulary
|
1173
|
+
|
1174
|
+
== Scope
|
1175
|
+
|
1176
|
+
== Terms and definitions
|
1177
|
+
|
1178
|
+
== A Clause
|
1179
|
+
|
1180
|
+
[heading=terms and definitions]
|
1181
|
+
== Terms related to clinical psychology
|
1182
|
+
|
1183
|
+
[heading=symbols and abbreviated terms]
|
1184
|
+
== Symbols related to clinical psychology
|
1185
|
+
|
1186
|
+
INPUT
|
1187
|
+
expect(File.read("test.err"))
|
1188
|
+
.not_to include "Only annexes and references can follow clauses"
|
1189
|
+
expect(File.read("test.err"))
|
1190
|
+
.to include "Only terms, annexes and references can follow clauses"
|
1121
1191
|
end
|
1122
1192
|
|
1193
|
+
|
1123
1194
|
it "Warning if final section is not named Bibliography" do
|
1124
1195
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1125
1196
|
#{VALIDATING_BLANK_HDR}
|
@@ -1149,7 +1220,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1149
1220
|
== Appendix C
|
1150
1221
|
|
1151
1222
|
INPUT
|
1152
|
-
expect(File.read("test.err"))
|
1223
|
+
expect(File.read("test.err"))
|
1224
|
+
.to include "There are sections after the final Bibliography"
|
1153
1225
|
|
1154
1226
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1155
1227
|
= Document title
|
@@ -1184,7 +1256,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1184
1256
|
== Appendix C
|
1185
1257
|
|
1186
1258
|
INPUT
|
1187
|
-
expect(File.read("test.err"))
|
1259
|
+
expect(File.read("test.err"))
|
1260
|
+
.not_to include "There are sections after the final Bibliography"
|
1188
1261
|
end
|
1189
1262
|
|
1190
1263
|
it "Warning if final section is not styled Bibliography" do
|
@@ -1212,7 +1285,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1212
1285
|
== Bibliography
|
1213
1286
|
|
1214
1287
|
INPUT
|
1215
|
-
expect(File.read("test.err"))
|
1288
|
+
expect(File.read("test.err"))
|
1289
|
+
.to include "Section not marked up as [bibliography]"
|
1216
1290
|
end
|
1217
1291
|
|
1218
1292
|
it "Warning if final section is not styled Bibliography false" do
|
@@ -1245,7 +1319,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1245
1319
|
== Bibliography
|
1246
1320
|
|
1247
1321
|
INPUT
|
1248
|
-
expect(File.read("test.err"))
|
1322
|
+
expect(File.read("test.err"))
|
1323
|
+
.not_to include "Section not marked up as [bibliography]"
|
1249
1324
|
end
|
1250
1325
|
|
1251
1326
|
it "Warning if English title intro and no French title intro" do
|
@@ -1536,7 +1611,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1536
1611
|
[align=mid-air]
|
1537
1612
|
Para
|
1538
1613
|
INPUT
|
1539
|
-
expect(File.read("test.err"))
|
1614
|
+
expect(File.read("test.err"))
|
1615
|
+
.to include 'value of attribute "align" is invalid; must be equal to'
|
1540
1616
|
end
|
1541
1617
|
|
1542
1618
|
it "Warn if more than 7 levels of subclause" do
|
@@ -1568,7 +1644,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1568
1644
|
====== Clause
|
1569
1645
|
|
1570
1646
|
INPUT
|
1571
|
-
expect(File.read("test.err"))
|
1647
|
+
expect(File.read("test.err"))
|
1648
|
+
.to include "Exceeds the maximum clause depth of 7"
|
1572
1649
|
end
|
1573
1650
|
|
1574
1651
|
it "Do not warn if not more than 7 levels of subclause" do
|
@@ -1597,7 +1674,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1597
1674
|
====== Clause
|
1598
1675
|
|
1599
1676
|
INPUT
|
1600
|
-
expect(File.read("test.err"))
|
1677
|
+
expect(File.read("test.err"))
|
1678
|
+
.not_to include "exceeds the maximum clause depth of 7"
|
1601
1679
|
end
|
1602
1680
|
|
1603
1681
|
it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
|
@@ -1609,8 +1687,9 @@ RSpec.describe Asciidoctor::ISO do
|
|
1609
1687
|
=== Term
|
1610
1688
|
|
1611
1689
|
The definition of a term (<<term>>) is a part of the specialized vocabulary of a particular field
|
1612
|
-
|
1613
|
-
|
1690
|
+
INPUT
|
1691
|
+
expect(File.read("test.err"))
|
1692
|
+
.to include "term citation not preceded with italicised term"
|
1614
1693
|
end
|
1615
1694
|
|
1616
1695
|
it "Warn if an undated reference has no associated footnote" do
|
@@ -1621,7 +1700,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
1621
1700
|
== Bibliography
|
1622
1701
|
* [[[ISO8,ISO 8:--]]], _Title_
|
1623
1702
|
INPUT
|
1624
|
-
expect(File.read("test.err"))
|
1625
|
-
"Reference ISO8 does not have an associated footnote
|
1703
|
+
expect(File.read("test.err"))
|
1704
|
+
.to include "Reference ISO8 does not have an associated footnote "\
|
1705
|
+
"indicating unpublished status"
|
1626
1706
|
end
|
1627
1707
|
end
|
data/spec/isodoc/amd_spec.rb
CHANGED
@@ -75,7 +75,7 @@ RSpec.describe IsoDoc do
|
|
75
75
|
</ext>
|
76
76
|
</bibdata>
|
77
77
|
<preface>
|
78
|
-
<foreword>
|
78
|
+
<foreword displayorder="1">
|
79
79
|
<p>
|
80
80
|
<xref target="N">Scope, Note</xref>
|
81
81
|
<xref target="note1">Widgets, 1, Note 1</xref>
|
@@ -87,7 +87,7 @@ RSpec.describe IsoDoc do
|
|
87
87
|
</foreword>
|
88
88
|
</preface>
|
89
89
|
<sections>
|
90
|
-
<clause id="scope">
|
90
|
+
<clause id="scope" displayorder="3">
|
91
91
|
<title depth="1">Scope</title>
|
92
92
|
<note id="N">
|
93
93
|
<name>NOTE</name>
|
@@ -99,8 +99,8 @@ RSpec.describe IsoDoc do
|
|
99
99
|
<xref target="N">Note</xref>
|
100
100
|
</p>
|
101
101
|
</clause>
|
102
|
-
<terms id="terms"/>
|
103
|
-
<clause id="widgets">
|
102
|
+
<terms id="terms" displayorder="2"/>
|
103
|
+
<clause id="widgets" displayorder="4">
|
104
104
|
<title depth="1">Widgets</title>
|
105
105
|
<clause id="widgets1" inline-header="true">
|
106
106
|
<note id="note1">
|
@@ -122,7 +122,7 @@ RSpec.describe IsoDoc do
|
|
122
122
|
</clause>
|
123
123
|
</clause>
|
124
124
|
</sections>
|
125
|
-
<annex id="annex1">
|
125
|
+
<annex id="annex1" displayorder="5">
|
126
126
|
<title>
|
127
127
|
<strong>Annex A</strong>
|
128
128
|
<br/>(informative)</title>
|
@@ -235,97 +235,102 @@ RSpec.describe IsoDoc do
|
|
235
235
|
INPUT
|
236
236
|
expect(xmlpp(output).sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
237
237
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
238
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
239
|
+
<bibdata>
|
240
|
+
<ext>
|
241
|
+
<doctype language=''>amendment</doctype>
|
242
|
+
</ext>
|
243
|
+
</bibdata>
|
244
|
+
|
245
|
+
<preface>
|
246
|
+
<foreword obligation='informative' displayorder='1'>
|
247
|
+
<title>Foreword</title>
|
248
|
+
<p id='A'>
|
249
|
+
This is a preamble
|
250
|
+
<xref target='C'>0.1</xref>
|
251
|
+
<xref target='C1'>0.2</xref>
|
252
|
+
<xref target='D'>Scope</xref>
|
253
|
+
<xref target='H'>[H]</xref>
|
254
|
+
<xref target='I'>[I]</xref>
|
255
|
+
<xref target='J'>[J]</xref>
|
256
|
+
<xref target='K'>[K]</xref>
|
257
|
+
<xref target='L'>[L]</xref>
|
258
|
+
<xref target='M'>Clause 4</xref>
|
259
|
+
<xref target='N'>Introduction</xref>
|
260
|
+
<xref target='O'>Clause 4.2</xref>
|
261
|
+
<xref target='P'>Annex A</xref>
|
262
|
+
<xref target='Q'>A.1</xref>
|
263
|
+
<xref target='Q1'>A.1.1</xref>
|
264
|
+
<xref target='Q2'>Annex A, Appendix 1</xref>
|
265
|
+
<xref target='R'>[R]</xref>
|
266
|
+
</p>
|
267
|
+
</foreword>
|
268
|
+
<introduction id='B' obligation='informative' displayorder='2'>
|
269
|
+
<title depth='1'>Introduction</title>
|
270
|
+
<clause id='C' inline-header='false' obligation='informative'>
|
271
|
+
<title depth='2'>Introduction Subsection</title>
|
272
|
+
</clause>
|
273
|
+
<clause id='C1' inline-header='true' obligation='informative'>Text</clause>
|
274
|
+
</introduction>
|
275
|
+
</preface>
|
276
|
+
<sections>
|
277
|
+
<clause id='D' obligation='normative' type='scope' displayorder='3'>
|
278
|
+
<title depth='1'>Scope</title>
|
279
|
+
<p id='E'>Text</p>
|
280
|
+
</clause>
|
281
|
+
<clause id='M' inline-header='false' obligation='normative' displayorder='5'>
|
282
|
+
<title depth='1'>Clause 4</title>
|
283
|
+
<clause id='N' inline-header='false' obligation='normative'>
|
284
|
+
<title depth='2'>Introduction</title>
|
285
|
+
</clause>
|
286
|
+
<clause id='O' inline-header='false' obligation='normative'>
|
287
|
+
<title depth='2'>Clause 4.2</title>
|
288
|
+
</clause>
|
289
|
+
</clause>
|
290
|
+
</sections>
|
291
|
+
<annex id='P' inline-header='false' obligation='normative' displayorder='6'>
|
292
|
+
<title>
|
293
|
+
<strong>Annex A</strong>
|
294
|
+
<br/>
|
295
|
+
(normative)
|
296
|
+
<br/>
|
297
|
+
<br/>
|
298
|
+
<strong>Annex</strong>
|
299
|
+
</title>
|
300
|
+
<clause id='Q' inline-header='false' obligation='normative'>
|
301
|
+
<title depth='2'>
|
302
|
+
A.1
|
303
|
+
<tab/>
|
304
|
+
Annex A.1
|
305
|
+
</title>
|
306
|
+
<clause id='Q1' inline-header='false' obligation='normative'>
|
307
|
+
<title depth='3'>
|
308
|
+
A.1.1
|
309
|
+
<tab/>
|
310
|
+
Annex A.1a
|
311
|
+
</title>
|
312
|
+
</clause>
|
313
|
+
</clause>
|
314
|
+
<appendix id='Q2' inline-header='false' obligation='normative'>
|
315
|
+
<title depth='2'>
|
316
|
+
Appendix 1
|
317
|
+
<tab/>
|
318
|
+
An Appendix
|
319
|
+
</title>
|
320
|
+
</appendix>
|
321
|
+
</annex>
|
322
|
+
<bibliography>
|
323
|
+
<references id='R' normative='true' obligation='informative' displayorder='4'>
|
324
|
+
<title depth='1'>Normative References</title>
|
325
|
+
</references>
|
326
|
+
<clause id='S' obligation='informative' displayorder='7'>
|
327
|
+
<title depth='1'>Bibliography</title>
|
328
|
+
<references id='T' normative='false' obligation='informative'>
|
329
|
+
<title depth='2'>Bibliography Subsection</title>
|
330
|
+
</references>
|
331
|
+
</clause>
|
332
|
+
</bibliography>
|
333
|
+
</iso-standard>
|
329
334
|
OUTPUT
|
330
335
|
end
|
331
336
|
|
@@ -423,109 +428,96 @@ RSpec.describe IsoDoc do
|
|
423
428
|
</iso-standard>
|
424
429
|
INPUT
|
425
430
|
presxml = <<~OUTPUT
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
</annex>
|
517
|
-
<bibliography>
|
518
|
-
<references id="R" normative="true" obligation="informative">
|
519
|
-
<title depth="1">Normative References</title>
|
520
|
-
</references>
|
521
|
-
<clause id="S" obligation="informative">
|
522
|
-
<title depth="1">Bibliography</title>
|
523
|
-
<references id="T" normative="false" obligation="informative">
|
524
|
-
<title depth="2">Bibliography Subsection</title>
|
525
|
-
</references>
|
526
|
-
</clause>
|
527
|
-
</bibliography>
|
528
|
-
</iso-standard>
|
431
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
432
|
+
<bibdata>
|
433
|
+
<ext>
|
434
|
+
<doctype language="">amendment</doctype>
|
435
|
+
</ext>
|
436
|
+
</bibdata>
|
437
|
+
<boilerplate>
|
438
|
+
<copyright-statement>
|
439
|
+
<clause>
|
440
|
+
<title depth="1">Copyright</title>
|
441
|
+
</clause>
|
442
|
+
</copyright-statement>
|
443
|
+
<license-statement>
|
444
|
+
<clause>
|
445
|
+
<title depth="1">License</title>
|
446
|
+
</clause>
|
447
|
+
</license-statement>
|
448
|
+
<legal-statement>
|
449
|
+
<clause>
|
450
|
+
<title depth="1">Legal</title>
|
451
|
+
</clause>
|
452
|
+
</legal-statement>
|
453
|
+
<feedback-statement>
|
454
|
+
<clause>
|
455
|
+
<title depth="1">Feedback</title>
|
456
|
+
</clause>
|
457
|
+
</feedback-statement>
|
458
|
+
</boilerplate>
|
459
|
+
<preface>
|
460
|
+
<abstract obligation="informative" displayorder="1">
|
461
|
+
<title>Abstract</title>
|
462
|
+
</abstract>
|
463
|
+
<foreword obligation="informative" displayorder="2">
|
464
|
+
<title>Foreword</title>
|
465
|
+
<p id="A">This is a preamble</p>
|
466
|
+
</foreword>
|
467
|
+
<introduction id="B" obligation="informative" displayorder="3">
|
468
|
+
<title depth="1">Introduction</title>
|
469
|
+
<clause id="C" inline-header="false" obligation="informative">
|
470
|
+
<title depth="2">Introduction Subsection</title>
|
471
|
+
</clause>
|
472
|
+
</introduction>
|
473
|
+
<clause id="B1" displayorder="4">
|
474
|
+
<title depth="1">Dedication</title>
|
475
|
+
</clause>
|
476
|
+
<clause id="B2" displayorder="5">
|
477
|
+
<title depth="1">Note to reader</title>
|
478
|
+
</clause>
|
479
|
+
<acknowledgements obligation="informative" displayorder="6">
|
480
|
+
<title>Acknowledgements</title>
|
481
|
+
</acknowledgements>
|
482
|
+
</preface>
|
483
|
+
<sections>
|
484
|
+
<clause id="M" inline-header="false" obligation="normative" displayorder="8">
|
485
|
+
<title depth="1">Clause 4</title>
|
486
|
+
<clause id="N" inline-header="false" obligation="normative">
|
487
|
+
<title depth="2">Introduction</title>
|
488
|
+
</clause>
|
489
|
+
<clause id="O" inline-header="false" obligation="normative">
|
490
|
+
<title depth="2">Clause 4.2</title>
|
491
|
+
</clause>
|
492
|
+
<clause id="O1" inline-header="true" obligation="normative"/>
|
493
|
+
</clause>
|
494
|
+
<clause id="D" obligation="normative" displayorder="9">
|
495
|
+
<title depth="1">Scope</title>
|
496
|
+
<p id="E">Text</p>
|
497
|
+
</clause>
|
498
|
+
</sections>
|
499
|
+
<annex id="P" inline-header="false" obligation="normative" displayorder="10">
|
500
|
+
<title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
|
501
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
502
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
503
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
504
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
505
|
+
</clause>
|
506
|
+
</clause>
|
507
|
+
</annex>
|
508
|
+
<annex id="P1" inline-header="false" obligation="normative" displayorder="11"><title><strong>Annex B</strong><br/>(normative)</title></annex>
|
509
|
+
<bibliography>
|
510
|
+
<references id="R" normative="true" obligation="informative" displayorder="7">
|
511
|
+
<title depth="1">Normative References</title>
|
512
|
+
</references>
|
513
|
+
<clause id="S" obligation="informative" displayorder="12">
|
514
|
+
<title depth="1">Bibliography</title>
|
515
|
+
<references id="T" normative="false" obligation="informative">
|
516
|
+
<title depth="2">Bibliography Subsection</title>
|
517
|
+
</references>
|
518
|
+
</clause>
|
519
|
+
</bibliography>
|
520
|
+
</iso-standard>
|
529
521
|
OUTPUT
|
530
522
|
html = <<~OUTPUT
|
531
523
|
<html lang="en" xmlns:epub="http://www.idpf.org/2007/ops">
|
@@ -617,9 +609,9 @@ RSpec.describe IsoDoc do
|
|
617
609
|
<br/>
|
618
610
|
<b>Annex</b></h1>
|
619
611
|
<div id="Q">
|
620
|
-
<h2>A.1
|
612
|
+
<h2>A.1  Annex A.1</h2>
|
621
613
|
<div id="Q1">
|
622
|
-
<h3>A.1.1
|
614
|
+
<h3>A.1.1  Annex A.1a</h3>
|
623
615
|
</div>
|
624
616
|
</div>
|
625
617
|
</div>
|