ruby-xquery 0.0.4.223 → 0.0.5.224
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 +11 -3
- data/lib/xml/xquery/version.rb +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -52,12 +52,19 @@ class XML::Document
|
|
52
52
|
|
53
53
|
include XML::XQuery::EnhancedFind
|
54
54
|
|
55
|
+
DEFAULT_NAMESPACES = []
|
56
|
+
|
57
|
+
# container for XML::Node's access to its document's namespaces
|
58
|
+
@namespaces = Hash.new(DEFAULT_NAMESPACES)
|
59
|
+
|
60
|
+
class << self; attr_reader :namespaces; end
|
61
|
+
|
55
62
|
def namespaces
|
56
|
-
@namespaces ||=
|
63
|
+
@namespaces ||= DEFAULT_NAMESPACES
|
57
64
|
end
|
58
65
|
|
59
66
|
def namespaces=(ns)
|
60
|
-
@namespaces = ns.to_a
|
67
|
+
@namespaces = self.class.namespaces[to_s] = ns.to_a
|
61
68
|
end
|
62
69
|
|
63
70
|
end
|
@@ -67,7 +74,8 @@ class XML::Node
|
|
67
74
|
include XML::XQuery::EnhancedFind
|
68
75
|
|
69
76
|
def namespaces
|
70
|
-
|
77
|
+
# this is *damn* inefficient!!
|
78
|
+
XML::Document.namespaces[doc.to_s]
|
71
79
|
end
|
72
80
|
|
73
81
|
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.5.224
|
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-21 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|