rdf-rdfa 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.13
1
+ 0.3.14
@@ -1039,7 +1039,7 @@ module RDF::RDFa
1039
1039
  :restrictions => TERMorCURIEorAbsIRI.fetch(@version, [])) unless attrs[:datatype].to_s.empty?
1040
1040
  begin
1041
1041
  current_property_value = case
1042
- when datatype && datatype != RDF.XMLLiteral
1042
+ when datatype && ![RDF.XMLLiteral, RDF.HTML].include?(datatype)
1043
1043
  # typed literal
1044
1044
  add_debug(element, "[Step 11] typed literal (#{datatype})")
1045
1045
  RDF::Literal.new(attrs[:datetime] || attrs[:value] || attrs[:content] || element.inner_text.to_s, :datatype => datatype, :language => language, :validate => validate?, :canonicalize => canonicalize?)
@@ -1068,6 +1068,20 @@ module RDF::RDFa
1068
1068
  rescue ArgumentError => e
1069
1069
  add_error(element, e.message)
1070
1070
  end
1071
+ when datatype == RDF.HTML
1072
+ # HTML Literal
1073
+ add_debug(element) {"[Step 11] HTML Literal: #{element.inner_html}"}
1074
+
1075
+ # Just like XMLLiteral, but without the c14nxl
1076
+ begin
1077
+ RDF::Literal.new(element.children.to_html,
1078
+ :library => @library,
1079
+ :datatype => RDF.HTML,
1080
+ :validate => validate?,
1081
+ :canonicalize => canonicalize?)
1082
+ rescue ArgumentError => e
1083
+ add_error(element, e.message)
1084
+ end
1071
1085
  when element.name == 'time'
1072
1086
  # HTML5 support
1073
1087
  # Lexically scan value and assign appropriate type, otherwise, leave untyped
@@ -1110,12 +1124,12 @@ module RDF::RDFa
1110
1124
  add_debug(element, "[Step 11] plain literal (inner text)")
1111
1125
  RDF::Literal.new(element.inner_text.to_s, :language => language, :validate => validate?, :canonicalize => canonicalize?)
1112
1126
  end
1113
- else
1127
+ else # rdfa1.0
1114
1128
  if element.text_content? || (element.children.length == 0) || attrs[:datatype] == ""
1115
1129
  # plain literal
1116
1130
  add_debug(element, "[Step 11 (1.0)] plain literal")
1117
1131
  RDF::Literal.new(attrs[:content] || element.inner_text.to_s, :language => language, :validate => validate?, :canonicalize => canonicalize?)
1118
- elsif !element.text_content? and (datatype == nil or datatype.to_s == RDF.XMLLiteral.to_s)
1132
+ elsif !element.text_content? and (datatype == nil or datatype == RDF.XMLLiteral)
1119
1133
  # XML Literal
1120
1134
  add_debug(element) {"[Step 11 (1.0)] XML Literal: #{element.inner_html}"}
1121
1135
  recurse = false
@@ -177,6 +177,11 @@ module RDF::RDFa
177
177
  end
178
178
  end
179
179
 
180
+ ##
181
+ def to_html
182
+ node_set.map(&:to_s).join("")
183
+ end
184
+
180
185
  ##
181
186
  # Proxy for everything else to @node_set
