rdf-rdfa 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +0,0 @@
1
- # This file is automatically generated by ./script/intern_vocabulary
2
- # RDFa vocabulary for http://www.w3.org/2008/05/skos-xl# loaded from http://www.w3.org/2008/05/skos-xl#
3
- require 'rdf/rdfa/expansion'
4
-
5
- module RDF::RDFa::Expansion
6
- [
7
- RDF::Statement.new(RDF::URI('http://www.w3.org/2008/05/skos-xl#Label'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::Node.new('g70249981758620'), :context => RDF::URI('http://www.w3.org/2008/05/skos-xl#')),
8
- ].each {|st| COOKED_VOCAB_STATEMENTS << st }
9
- end
@@ -73,7 +73,7 @@ module RDF::RDFa
73
73
  ( [a-zA-Z_]
74
74
  | \\\\u[0-9a-fA-F]{4}
75
75
  )
76
- ( [0-9a-zA-Z_\.-\/]
76
+ ( [-0-9a-zA-Z_\.\/]
77
77
  | \\\\u([0-9a-fA-F]{4})
78
78
  )*
79
79
  $},
@@ -711,7 +711,6 @@ module RDF::RDFa
711
711
  role
712
712
  src
713
713
  typeof
714
- value
715
714
  vocab
716
715
  ).each do |a|
717
716
  attrs[a.to_sym] = element.attributes[a].to_s.strip if element.attributes[a]
@@ -1091,7 +1090,7 @@ module RDF::RDFa
1091
1090
  when datatype && ![RDF.XMLLiteral, RDF.HTML].include?(datatype)
1092
1091
  # typed literal
1093
1092
  add_debug(element, "[Step 11] typed literal (#{datatype})")
1094
- RDF::Literal.new(attrs[:datetime] || attrs[:value] || attrs[:content] || element.inner_text.to_s, :datatype => datatype, :language => language, :validate => validate?, :canonicalize => canonicalize?)
1093
+ RDF::Literal.new(attrs[:datetime] || attrs[:content] || element.inner_text.to_s, :datatype => datatype, :validate => validate?, :canonicalize => canonicalize?)
1095
1094
  when @version == :"rdfa1.1"
1096
1095
  case
1097
1096
  when datatype == RDF.XMLLiteral
@@ -1131,20 +1130,6 @@ module RDF::RDFa
1131
1130
  rescue ArgumentError => e
1132
1131
  add_error(element, e.message)
1133
1132
  end
1134
- when element.name == 'time'
1135
- # HTML5 support
1136
- # Lexically scan value and assign appropriate type, otherwise, leave untyped
1137
- v = (attrs[:datetime] || element.inner_text).to_s
1138
- datatype = %w(Date Time DateTime Year YearMonth Duration).map {|t| RDF::Literal.const_get(t)}.detect do |dt|
1139
- v.match(dt::GRAMMAR)
1140
- end || RDF::Literal
1141
- add_debug(element) {"[Step 11] <time> literal: #{datatype} #{v.inspect}"}
1142
- datatype.new(v, :language => language)
1143
- when element.name.to_s == 'data' && attrs[:value]
1144
- # HTML5 support
1145
- # plain literal
1146
- add_debug(element, "[Step 11] plain literal (value)")
1147
- RDF::Literal.new(attrs[:value], :language => language, :validate => validate?, :canonicalize => canonicalize?)
1148
1133
  when attrs[:datatype]
1149
1134
  # otherwise, as a plain literal if @datatype is present but has an empty value.
1150
1135
  # The actual literal is either the value of @content (if present) or a string created by
@@ -1156,6 +1141,15 @@ module RDF::RDFa
1156
1141
  # plain literal
1157
1142
  add_debug(element, "[Step 11] plain literal (content)")
1158
1143
  RDF::Literal.new(attrs[:content], :language => language, :validate => validate?, :canonicalize => canonicalize?)
1144
+ when element.name == 'time'
1145
+ # HTML5 support
1146
+ # Lexically scan value and assign appropriate type, otherwise, leave untyped
1147
+ v = (attrs[:datetime] || element.inner_text).to_s
1148
+ datatype = %w(Date Time DateTime Year YearMonth Duration).map {|t| RDF::Literal.const_get(t)}.detect do |dt|
1149
+ v.match(dt::GRAMMAR)
1150
+ end || RDF::Literal
1151
+ add_debug(element) {"[Step 11] <time> literal: #{datatype} #{v.inspect}"}
1152
+ datatype.new(v, :language => language)
1159
1153
  when (attrs[:resource] || attrs[:href] || attrs[:src]) &&
1160
1154
  !(attrs[:rel] || attrs[:rev]) &&
1161
1155
  @version != :"rdfa1.0"
@@ -1448,6 +1442,8 @@ module RDF::RDFa
1448
1442
  value.canonicalize! if canonicalize?
1449
1443
  value = RDF::URI.intern(value) if intern?
1450
1444
  value
1445
+ rescue ArgumentError => e
1446
+ raise RDF::ReaderError, e.message
1451
1447
  end
1452
1448
  end
1453
1449
  end
@@ -320,7 +320,7 @@ module RDF::RDFa
320
320
  list.each_statement {|st| subject_done(st.subject)}
321
321
 
322
322
  add_debug {"list: #{list.inspect} #{list.to_a}"}
323
- render_property(predicate, list.to_a, options.merge(:inlist => ""), &block)
323
+ render_property(predicate, list.to_a, options.merge(:inlist => "true"), &block)
324
324
  end.join(" ")
325
325
  end
326
326
 
metadata CHANGED
@@ -1,289 +1,280 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rdf-rdfa
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- version: 1.0.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Gregg
14
9
  - Kellogg
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2013-01-19 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2013-04-17 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: rdf
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 1
32
- - 0
33
- version: "1.0"
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.5
34
23
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: haml
38
24
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 13
45
- segments:
46
- - 3
47
- - 1
48
- - 7
49
- version: 3.1.7
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 1.0.5
31
+ - !ruby/object:Gem::Dependency
32
+ name: haml
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '4.0'
50
39
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: rdf-xsd
54
40
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 15
61
- segments:
62
- - 1
63
- - 0
64
- version: "1.0"
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '4.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rdf-xsd
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
65
55
  type: :runtime
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: htmlentities
69
56
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- hash: 49
76
- segments:
77
- - 4
78
- - 3
79
- - 1
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '1.0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: htmlentities
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
80
70
  version: 4.3.1
81
71
  type: :runtime
82
- version_requirements: *id004
83
- - !ruby/object:Gem::Dependency
84
- name: backports
85
72
  prerelease: false
86
- requirement: &id005 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
93
- - 0
94
- version: "0"
95
- type: :runtime
96
- version_requirements: *id005
97
- - !ruby/object:Gem::Dependency
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: 4.3.1
79
+ - !ruby/object:Gem::Dependency
98
80
  name: nokogiri
99
- prerelease: false
100
- requirement: &id006 !ruby/object:Gem::Requirement
101
- none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- hash: 15
106
- segments:
107
- - 1
108
- - 5
109
- - 6
110
- version: 1.5.6
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: 1.5.9
111
87
  type: :development
112
- version_requirements: *id006
113
- - !ruby/object:Gem::Dependency
114
- name: equivalent-xml
115
88
  prerelease: false
116
- requirement: &id007 !ruby/object:Gem::Requirement
117
- none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- hash: 19
122
- segments:
123
- - 0
124
- - 3
125
- - 0
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: 1.5.9
95
+ - !ruby/object:Gem::Dependency
96
+ name: equivalent-xml
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
126
102
  version: 0.3.0
127
103
  type: :development
128
- version_requirements: *id007
129
- - !ruby/object:Gem::Dependency
130
- name: open-uri-cached
131
104
  prerelease: false
132
- requirement: &id008 !ruby/object:Gem::Requirement
133
- none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- hash: 21
138
- segments:
139
- - 0
140
- - 0
141
- - 5
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.3.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: open-uri-cached
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
142
118
  version: 0.0.5
143
119
  type: :development
144
- version_requirements: *id008
145
- - !ruby/object:Gem::Dependency
146
- name: json-ld
147
120
  prerelease: false
148
- requirement: &id009 !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- hash: 23
154
- segments:
155
- - 0
156
- - 3
157
- - 2
158
- version: 0.3.2
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: 0.0.5
127
+ - !ruby/object:Gem::Dependency
128
+ name: json-ld
129
+ requirement: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: 0.9.1
159
135
  type: :development
160
- version_requirements: *id009
161
- - !ruby/object:Gem::Dependency
162
- name: rspec
163
136
  prerelease: false
164
- requirement: &id010 !ruby/object:Gem::Requirement
165
- none: false
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- hash: 63
170
- segments:
171
- - 2
172
- - 12
173
- - 0
174
- version: 2.12.0
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: 0.9.1
143
+ - !ruby/object:Gem::Dependency
144
+ name: rspec
145
+ requirement: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: 2.13.0
175
151
  type: :development
176
- version_requirements: *id010
177
- - !ruby/object:Gem::Dependency
178
- name: rdf-microdata
179
152
  prerelease: false
180
- requirement: &id011 !ruby/object:Gem::Requirement
181
- none: false
182
- requirements:
183
- - - ">="
184
- - !ruby/object:Gem::Version
185
- hash: 3
186
- segments:
187
- - 0
188
- version: "0"
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: 2.13.0
159
+ - !ruby/object:Gem::Dependency
160
+ name: rdf-microdata
161
+ requirement: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
189
167
  type: :development
190
- version_requirements: *id011
191
- - !ruby/object:Gem::Dependency
192
- name: rdf-spec
193
168
  prerelease: false
194
- requirement: &id012 !ruby/object:Gem::Requirement
195
- none: false
196
- requirements:
197
- - - ">="
198
- - !ruby/object:Gem::Version
199
- hash: 15
200
- segments:
201
- - 1
202
- - 0
203
- version: "1.0"
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ - !ruby/object:Gem::Dependency
176
+ name: rdf-spec
177
+ requirement: !ruby/object:Gem::Requirement
178
+ none: false
179
+ requirements:
180
+ - - ! '>='
181
+ - !ruby/object:Gem::Version
182
+ version: '1.0'
204
183
  type: :development
205
- version_requirements: *id012
206
- - !ruby/object:Gem::Dependency
207
- name: rdf-turtle
208
184
  prerelease: false
209
- requirement: &id013 !ruby/object:Gem::Requirement
210
- none: false
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- hash: 3
215
- segments:
216
- - 0
217
- version: "0"
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '1.0'
191
+ - !ruby/object:Gem::Dependency
192
+ name: rdf-turtle
193
+ requirement: !ruby/object:Gem::Requirement
194
+ none: false
195
+ requirements:
196
+ - - ! '>='
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
218
199
  type: :development
219
- version_requirements: *id013
220
- - !ruby/object:Gem::Dependency
221
- name: rdf-rdfxml
222
200
  prerelease: false
223
- requirement: &id014 !ruby/object:Gem::Requirement
224
- none: false
225
- requirements:
226
- - - ">="
227
- - !ruby/object:Gem::Version
228
- hash: 3
229
- segments:
230
- - 0
231
- version: "0"
201
+ version_requirements: !ruby/object:Gem::Requirement
202
+ none: false
203
+ requirements:
204
+ - - ! '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ - !ruby/object:Gem::Dependency
208
+ name: rdf-rdfxml
209
+ requirement: !ruby/object:Gem::Requirement
210
+ none: false
211
+ requirements:
212
+ - - ! '>='
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
232
215
  type: :development
233
- version_requirements: *id014
234
- - !ruby/object:Gem::Dependency
235
- name: rdf-isomorphic
236
216
  prerelease: false
237
- requirement: &id015 !ruby/object:Gem::Requirement
238
- none: false
239
- requirements:
240
- - - ">="
241
- - !ruby/object:Gem::Version
242
- hash: 3
243
- segments:
244
- - 0
245
- version: "0"
217
+ version_requirements: !ruby/object:Gem::Requirement
218
+ none: false
219
+ requirements:
220
+ - - ! '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: rdf-isomorphic
225
+ requirement: !ruby/object:Gem::Requirement
226
+ none: false
227
+ requirements:
228
+ - - ! '>='
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
246
231
  type: :development
247
- version_requirements: *id015
248
- - !ruby/object:Gem::Dependency
249
- name: sparql
250
232
  prerelease: false
251
- requirement: &id016 !ruby/object:Gem::Requirement
252
- none: false
253
- requirements:
254
- - - ">="
255
- - !ruby/object:Gem::Version
256
- hash: 3
257
- segments:
258
- - 0
259
- version: "0"
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ none: false
235
+ requirements:
236
+ - - ! '>='
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ - !ruby/object:Gem::Dependency
240
+ name: sparql
241
+ requirement: !ruby/object:Gem::Requirement
242
+ none: false
243
+ requirements:
244
+ - - ! '>='
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
260
247
  type: :development
261
- version_requirements: *id016
262
- - !ruby/object:Gem::Dependency
263
- name: yard
264
248
  prerelease: false
265
- requirement: &id017 !ruby/object:Gem::Requirement
266
- none: false
267
- requirements:
268
- - - ">="
269
- - !ruby/object:Gem::Version
270
- hash: 57
271
- segments:
272
- - 0
273
- - 8
274
- - 3
275
- version: 0.8.3
249
+ version_requirements: !ruby/object:Gem::Requirement
250
+ none: false
251
+ requirements:
252
+ - - ! '>='
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ - !ruby/object:Gem::Dependency
256
+ name: yard
257
+ requirement: !ruby/object:Gem::Requirement
258
+ none: false
259
+ requirements:
260
+ - - ! '>='
261
+ - !ruby/object:Gem::Version
262
+ version: 0.8.5
276
263
  type: :development
277
- version_requirements: *id017
278
- description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library suite.
264
+ prerelease: false
265
+ version_requirements: !ruby/object:Gem::Requirement
266
+ none: false
267
+ requirements:
268
+ - - ! '>='
269
+ - !ruby/object:Gem::Version
270
+ version: 0.8.5
271
+ description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library
272
+ suite.
279
273
  email: public-rdf-ruby@w3.org
280
274
  executables: []
281
-
282
275
  extensions: []
283
-
284
276
  extra_rdoc_files: []
285
-
286
- files:
277
+ files:
287
278
  - AUTHORS
288
279
  - README
289
280
  - UNLICENSE
@@ -313,41 +304,30 @@ files:
313
304
  - lib/rdf/rdfa/writer/haml_templates.rb
314
305
  - lib/rdf/rdfa/writer.rb
315
306
  - lib/rdf/rdfa.rb
316
- homepage: http://github.com/ruby-rdf/rdf-rdfa
317
- licenses:
307
+ homepage: http://ruby-rdf.github.com/rdf-rdfa
308
+ licenses:
318
309
  - Public Domain
319
310
  post_install_message:
320
311
  rdoc_options: []
321
-
322
- require_paths:
312
+ require_paths:
323
313
  - lib
324
- required_ruby_version: !ruby/object:Gem::Requirement
314
+ required_ruby_version: !ruby/object:Gem::Requirement
325
315
  none: false
326
- requirements:
327
- - - ">="
328
- - !ruby/object:Gem::Version
329
- hash: 57
330
- segments:
331
- - 1
332
- - 8
333
- - 7
316
+ requirements:
317
+ - - ! '>='
318
+ - !ruby/object:Gem::Version
334
319
  version: 1.8.7
335
- required_rubygems_version: !ruby/object:Gem::Requirement
320
+ required_rubygems_version: !ruby/object:Gem::Requirement
336
321
  none: false
337
- requirements:
338
- - - ">="
339
- - !ruby/object:Gem::Version
340
- hash: 3
341
- segments:
342
- - 0
343
- version: "0"
322
+ requirements:
323
+ - - ! '>='
324
+ - !ruby/object:Gem::Version
325
+ version: '0'
344
326
  requirements: []
345
-
346
327
  rubyforge_project: rdf-rdfa
347
- rubygems_version: 1.8.24
328
+ rubygems_version: 1.8.25
348
329
  signing_key:
349
330
  specification_version: 3
350
331
  summary: RDFa reader/writer for RDF.rb.
351
332
  test_files: []
352
-
353
333
  has_rdoc: false