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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b67209d73be23ff04c3933a086c5e9de18463c17472b535305642a81df58820c
4
- data.tar.gz: e13a27804003551fd7da54476f27b61d98f7a23234a3e5eafc6900fe22265a8a
3
+ metadata.gz: b9ee078ae53c881c7b83242412a6adb7e238e5b471119280c22edc6f7b45a71e
4
+ data.tar.gz: 553430cda221363dbcef14070bba64f214b2269dd4b4d5e52927e574ffae2f4d
5
5
  SHA512:
6
- metadata.gz: 73714b546a1f6a7680400be13c4672e33c38f897688409258085972dc593c0dd45c8327b4340c4d9b535c4f32d0c8b0ea4d58db1855659162b7b9a6eb26d9dca
7
- data.tar.gz: 3289bacc2f84c35c53f98e6950aafa0530189293340be023eff84a81b917c6287a7f9df48295bad57e617e0de610a54f14b5c8aff394680abfdb41d7e5f29a46
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
- <ref name="PureTextElement"/>
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
- <text/>
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
- <text/>
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
- <text/>
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
- e.next = n.dup
141
- e.next.name = "fn"
142
- e.next.delete("format")
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
- node.attr("status") || node.attr("docstage") || "60"
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") || (stage == "60" ? "60" : "00")
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)