metanorma-iso 2.7.2 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/init.rb +5 -0
- data/lib/isodoc/iso/iso.amendment.xsl +594 -96
- data/lib/isodoc/iso/iso.international-standard.xsl +594 -96
- data/lib/isodoc/iso/presentation_xml_convert.rb +0 -5
- data/lib/metanorma/iso/biblio.rng +28 -25
- data/lib/metanorma/iso/front_id.rb +9 -14
- data/lib/metanorma/iso/relaton-iso.rng +1 -0
- data/lib/metanorma/iso/validate.rb +1 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
@@ -120,11 +120,6 @@ module IsoDoc
|
|
120
120
|
"#{xml} — "
|
121
121
|
end
|
122
122
|
|
123
|
-
def bibrenderer
|
124
|
-
::Relaton::Render::Iso::General.new(language: @lang,
|
125
|
-
i18nhash: @i18n.get)
|
126
|
-
end
|
127
|
-
|
128
123
|
def bibrender_formattedref(formattedref, xml)
|
129
124
|
%w(techreport standard).include? xml["type"] and return
|
130
125
|
super
|
@@ -338,29 +338,32 @@
|
|
338
338
|
</define>
|
339
339
|
<define name="organization">
|
340
340
|
<element name="organization">
|
341
|
-
<
|
342
|
-
<ref name="orgname"/>
|
343
|
-
</oneOrMore>
|
344
|
-
<zeroOrMore>
|
345
|
-
<ref name="subdivision"/>
|
346
|
-
</zeroOrMore>
|
347
|
-
<optional>
|
348
|
-
<ref name="abbreviation"/>
|
349
|
-
</optional>
|
350
|
-
<zeroOrMore>
|
351
|
-
<ref name="uri"/>
|
352
|
-
</zeroOrMore>
|
353
|
-
<zeroOrMore>
|
354
|
-
<ref name="org-identifier"/>
|
355
|
-
</zeroOrMore>
|
356
|
-
<zeroOrMore>
|
357
|
-
<ref name="contact"/>
|
358
|
-
</zeroOrMore>
|
359
|
-
<optional>
|
360
|
-
<ref name="logo"/>
|
361
|
-
</optional>
|
341
|
+
<ref name="OrganizationType"/>
|
362
342
|
</element>
|
363
343
|
</define>
|
344
|
+
<define name="OrganizationType">
|
345
|
+
<oneOrMore>
|
346
|
+
<ref name="orgname"/>
|
347
|
+
</oneOrMore>
|
348
|
+
<zeroOrMore>
|
349
|
+
<ref name="subdivision"/>
|
350
|
+
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="abbreviation"/>
|
353
|
+
</optional>
|
354
|
+
<zeroOrMore>
|
355
|
+
<ref name="uri"/>
|
356
|
+
</zeroOrMore>
|
357
|
+
<zeroOrMore>
|
358
|
+
<ref name="org-identifier"/>
|
359
|
+
</zeroOrMore>
|
360
|
+
<zeroOrMore>
|
361
|
+
<ref name="contact"/>
|
362
|
+
</zeroOrMore>
|
363
|
+
<optional>
|
364
|
+
<ref name="logo"/>
|
365
|
+
</optional>
|
366
|
+
</define>
|
364
367
|
<define name="orgname">
|
365
368
|
<element name="name">
|
366
369
|
<choice>
|
@@ -371,10 +374,10 @@
|
|
371
374
|
</define>
|
372
375
|
<define name="subdivision">
|
373
376
|
<element name="subdivision">
|
374
|
-
<
|
375
|
-
<
|
376
|
-
|
377
|
-
|
377
|
+
<optional>
|
378
|
+
<attribute name="type"/>
|
379
|
+
</optional>
|
380
|
+
<ref name="OrganizationType"/>
|
378
381
|
</element>
|
379
382
|
</define>
|
380
383
|
<define name="logo">
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require "date"
|
2
|
-
require "pathname"
|
3
2
|
require "twitter_cldr"
|
4
3
|
require "pubid-iso"
|
5
4
|
require "pubid-cen"
|
@@ -22,7 +21,7 @@ module Metanorma
|
|
22
21
|
{ directive: :dir, "technical-report": :tr, "guide": :guide,
|
23
22
|
"technical-specification": :ts,
|
24
23
|
"publicly-available-specification": :pas,
|
25
|
-
"committee-document": :tc }.freeze
|
24
|
+
"committee-document": :tc, "recommendation": :r }.freeze
|
26
25
|
|
27
26
|
# @param type [nil, :tr, :ts, :amd, :cor, :guide, :dir, :tc, Type]
|
28
27
|
# document's type, eg. :tr, :ts, :amd, :cor, Type.new(:tr)
|
@@ -111,12 +110,12 @@ module Metanorma
|
|
111
110
|
|
112
111
|
def tc_number(ret, node)
|
113
112
|
doctype(node) == "committee-document" or return ret
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
113
|
+
{ sc: "subcommittee", tc: "technical-committee",
|
114
|
+
wg: "workgroup" }.each do |k, v|
|
115
|
+
n = node.attr("#{v}-number") and
|
116
|
+
ret.merge!({ "#{k}type": node.attr("#{v}-type") || k.to_s.upcase,
|
117
|
+
"#{k}number": n })
|
118
|
+
end
|
120
119
|
ret
|
121
120
|
end
|
122
121
|
|
@@ -185,9 +184,7 @@ module Metanorma
|
|
185
184
|
def iso_id_default(params)
|
186
185
|
params_nolang = params.dup.tap { |hs| hs.delete(:language) }
|
187
186
|
params1 = if params[:unpublished]
|
188
|
-
params_nolang.dup.tap
|
189
|
-
hs.delete(:year)
|
190
|
-
end
|
187
|
+
params_nolang.dup.tap { |hs| hs.delete(:year) }
|
191
188
|
else params_nolang
|
192
189
|
end
|
193
190
|
params1.delete(:unpublished)
|
@@ -205,9 +202,7 @@ module Metanorma
|
|
205
202
|
|
206
203
|
def iso_id_with_lang(params)
|
207
204
|
params1 = if params[:unpublished]
|
208
|
-
params.dup.tap
|
209
|
-
hs.delete(:year)
|
210
|
-
end
|
205
|
+
params.dup.tap { |hs| hs.delete(:year) }
|
211
206
|
else params end
|
212
207
|
params1.delete(:unpublished)
|
213
208
|
pubid_select(params1).create(**params1)
|
@@ -98,6 +98,7 @@
|
|
98
98
|
<value>publicly-available-specification</value>
|
99
99
|
<value>international-workshop-agreement</value>
|
100
100
|
<value>guide</value>
|
101
|
+
<value>recommendation</value>
|
101
102
|
<value>amendment</value>
|
102
103
|
<value>technical-corrigendum</value>
|
103
104
|
<value>directive</value>
|
@@ -119,7 +119,7 @@ module Metanorma
|
|
119
119
|
def doctype_validate(_xmldoc)
|
120
120
|
%w(international-standard technical-specification technical-report
|
121
121
|
publicly-available-specification international-workshop-agreement
|
122
|
-
guide amendment technical-corrigendum committee-document)
|
122
|
+
guide amendment technical-corrigendum committee-document recommendation)
|
123
123
|
.include? @doctype or
|
124
124
|
@log.add("Document Attributes", nil,
|
125
125
|
"#{@doctype} is not a recognised document type")
|
data/metanorma-iso.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
33
33
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
34
34
|
|
35
|
-
spec.add_dependency "metanorma-standoc", "~> 2.8.
|
35
|
+
spec.add_dependency "metanorma-standoc", "~> 2.8.4"
|
36
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
37
37
|
spec.add_dependency "pubid-cen"
|
38
38
|
spec.add_dependency "pubid-iec"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-04 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: 2.8.
|
19
|
+
version: 2.8.4
|
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: 2.8.
|
26
|
+
version: 2.8.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|