metanorma-iso 1.9.2 → 1.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/basicdoc.rng +21 -4
- data/lib/asciidoctor/iso/cleanup.rb +3 -4
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/front_id.rb +7 -2
- data/lib/asciidoctor/iso/isodoc.rng +241 -61
- data/lib/asciidoctor/iso/isostandard.rng +10 -23
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- data/lib/asciidoctor/iso/section.rb +7 -1
- data/lib/asciidoctor/iso/validate_section.rb +18 -20
- data/lib/asciidoctor/iso/validate_style.rb +17 -9
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/index.rb +48 -24
- data/lib/isodoc/iso/iso.amendment.xsl +407 -123
- data/lib/isodoc/iso/iso.international-standard.xsl +407 -123
- data/lib/isodoc/iso/metadata.rb +28 -16
- data/lib/isodoc/iso/presentation_xml_convert.rb +30 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -1
- data/spec/asciidoctor/base_spec.rb +351 -177
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +39 -0
- data/spec/asciidoctor/refs_spec.rb +1 -1
- data/spec/isodoc/inline_spec.rb +306 -245
- data/spec/isodoc/terms_spec.rb +30 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/vcr_cassettes/docrels.yml +393 -0
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9ee078ae53c881c7b83242412a6adb7e238e5b471119280c22edc6f7b45a71e
|
4
|
+
data.tar.gz: 553430cda221363dbcef14070bba64f214b2269dd4b4d5e52927e574ffae2f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acd0cd92b131c86e859891c63d26dc2ef6e093a26667350f90b6a2ade3062e33737c154f732f7cbe6b4e82ced031e368641fa06ff9acb825ff17abf1546dedcf
|
7
|
+
data.tar.gz: 43082f2a384ad764599231c6b0378c3d5df8ba74a3db9209e9d7341c76f74700f23260689aa65287a7c889f777a4c66359c568a66180e332959d00ffa17b7bda
|
@@ -624,6 +624,9 @@
|
|
624
624
|
<choice>
|
625
625
|
<ref name="PureTextElement"/>
|
626
626
|
<ref name="stem"/>
|
627
|
+
<ref name="eref"/>
|
628
|
+
<ref name="xref"/>
|
629
|
+
<ref name="hyperlink"/>
|
627
630
|
</choice>
|
628
631
|
</zeroOrMore>
|
629
632
|
</element>
|
@@ -634,6 +637,9 @@
|
|
634
637
|
<choice>
|
635
638
|
<ref name="PureTextElement"/>
|
636
639
|
<ref name="stem"/>
|
640
|
+
<ref name="eref"/>
|
641
|
+
<ref name="xref"/>
|
642
|
+
<ref name="hyperlink"/>
|
637
643
|
</choice>
|
638
644
|
</zeroOrMore>
|
639
645
|
</element>
|
@@ -641,7 +647,12 @@
|
|
641
647
|
<define name="tt">
|
642
648
|
<element name="tt">
|
643
649
|
<zeroOrMore>
|
644
|
-
<
|
650
|
+
<choice>
|
651
|
+
<ref name="PureTextElement"/>
|
652
|
+
<ref name="eref"/>
|
653
|
+
<ref name="xref"/>
|
654
|
+
<ref name="hyperlink"/>
|
655
|
+
</choice>
|
645
656
|
</zeroOrMore>
|
646
657
|
</element>
|
647
658
|
</define>
|
@@ -822,7 +833,9 @@
|
|
822
833
|
<attribute name="alt"/>
|
823
834
|
</optional>
|
824
835
|
<ref name="CitationType"/>
|
825
|
-
<
|
836
|
+
<oneOrMore>
|
837
|
+
<ref name="PureTextElement"/>
|
838
|
+
</oneOrMore>
|
826
839
|
</define>
|
827
840
|
<define name="hyperlink">
|
828
841
|
<element name="link">
|
@@ -835,7 +848,9 @@
|
|
835
848
|
<optional>
|
836
849
|
<attribute name="alt"/>
|
837
850
|
</optional>
|
838
|
-
<
|
851
|
+
<oneOrMore>
|
852
|
+
<ref name="PureTextElement"/>
|
853
|
+
</oneOrMore>
|
839
854
|
</element>
|
840
855
|
</define>
|
841
856
|
<define name="xref">
|
@@ -849,7 +864,9 @@
|
|
849
864
|
<optional>
|
850
865
|
<attribute name="alt"/>
|
851
866
|
</optional>
|
852
|
-
<
|
867
|
+
<oneOrMore>
|
868
|
+
<ref name="PureTextElement"/>
|
869
|
+
</oneOrMore>
|
853
870
|
</element>
|
854
871
|
</define>
|
855
872
|
<define name="fn">
|
@@ -137,10 +137,9 @@ module Asciidoctor
|
|
137
137
|
xmldoc.xpath("//bibitem/note[@type = 'Unpublished-Status']").each do |n|
|
138
138
|
id = n.parent["id"]
|
139
139
|
e = xmldoc.at("//eref[@bibitemid = '#{id}']") or next
|
140
|
-
|
141
|
-
|
142
|
-
e.next
|
143
|
-
e.next.delete("type")
|
140
|
+
fn = n.children.to_xml
|
141
|
+
n&.elements&.first&.name == "p" or fn = "<p>#{fn}</p>"
|
142
|
+
e.next = "<fn>#{fn}</fn>"
|
144
143
|
end
|
145
144
|
end
|
146
145
|
|
@@ -116,7 +116,7 @@ module Asciidoctor
|
|
116
116
|
|
117
117
|
xml.title(**attr_code(at.merge(type: "title-amd"))) do |t1|
|
118
118
|
t1 << Metanorma::Utils::asciidoc_sub(
|
119
|
-
node.attr("title-amendment-#{lang}")
|
119
|
+
node.attr("title-amendment-#{lang}"),
|
120
120
|
)
|
121
121
|
end
|
122
122
|
end
|
@@ -144,6 +144,14 @@ module Asciidoctor
|
|
144
144
|
title_amd(node, xml, lang, at) if @amd
|
145
145
|
end
|
146
146
|
end
|
147
|
+
|
148
|
+
def relaton_relations
|
149
|
+
super + %w(obsoletes)
|
150
|
+
end
|
151
|
+
|
152
|
+
def relaton_relation_descriptions
|
153
|
+
super.merge("amends" => "updates")
|
154
|
+
end
|
147
155
|
end
|
148
156
|
end
|
149
157
|
end
|
@@ -193,12 +193,17 @@ module Asciidoctor
|
|
193
193
|
end
|
194
194
|
|
195
195
|
def get_stage(node)
|
196
|
-
|
196
|
+
a = node.attr("status")
|
197
|
+
a = node.attr("docstage") if a.nil? || a.empty?
|
198
|
+
a = "60" if a.nil? || a.empty?
|
199
|
+
a
|
197
200
|
end
|
198
201
|
|
199
202
|
def get_substage(node)
|
200
203
|
stage = get_stage(node)
|
201
|
-
node.attr("docsubstage")
|
204
|
+
ret = node.attr("docsubstage")
|
205
|
+
ret = (stage == "60" ? "60" : "00") if ret.nil? || ret.empty?
|
206
|
+
ret
|
202
207
|
end
|
203
208
|
|
204
209
|
def get_typeabbr(node, amd = false)
|