ruby-xquery 0.0.3.222 → 0.0.4.223
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/xml/xquery/enhanced_find.rb +17 -1
- data/lib/xml/xquery/version.rb +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -29,7 +29,7 @@ module XML::XQuery
|
|
29
29
|
module EnhancedFind
|
30
30
|
|
31
31
|
def enhanced_find(xpath)
|
32
|
-
find(xpath.gsub(/\*\*/, 'descendant::node()'))
|
32
|
+
find(xpath.gsub(/\*\*/, 'descendant::node()'), namespaces)
|
33
33
|
end
|
34
34
|
alias_method :[], :enhanced_find
|
35
35
|
|
@@ -49,9 +49,25 @@ module XML::XQuery
|
|
49
49
|
end
|
50
50
|
|
51
51
|
class XML::Document
|
52
|
+
|
52
53
|
include XML::XQuery::EnhancedFind
|
54
|
+
|
55
|
+
def namespaces
|
56
|
+
@namespaces ||= {}.to_a
|
57
|
+
end
|
58
|
+
|
59
|
+
def namespaces=(ns)
|
60
|
+
@namespaces = ns.to_a
|
61
|
+
end
|
62
|
+
|
53
63
|
end
|
54
64
|
|
55
65
|
class XML::Node
|
66
|
+
|
56
67
|
include XML::XQuery::EnhancedFind
|
68
|
+
|
69
|
+
def namespaces
|
70
|
+
doc.namespaces
|
71
|
+
end
|
72
|
+
|
57
73
|
end
|
data/lib/xml/xquery/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-xquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.223
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-03-
|
12
|
+
date: 2008-03-18 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|