metanorma-generic 2.4.2 → 2.4.4

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: f01093350c674908eb5364ed8961536ff3dc4d129dd653ab321da120df792214
4
- data.tar.gz: f350457717265bc34ef4df9d4e8626685cd5909fc6a3627fadc6d91834e0de9d
3
+ metadata.gz: 887490f8778fe098a195bdc2864f62a157779a0fff114b971e00729314ff0256
4
+ data.tar.gz: 43a57233fe44dca78b437cfc5b7b38208b25bb9f41ab0a70571c85baa8b6aa90
5
5
  SHA512:
6
- metadata.gz: 8dd9a8044c3430195378e0fffee524d0008c562aba56b16ab9221a0cc0bef451c53ddb43acbebfe2c06fdb79a43e45b37e4c90b7a3f75cbaa76c17937adc10e2
7
- data.tar.gz: 53cfa9e244fde4a48d41b5a769ebac4ce481b3a3454811d7606d854f8b3dd0bb1c8083c384b7d43b4fccfff3450c9b1957d0165cbf27d2ff755574471467592b
6
+ metadata.gz: f4c1a759d5b44ce75491e9aaa3a1608a815200cabb34c0ecc09e63d5a0f86f3429ff36e7b31b853ddddd7b8acb841abe378591dd03f6bc87eaffd7e2d7648d4d
7
+ data.tar.gz: a9e8da8406b04cb36db99d948dd2dd82c3bd69bdde02f1564b45248ed9fe5192cc16a8666c20112f9aded72f8b6edaa9ff3a129d7782b3e2da696864415031a1
@@ -39,12 +39,17 @@ module Metanorma
39
39
 
40
40
  def doctype(node)
41
41
  d = super
42
- configuration.doctypes or return d == "article" ? (configuration.default_doctype || "standard") : d
42
+ node.attr("doctype") == "article" and d = "article"
43
+ unless configuration.doctypes
44
+ d == "article" and return (configuration.default_doctype || "standard")
45
+ return d
46
+ end
43
47
  type = configuration.default_doctype ||
44
- configuration.doctypes.keys.dig(0) || "standard"
45
- unless configuration.doctypes.keys.include? d
46
- @log.add("Document Attributes", nil,
47
- "#{d} is not a legal document type: reverting to '#{type}'")
48
+ configuration.doctypes.keys[0] || "standard"
49
+ if !configuration.doctypes.key?(d)
50
+ (node.attr("doctype") && node.attr("doctype") != "article") and # factory default
51
+ @log.add("Document Attributes", nil,
52
+ "#{d} is not a legal document type: reverting to '#{type}'")
48
53
  d = type
49
54
  end
50
55
  d
@@ -6,9 +6,10 @@
6
6
  we cannot have a new default namespace: we will end up with a grammar with two different
7
7
  namespaces, one for isostandard and one for csand additions. And we do not want that.
8
8
  -->
9
+ <include href="biblio-standoc.rng"/>
9
10
  <include href="isodoc.rng">
10
11
  <start>
11
- <ref name="generic"/>
12
+ <ref name="generic-standard"/>
12
13
  </start>
13
14
  </include>
14
15
  <define name="generic-standard">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.1 -->
20
+ <!-- VERSION v1.2.2 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -211,6 +211,9 @@
211
211
  <data type="boolean"/>
212
212
  </attribute>
213
213
  </optional>
214
+ <optional>
215
+ <attribute name="style"/>
216
+ </optional>
214
217
  <ref name="CitationType"/>
215
218
  <oneOrMore>
216
219
  <ref name="PureTextElement"/>
@@ -2136,6 +2139,7 @@
2136
2139
  <choice>
2137
2140
  <value>identical</value>
2138
2141
  <value>modified</value>
2142
+ <value>adapted</value>
2139
2143
  <value>restyled</value>
2140
2144
  <value>context-added</value>
2141
2145
  <value>generalisation</value>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "2.4.2".freeze
3
+ VERSION = "2.4.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-25 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities