relaton-cie 1.9.1 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/README.adoc +28 -0
- data/grammars/basicdoc.rng +26 -7
- data/grammars/biblio.rng +31 -6
- data/grammars/isodoc.rng +687 -89
- data/grammars/reqt.rng +34 -5
- data/lib/relaton_cie/cie_bibliography.rb +1 -1
- data/lib/relaton_cie/data_fetcher.rb +2 -2
- data/lib/relaton_cie/version.rb +1 -1
- data/relaton_cie.gemspec +1 -1
- metadata +4 -4
data/grammars/reqt.rng
CHANGED
@@ -58,15 +58,23 @@
|
|
58
58
|
<optional>
|
59
59
|
<attribute name="type"/>
|
60
60
|
</optional>
|
61
|
+
<optional>
|
62
|
+
<attribute name="tag"/>
|
63
|
+
</optional>
|
64
|
+
<optional>
|
65
|
+
<attribute name="multilingual-rendering">
|
66
|
+
<ref name="MultilingualRenderingType"/>
|
67
|
+
</attribute>
|
68
|
+
</optional>
|
61
69
|
<optional>
|
62
70
|
<ref name="reqtitle"/>
|
63
71
|
</optional>
|
64
72
|
<optional>
|
65
73
|
<ref name="label"/>
|
66
74
|
</optional>
|
67
|
-
<
|
75
|
+
<zeroOrMore>
|
68
76
|
<ref name="subject"/>
|
69
|
-
</
|
77
|
+
</zeroOrMore>
|
70
78
|
<zeroOrMore>
|
71
79
|
<ref name="reqinherit"/>
|
72
80
|
</zeroOrMore>
|
@@ -80,6 +88,7 @@
|
|
80
88
|
<ref name="verification"/>
|
81
89
|
<ref name="import"/>
|
82
90
|
<ref name="description"/>
|
91
|
+
<ref name="component"/>
|
83
92
|
</choice>
|
84
93
|
</zeroOrMore>
|
85
94
|
<optional>
|
@@ -100,17 +109,23 @@
|
|
100
109
|
</define>
|
101
110
|
<define name="label">
|
102
111
|
<element name="label">
|
103
|
-
<
|
112
|
+
<oneOrMore>
|
113
|
+
<ref name="TextElement"/>
|
114
|
+
</oneOrMore>
|
104
115
|
</element>
|
105
116
|
</define>
|
106
117
|
<define name="subject">
|
107
118
|
<element name="subject">
|
108
|
-
<
|
119
|
+
<oneOrMore>
|
120
|
+
<ref name="TextElement"/>
|
121
|
+
</oneOrMore>
|
109
122
|
</element>
|
110
123
|
</define>
|
111
124
|
<define name="reqinherit">
|
112
125
|
<element name="inherit">
|
113
|
-
<
|
126
|
+
<oneOrMore>
|
127
|
+
<ref name="TextElement"/>
|
128
|
+
</oneOrMore>
|
114
129
|
</element>
|
115
130
|
</define>
|
116
131
|
<define name="measurementtarget">
|
@@ -138,6 +153,12 @@
|
|
138
153
|
<ref name="RequirementSubpart"/>
|
139
154
|
</element>
|
140
155
|
</define>
|
156
|
+
<define name="component">
|
157
|
+
<element name="component">
|
158
|
+
<attribute name="class"/>
|
159
|
+
<ref name="RequirementSubpart"/>
|
160
|
+
</element>
|
161
|
+
</define>
|
141
162
|
<define name="reqt_references">
|
142
163
|
<element name="references">
|
143
164
|
<oneOrMore>
|
@@ -164,6 +185,14 @@
|
|
164
185
|
<data type="boolean"/>
|
165
186
|
</attribute>
|
166
187
|
</optional>
|
188
|
+
<optional>
|
189
|
+
<attribute name="tag"/>
|
190
|
+
</optional>
|
191
|
+
<optional>
|
192
|
+
<attribute name="multilingual-rendering">
|
193
|
+
<ref name="MultilingualRenderingType"/>
|
194
|
+
</attribute>
|
195
|
+
</optional>
|
167
196
|
<oneOrMore>
|
168
197
|
<ref name="BasicBlock"/>
|
169
198
|
</oneOrMore>
|
@@ -21,7 +21,7 @@ module RelatonCie
|
|
21
21
|
warn "[relaton-cie] (\"#{code}\") found #{result.docidentifier.first.id}"
|
22
22
|
else
|
23
23
|
warn "[relaton-cie] WARNING no match found online for #{code}. "\
|
24
|
-
|
24
|
+
"The code must be exactly like it is on the standards website."
|
25
25
|
end
|
26
26
|
result
|
27
27
|
end
|
@@ -34,7 +34,7 @@ module RelatonCie
|
|
34
34
|
.gsub(/,(?=\S)/, " ")
|
35
35
|
c = "CIE #{num}"
|
36
36
|
end
|
37
|
-
docid = [RelatonBib::DocumentIdentifier.new(type: "CIE", id: c)]
|
37
|
+
docid = [RelatonBib::DocumentIdentifier.new(type: "CIE", id: c, primary: true)]
|
38
38
|
isbn = doc.at('//dt[contains(.,"ISBN")]/following-sibling::dd')
|
39
39
|
docid << RelatonBib::DocumentIdentifier.new(type: c2.match(/\w+/).to_s, id: c2.strip) if c2
|
40
40
|
docid << RelatonBib::DocumentIdentifier.new(type: "ISBN", id: isbn.text.strip) if isbn
|
@@ -74,7 +74,7 @@ module RelatonCie
|
|
74
74
|
url = "https://www.techstreet.com#{ref[:href]}"
|
75
75
|
title = RelatonBib::TypedTitleString.from_string ref.at('p/span[@class="title"]').text
|
76
76
|
did = ref.at("h3").text
|
77
|
-
docid = [RelatonBib::DocumentIdentifier.new(type: "CIE", id: did)]
|
77
|
+
docid = [RelatonBib::DocumentIdentifier.new(type: "CIE", id: did, primary: true)]
|
78
78
|
on = ref.at("p/time")
|
79
79
|
date = [RelatonBib::BibliographicDate.new(type: "published", on: on[:datetime])]
|
80
80
|
link = [RelatonBib::TypedUri.new(type: "src", content: url)]
|
data/lib/relaton_cie/version.rb
CHANGED
data/relaton_cie.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-cie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.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:
|
11
|
+
date: 2022-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.11.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.11.0
|
125
125
|
description: "RelatonEcma: retrieve CIE Standards for bibliographic use \nusing the
|
126
126
|
BibliographicItem model.\n"
|
127
127
|
email:
|