relaton-w3c 1.9.6 → 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/data/reference.W3C.P3P.xml +38 -38
- 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_w3c/bibxml_parser.rb +17 -0
- data/lib/relaton_w3c/data_fethcer.rb +1 -1
- data/lib/relaton_w3c/data_parser.rb +1 -1
- data/lib/relaton_w3c/scrapper.rb +1 -1
- data/lib/relaton_w3c/version.rb +1 -1
- data/lib/relaton_w3c.rb +1 -0
- data/relaton_w3c.gemspec +1 -1
- metadata +7 -6
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>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RelatonW3c
|
2
|
+
module BibXMLParser
|
3
|
+
extend RelatonBib::BibXMLParser
|
4
|
+
extend BibXMLParser
|
5
|
+
|
6
|
+
#
|
7
|
+
# Return PubID type
|
8
|
+
#
|
9
|
+
# @param [String] _ docidentifier
|
10
|
+
#
|
11
|
+
# @return [String] type
|
12
|
+
#
|
13
|
+
def pubid_type(_)
|
14
|
+
"W3C"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -49,7 +49,7 @@ module RelatonW3c
|
|
49
49
|
query.each { |sl| save_doc DataParser.parse(sl, self) }
|
50
50
|
Dir[File.expand_path("../../data/*", __dir__)].each do |file|
|
51
51
|
xml = File.read file, encoding: "UTF-8"
|
52
|
-
save_doc
|
52
|
+
save_doc BibXMLParser.parse(xml)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
data/lib/relaton_w3c/scrapper.rb
CHANGED
@@ -39,7 +39,7 @@ module RelatonW3c
|
|
39
39
|
# @return [Array<RelatonBib::DocumentIdentifier>]
|
40
40
|
def fetch_docid(hit)
|
41
41
|
id = hit["link"].split("/").last
|
42
|
-
[RelatonBib::DocumentIdentifier.new(id: id, type: "W3C")]
|
42
|
+
[RelatonBib::DocumentIdentifier.new(id: id, type: "W3C", primary: true)]
|
43
43
|
end
|
44
44
|
|
45
45
|
# @param hit [Hash]
|
data/lib/relaton_w3c/version.rb
CHANGED
data/lib/relaton_w3c.rb
CHANGED
data/relaton_w3c.gemspec
CHANGED
@@ -40,6 +40,6 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_dependency "linkeddata", "~> 3.1.0"
|
41
41
|
spec.add_dependency "mechanize", "~> 2.8.0"
|
42
42
|
spec.add_dependency "rdf", "~> 3.1.0"
|
43
|
-
spec.add_dependency "relaton-bib", "
|
43
|
+
spec.add_dependency "relaton-bib", "~> 1.11.0"
|
44
44
|
spec.add_dependency "sparql", "~> 3.1.0"
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-w3c
|
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: 2022-
|
11
|
+
date: 2022-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -126,16 +126,16 @@ dependencies:
|
|
126
126
|
name: relaton-bib
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.11.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: 1.11.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sparql
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +200,7 @@ files:
|
|
200
200
|
- grammars/isodoc.rng
|
201
201
|
- grammars/reqt.rng
|
202
202
|
- lib/relaton_w3c.rb
|
203
|
+
- lib/relaton_w3c/bibxml_parser.rb
|
203
204
|
- lib/relaton_w3c/data_fethcer.rb
|
204
205
|
- lib/relaton_w3c/data_parser.rb
|
205
206
|
- lib/relaton_w3c/hash_converter.rb
|