182
187
  def method_missing(method, *args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-rdfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.13
4
+ version: 0.3.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,44 +10,44 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-17 00:00:00.000000000Z
13
+ date: 2012-05-19 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdf
17
- requirement: &70096958854220 !ruby/object:Gem::Requirement
17
+ requirement: &70178126806620 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.3.3
22
+ version: 0.3.5
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70096958854220
25
+ version_requirements: *70178126806620
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: haml
28
- requirement: &70096958853760 !ruby/object:Gem::Requirement
28
+ requirement: &70178126805920 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.0
33
+ version: 3.1.6
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70096958853760
36
+ version_requirements: *70178126805920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rdf-xsd
39
- requirement: &70096958853260 !ruby/object:Gem::Requirement
39
+ requirement: &70178126789820 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
43
43
  - !ruby/object:Gem::Version
44
- version: 0.3.5
44
+ version: 0.3.7
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70096958853260
47
+ version_requirements: *70178126789820
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: htmlentities
50
- requirement: &70096958852780 !ruby/object:Gem::Requirement
50
+ requirement: &70178126788980 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 4.3.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70096958852780
58
+ version_requirements: *70178126788980
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: nokogiri
61
- requirement: &70096958852240 !ruby/object:Gem::Requirement
61
+ requirement: &70178126788200 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,32 +66,32 @@ dependencies:
66
66
  version: 1.4.4
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70096958852240
69
+ version_requirements: *70178126788200
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: equivalent-xml
72
- requirement: &70096958851780 !ruby/object:Gem::Requirement
72
+ requirement: &70178126787460 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.2.8
77
+ version: 0.2.9
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70096958851780
80
+ version_requirements: *70178126787460
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: open-uri-cached
83
- requirement: &70096958851320 !ruby/object:Gem::Requirement
83
+ requirement: &70178126786760 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
87
87
  - !ruby/object:Gem::Version
88
- version: 0.0.4
88
+ version: 0.0.5
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70096958851320
91
+ version_requirements: *70178126786760
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: spira
94
- requirement: &70096958850860 !ruby/object:Gem::Requirement
94
+ requirement: &70178126786020 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,54 +99,54 @@ dependencies:
99
99
  version: 0.0.12
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70096958850860
102
+ version_requirements: *70178126786020
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec
105
- requirement: &70096958850320 !ruby/object:Gem::Requirement
105
+ requirement: &70178126785320 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
- version: 2.8.0
110
+ version: 2.10.0
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70096958850320
113
+ version_requirements: *70178126785320
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: rdf-spec
116
- requirement: &70096958849800 !ruby/object:Gem::Requirement
116
+ requirement: &70178126784680 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
120
120
  - !ruby/object:Gem::Version
121
- version: 0.3.2
121
+ version: 0.3.5
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *70096958849800
124
+ version_requirements: *70178126784680
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rdf-turtle
127
- requirement: &70096958849340 !ruby/object:Gem::Requirement
127
+ requirement: &70178126783900 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
131
131
  - !ruby/object:Gem::Version
132
- version: 0.1.0
132
+ version: 0.1.2
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *70096958849340
135
+ version_requirements: *70178126783900
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: rdf-rdfxml
138
- requirement: &70096958848840 !ruby/object:Gem::Requirement
138
+ requirement: &70178126783140 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
142
142
  - !ruby/object:Gem::Version
143
- version: 0.3.4
143
+ version: 0.3.7
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *70096958848840
146
+ version_requirements: *70178126783140
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: rdf-isomorphic
149
- requirement: &70096958848340 !ruby/object:Gem::Requirement
149
+ requirement: &70178126782400 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ! '>='
@@ -154,29 +154,29 @@ dependencies:
154
154
  version: 0.3.4
155
155
  type: :development
156
156
  prerelease: false
157
- version_requirements: *70096958848340
157
+ version_requirements: *70178126782400
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: sparql
160
- requirement: &70096958833200 !ruby/object:Gem::Requirement
160
+ requirement: &70178126766180 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ! '>='
164
164
  - !ruby/object:Gem::Version
165
- version: 0.0.2
165
+ version: 0.1.0
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *70096958833200
168
+ version_requirements: *70178126766180
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: yard
171
- requirement: &70096958832640 !ruby/object:Gem::Requirement
171
+ requirement: &70178126765420 !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
174
  - - ! '>='
175
175
  - !ruby/object:Gem::Version
176
- version: 0.6.0
176
+ version: 0.7.5
177
177
  type: :development
178
178
  prerelease: false
179
- version_requirements: *70096958832640
179
+ version_requirements: *70178126765420
180
180
  description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library
181
181
  suite.
182
182
  email: public-rdf-ruby@w3.org