rexle 0.9.19 → 0.9.20
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.
- data/lib/rexle.rb +5 -3
- metadata +2 -2
data/lib/rexle.rb
CHANGED
@@ -10,6 +10,8 @@ require 'cgi'
|
|
10
10
|
include REXML
|
11
11
|
|
12
12
|
# modifications:
|
13
|
+
# 16-Mar-2012: bug fix: Element names which contain a colon can now be selected
|
14
|
+
# in the xpath.
|
13
15
|
# 22-Feb-2012: bug resolution: Deactivated the PolyrexParser; using RexleParser instead
|
14
16
|
# 14-Jan-2012: Implemented Rexle::Elements#each
|
15
17
|
# 21-Dec-2011: Bug fix: xpath modified to allow querying from the actual
|
@@ -232,12 +234,12 @@ class Rexle
|
|
232
234
|
end
|
233
235
|
|
234
236
|
# isolate the xpath to return just the path to the current element
|
235
|
-
elmnt_path = s[/^([\w
|
237
|
+
elmnt_path = s[/^([\w:\*]+\[[^\]]+\])|[\/]+{,2}[^\/]+/]
|
236
238
|
element_part = elmnt_path[/(^@?[^\[]+)?/,1] if elmnt_path
|
237
239
|
|
238
240
|
if element_part then
|
239
241
|
unless element_part[/^@/] then
|
240
|
-
element_name = element_part[/^[\w
|
242
|
+
element_name = element_part[/^[\w:\*]+/]
|
241
243
|
else
|
242
244
|
condition = element_part
|
243
245
|
element_name = nil
|
@@ -294,7 +296,7 @@ class Rexle
|
|
294
296
|
else
|
295
297
|
|
296
298
|
# strip off the 1st element from the XPath
|
297
|
-
new_xpath = xpath_value[
|
299
|
+
new_xpath = xpath_value[/^\/\/[\w:]+\/(.*)/,1]
|
298
300
|
|
299
301
|
if new_xpath then
|
300
302
|
self.xpath(new_xpath + raw_condition.to_s + remaining_path, rlist,&blk)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rexle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.20
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Robertson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-03-16 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|