metanorma-ogc 1.4.3 → 1.5.0

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: 6d485aa36153e193dceebf844193f8042fce9db6ce93b00e66ac43e7755a541e
4
- data.tar.gz: '0692880332b57c821956e5d9ec5e3dd3ddf94e33f8b6b92f8f16b89f72bae1b9'
3
+ metadata.gz: '031379ecf57a52c5e03554fcd26e612d80b12c662e5c02653e334726baa9a763'
4
+ data.tar.gz: 4308644ba756016b6a58d9d8f135fb03a54d3f88b85dd21e1b1c670e225d080d
5
5
  SHA512:
6
- metadata.gz: f6d4d7d832023e182ef9f0bbe2a4603a5827f7667131f3a27cdc3ebd1a57917483011396f67b160ac91d65576d6d04a73fee200064f2caf0d10736ece807d51c
7
- data.tar.gz: 846eb44d909ef21e3a08b3bddcb4171271a92dd65cf4c9d208dac02154228ac1b18699d2a71c0e1e7bc2a7912160dc815429bf5a80873591e0ae3708d5ca1693
6
+ metadata.gz: bfde0fdf6dea362dabefafd7451d12cae304298ab60617fa33fe1d013ada9dda8636741892f5ef51d7120f5ddeb80775cae198b7f92eddc6cc490ed9d8b480b8
7
+ data.tar.gz: d7f3fb149f6d529cf5e21c59e55e7bae77d74d5fb2d36457df75b41789029603443071249133cdea8222f21d2be30bea423eedb8f00ed05129532164bc879eaf
@@ -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">
@@ -138,10 +138,15 @@ module Asciidoctor
138
138
  end
139
139
  end
140
140
 
141
+ def termdef_cleanup(xmldoc)
142
+ super
143
+ termdef_subclause_cleanup(xmldoc)
144
+ end
145
+
141
146
  # skip annex/terms/terms, which is empty node
142
147
  def termdef_subclause_cleanup(xmldoc)
143
- xmldoc.xpath("//annex//terms[terms]").each do |t|
144
- next if t.parent.name == "terms"
148
+ xmldoc.xpath("//annex//clause[terms]").each do |t|
149
+ next unless t.xpath("./clause | ./terms | ./definitions").size == 1
145
150
 
146
151
  t.children.each { |n| n.parent = t.parent }
147
152
  t.remove
@@ -160,7 +165,7 @@ module Asciidoctor
160
165
  r["type"] = case r["type"]
161
166
  when "requirement", "recommendation", "permission"
162
167
  "general"
163
- when "requirement_class" then "class"
168
+ when "requirements_class" then "class"
164
169
  when "conformance_test" then "verification"
165
170
  when "conformance_class" then "conformanceclass"
166
171
  when "abstract_test" then "abstracttest"
@@ -124,7 +124,7 @@ module Asciidoctor
124
124
 
125
125
  def example(node)
126
126
  role = node.role || node.attr("style")
127
- if %w(requirement_class conformance_test conformance_class
127
+ if %w(requirements_class conformance_test conformance_class
128
128
  abstract_test).include?(role)
129
129
  node.set_attr("type", role)
130
130
  return requirement(node, "requirement")