metanorma-generic 3.1.5 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22323f43a3dd010a733c4e125a219b0fa1e6c6ae9f566acdb6540c9aa04fc927
|
|
4
|
+
data.tar.gz: 1bc07cc00da944bd36c832427da46fa4a93107873256b172b453a4d1f940ee4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 574d5c20ca45f7d74d1865548f5aa9fe09187efaeaeadf984f2768264e20184b750fd434885ec069dcf3ed03d6493c8fb75c59bc9f862a51eae418aead9db9a9
|
|
7
|
+
data.tar.gz: 6fda9039ba49b66fc273671af0daa1543aacdd74d8206088a555d67978a0ec6d86bd4488e1a6aa972820a9aaa1ba4da7ddfa4c14bb9746f5ca6ea74d96ce1e1e
|
|
@@ -869,7 +869,7 @@ depending on whether the items exist as independent documents, or are parts of a
|
|
|
869
869
|
</zeroOrMore>
|
|
870
870
|
</element>
|
|
871
871
|
</define>
|
|
872
|
-
<define name="BibItemType"
|
|
872
|
+
<define name="BibItemType">
|
|
873
873
|
<a:documentation>Type of bibliographic item.
|
|
874
874
|
The value list complies with the types provided in ISO 690:2021.
|
|
875
875
|
NOTE: These values represent a strict superset to BibTeX
|
|
@@ -39,8 +39,7 @@ module Metanorma
|
|
|
39
39
|
type = @default_doctype || configuration.doctypes.keys[0]
|
|
40
40
|
if !configuration.doctypes.key?(d)
|
|
41
41
|
node.attr("doctype") && node.attr("doctype") != "article" and # factory default
|
|
42
|
-
@log.add("
|
|
43
|
-
"#{d} is not a legal document type: reverting to '#{type}'")
|
|
42
|
+
@log.add("GENERIC_1", nil, params: [d, type])
|
|
44
43
|
d = type
|
|
45
44
|
end
|
|
46
45
|
d
|
|
@@ -114,8 +113,7 @@ module Metanorma
|
|
|
114
113
|
stages.empty? and return
|
|
115
114
|
stage = xmldoc.at("//bibdata/status/stage")&.text
|
|
116
115
|
stages.include? stage or
|
|
117
|
-
@log.add("
|
|
118
|
-
"#{stage} is not a recognised status")
|
|
116
|
+
@log.add("GENERIC_2", nil, params: [stage])
|
|
119
117
|
end
|
|
120
118
|
|
|
121
119
|
def committee_validate(xmldoc)
|
|
@@ -124,8 +122,7 @@ module Metanorma
|
|
|
124
122
|
xmldoc.xpath("//bibdata/contributor[role/description = 'committee']/" \
|
|
125
123
|
"organization/subdivision/name").each do |c|
|
|
126
124
|
committees.include? c.text or
|
|
127
|
-
@log.add("
|
|
128
|
-
"#{c.text} is not a recognised committee")
|
|
125
|
+
@log.add("GENERIC_3", nil, params: [c.text])
|
|
129
126
|
end
|
|
130
127
|
end
|
|
131
128
|
|
|
@@ -166,7 +163,7 @@ module Metanorma
|
|
|
166
163
|
Metanorma::Generic::Configuration::CONFIG_ATTRS.each do |a|
|
|
167
164
|
conv.meta.set(a, configuration.send(a))
|
|
168
165
|
end
|
|
169
|
-
#conv.meta.set(:bibdata, bibdata_hash(xmldoc))
|
|
166
|
+
# conv.meta.set(:bibdata, bibdata_hash(xmldoc))
|
|
170
167
|
@isodoc = conv
|
|
171
168
|
@isodoc
|
|
172
169
|
end
|
|
@@ -192,3 +189,5 @@ module Metanorma
|
|
|
192
189
|
end
|
|
193
190
|
end
|
|
194
191
|
end
|
|
192
|
+
|
|
193
|
+
require "metanorma/generic/log"
|
|
@@ -311,17 +311,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
311
311
|
</ref>
|
|
312
312
|
</optional>
|
|
313
313
|
<choice>
|
|
314
|
-
<a:documentation>Content of the figure</a:documentation>
|
|
315
|
-
<ref name="image"
|
|
314
|
+
<a:documentation>Content of the figure </a:documentation>
|
|
315
|
+
<ref name="image">
|
|
316
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
317
|
+
</ref>
|
|
316
318
|
<ref name="video"/>
|
|
317
319
|
<ref name="audio"/>
|
|
318
|
-
<ref name="pre"
|
|
320
|
+
<ref name="pre">
|
|
321
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
|
322
|
+
</ref>
|
|
319
323
|
<oneOrMore>
|
|
320
|
-
<ref name="paragraph-with-footnote"
|
|
324
|
+
<ref name="paragraph-with-footnote">
|
|
325
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
|
326
|
+
</ref>
|
|
321
327
|
</oneOrMore>
|
|
322
328
|
<zeroOrMore>
|
|
323
|
-
<ref name="figure"
|
|
329
|
+
<ref name="figure">
|
|
330
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
|
331
|
+
</ref>
|
|
324
332
|
</zeroOrMore>
|
|
333
|
+
<ref name="table">
|
|
334
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
|
335
|
+
</ref>
|
|
325
336
|
</choice>
|
|
326
337
|
<zeroOrMore>
|
|
327
338
|
<ref name="fn">
|
|
@@ -354,17 +365,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
354
365
|
</ref>
|
|
355
366
|
</optional>
|
|
356
367
|
<choice>
|
|
357
|
-
<a:documentation>Content of the figure</a:documentation>
|
|
358
|
-
<ref name="image-no-id"
|
|
368
|
+
<a:documentation>Content of the figure </a:documentation>
|
|
369
|
+
<ref name="image-no-id">
|
|
370
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
371
|
+
</ref>
|
|
359
372
|
<ref name="video-no-id"/>
|
|
360
373
|
<ref name="audio-no-id"/>
|
|
361
|
-
<ref name="pre-no-id"
|
|
374
|
+
<ref name="pre-no-id">
|
|
375
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
|
376
|
+
</ref>
|
|
362
377
|
<oneOrMore>
|
|
363
|
-
<ref name="paragraph-with-footnote-no-id"
|
|
378
|
+
<ref name="paragraph-with-footnote-no-id">
|
|
379
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
|
380
|
+
</ref>
|
|
364
381
|
</oneOrMore>
|
|
365
382
|
<zeroOrMore>
|
|
366
|
-
<ref name="figure-no-id"
|
|
383
|
+
<ref name="figure-no-id">
|
|
384
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
|
385
|
+
</ref>
|
|
367
386
|
</zeroOrMore>
|
|
387
|
+
<ref name="table-no-id">
|
|
388
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
|
389
|
+
</ref>
|
|
368
390
|
</choice>
|
|
369
391
|
<zeroOrMore>
|
|
370
392
|
<ref name="fn">
|
|
@@ -876,6 +898,9 @@ titlecase, or lowercase</a:documentation>
|
|
|
876
898
|
<data type="boolean"/>
|
|
877
899
|
</attribute>
|
|
878
900
|
</optional>
|
|
901
|
+
<ref name="LocalizedStringAttributes">
|
|
902
|
+
<a:documentation>Specify language of bibitem, can be used to render it with language-specific bibliographic style</a:documentation>
|
|
903
|
+
</ref>
|
|
879
904
|
<ref name="ReducedBibliographicItem"/>
|
|
880
905
|
</element>
|
|
881
906
|
</define>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Metanorma
|
|
2
|
+
module Generic
|
|
3
|
+
class Converter
|
|
4
|
+
GENERIC_LOG_MESSAGES = {
|
|
5
|
+
# rubocop:disable Naming/VariableNumber
|
|
6
|
+
"GENERIC_1": { category: "Document Attributes",
|
|
7
|
+
error: "%s is not a legal document type: reverting to '%s'",
|
|
8
|
+
severity: 2 },
|
|
9
|
+
"GENERIC_2": { category: "Document Attributes",
|
|
10
|
+
error: "%s is not a recognised status",
|
|
11
|
+
severity: 2 },
|
|
12
|
+
"GENERIC_3": { category: "Document Attributes",
|
|
13
|
+
error: "%s is not a recognised committee",
|
|
14
|
+
severity: 2 },
|
|
15
|
+
}.freeze
|
|
16
|
+
# rubocop:enable Naming/VariableNumber
|
|
17
|
+
|
|
18
|
+
def log_messages
|
|
19
|
+
super.merge(GENERIC_LOG_MESSAGES)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/metanorma-generic.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "metanorma-standoc", "~> 3.
|
|
30
|
+
spec.add_dependency "metanorma-standoc", "~> 3.2.0"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "debug"
|
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
|
@@ -40,5 +40,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
|
40
40
|
spec.add_development_dependency "sassc-embedded", "~> 1"
|
|
41
41
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
|
42
42
|
spec.add_development_dependency "timecop", "~> 0.9"
|
|
43
|
-
spec.add_development_dependency "canon"
|
|
43
|
+
spec.add_development_dependency "canon", "= 0.1.3"
|
|
44
44
|
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: 3.
|
|
4
|
+
version: 3.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: 3.2.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -182,16 +182,16 @@ dependencies:
|
|
|
182
182
|
name: canon
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
|
-
- -
|
|
185
|
+
- - '='
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version:
|
|
187
|
+
version: 0.1.3
|
|
188
188
|
type: :development
|
|
189
189
|
prerelease: false
|
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
|
192
|
-
- -
|
|
192
|
+
- - '='
|
|
193
193
|
- !ruby/object:Gem::Version
|
|
194
|
-
version:
|
|
194
|
+
version: 0.1.3
|
|
195
195
|
description: |
|
|
196
196
|
Metanorma template gem for customisation. This gem is meant to be customised for any downstream use.
|
|
197
197
|
|
|
@@ -245,6 +245,7 @@ files:
|
|
|
245
245
|
- lib/metanorma/generic/front.rb
|
|
246
246
|
- lib/metanorma/generic/generic.rng
|
|
247
247
|
- lib/metanorma/generic/isodoc.rng
|
|
248
|
+
- lib/metanorma/generic/log.rb
|
|
248
249
|
- lib/metanorma/generic/processor.rb
|
|
249
250
|
- lib/metanorma/generic/reqt.rng
|
|
250
251
|
- lib/metanorma/generic/rsd.rng
|