metanorma-bipm 2.5.11 → 2.6.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.
@@ -99,15 +99,16 @@ module IsoDoc
99
99
 
100
100
  def eref(docxml)
101
101
  super
102
- jcgm_eref(docxml, "//eref")
102
+ jcgm_eref(docxml, "//fmt-eref")
103
103
  end
104
104
 
105
105
  def origin(docxml)
106
106
  super
107
- jcgm_eref(docxml, "//origin[not(termref)]")
107
+ jcgm_eref(docxml, "//fmt-origin[not(.//termref)]")
108
108
  end
109
109
 
110
- def quotesource(docxml)
110
+ # KILL
111
+ def quotesourcex(docxml)
111
112
  super
112
113
  jcgm_eref(docxml, "//quote//source")
113
114
  end
@@ -118,9 +119,9 @@ module IsoDoc
118
119
  # merge adjacent text nodes
119
120
  docxml.root.replace(Nokogiri::XML(docxml.root.to_xml).root)
120
121
  docxml.xpath(ns(xpath)).each do |x| # rubocop: disable Style/CombinableLoops
121
- if x.next&.text? && /^\],\s+\[$/.match?(x.next.text) &&
122
- %w(eref origin source).include?(x.next.next&.name)
123
- x.next.replace(", ")
122
+ if x.parent.next&.text? && /^\],\s+\[$/.match?(x.parent.next.text) &&
123
+ %w(eref origin fmt-eref fmt-origin).include?(x.parent.next.next&.name)
124
+ x.parent.next.replace(", ")
124
125
  end
125
126
  end
126
127
  end
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
947
947
  typically cited as "personal communication")</a:documentation>
948
948
  <value>conversation</value>
949
949
  <a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
950
+ <value>collection</value>
951
+ <a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
950
952
  <value>misc</value>
951
953
  <a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
952
954
  </choice>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns='https://www.metanorma.org/ns/bipm' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!--
4
4
  VERSION v1.2.1
5
5
  Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
@@ -8,9 +8,6 @@
8
8
  -->
9
9
  <include href="relaton-bipm.rng"/>
10
10
  <include href="isodoc.rng">
11
- <start>
12
- <ref name="bipm-standard"/>
13
- </start>
14
11
  <define name="XrefAttributes" combine="interleave">
15
12
  <optional>
16
13
  <attribute name="pagenumber">
@@ -93,35 +90,35 @@
93
90
  <attribute name="start"/>
94
91
  </optional>
95
92
  </define>
93
+ <define name="standard-document">
94
+ <element name="metanorma">
95
+ <ref name="Root-Attributes"/>
96
+ <ref name="bibdata"/>
97
+ <zeroOrMore>
98
+ <ref name="termdocsource"/>
99
+ </zeroOrMore>
100
+ <optional>
101
+ <ref name="misccontainer"/>
102
+ </optional>
103
+ <optional>
104
+ <ref name="boilerplate"/>
105
+ </optional>
106
+ <optional>
107
+ <ref name="preface"/>
108
+ </optional>
109
+ <oneOrMore>
110
+ <ref name="sections"/>
111
+ </oneOrMore>
112
+ <zeroOrMore>
113
+ <ref name="annex"/>
114
+ </zeroOrMore>
115
+ <optional>
116
+ <ref name="bibliography"/>
117
+ </optional>
118
+ <zeroOrMore>
119
+ <ref name="indexsect"/>
120
+ </zeroOrMore>
121
+ </element>
122
+ </define>
96
123
  </include>
97
- <define name="bipm-standard">
98
- <element name="bipm-standard">
99
- <ref name="Root-Attributes"/>
100
- <ref name="bibdata"/>
101
- <zeroOrMore>
102
- <ref name="termdocsource"/>
103
- </zeroOrMore>
104
- <optional>
105
- <ref name="misccontainer"/>
106
- </optional>
107
- <optional>
108
- <ref name="boilerplate"/>
109
- </optional>
110
- <optional>
111
- <ref name="preface"/>
112
- </optional>
113
- <oneOrMore>
114
- <ref name="sections"/>
115
- </oneOrMore>
116
- <zeroOrMore>
117
- <ref name="annex"/>
118
- </zeroOrMore>
119
- <optional>
120
- <ref name="bibliography"/>
121
- </optional>
122
- <zeroOrMore>
123
- <ref name="indexsect"/>
124
- </zeroOrMore>
125
- </element>
126
- </define>
127
124
  </grammar>
@@ -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.4.1 -->
20
+ <!-- VERSION v2.0.0 -->
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">
@@ -459,11 +459,14 @@ gives an explicit page orientation</a:documentation>
459
459
  <a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
460
460
  </ref>
461
461
  </zeroOrMore>
462
- <zeroOrMore>
463
- <ref name="PureTextElement">
462
+ <optional>
463
+ <element name="display-text">
464
464
  <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
465
- </ref>
466
- </zeroOrMore>
465
+ <oneOrMore>
466
+ <ref name="PureTextElement"/>
467
+ </oneOrMore>
468
+ </element>
469
+ </optional>
467
470
  </define>
468
471
  </include>
469
472
  <!-- end overrides -->
@@ -1205,10 +1208,13 @@ numbers</a:documentation>
1205
1208
  <value>presentation</value>
1206
1209
  </choice>
1207
1210
  </attribute>
1211
+ <attribute name="flavor">
1212
+ <a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
1213
+ </attribute>
1208
1214
  </define>
1209
1215
  <define name="standard-document">
1210
1216
  <a:documentation>Representation of a standardisation document</a:documentation>
1211
- <element name="standard-document">
1217
+ <element name="metanorma">
1212
1218
  <ref name="Root-Attributes"/>
1213
1219
  <ref name="bibdata">
1214
1220
  <a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Bipm
3
- VERSION = "2.5.11".freeze
3
+ VERSION = "2.6.0".freeze
4
4
  end
5
5
  end
@@ -27,8 +27,8 @@ 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-generic", "~> 2.7.4"
31
- spec.add_dependency "metanorma-iso", "~> 2.9.2"
30
+ spec.add_dependency "metanorma-generic", "~> 3.0.0"
31
+ spec.add_dependency "metanorma-iso", "~> 3.0.0"
32
32
 
33
33
  spec.add_development_dependency "debug"
34
34
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.11
4
+ version: 2.6.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-01-20 00:00:00.000000000 Z
11
+ date: 2025-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.7.4
19
+ version: 3.0.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: 2.7.4
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: metanorma-iso
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.9.2
33
+ version: 3.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.9.2
40
+ version: 3.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: debug
43
43
  requirement: !ruby/object:Gem::Requirement