diff options
Diffstat (limited to 'lib/rexml/xpath_parser.rb')
-rw-r--r-- | lib/rexml/xpath_parser.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb index e30581d3d0..47fa4ef84e 100644 --- a/lib/rexml/xpath_parser.rb +++ b/lib/rexml/xpath_parser.rb @@ -499,7 +499,11 @@ module REXML else # FIXME: This DOUBLES the time XPath searches take ns = get_namespace(raw_node.element, prefix) - raw_node.name == name and raw_node.namespace == ns + if ns.empty? + raw_node.name == name and raw_node.prefix.empty? + else + raw_node.name == name and raw_node.namespace == ns + end end else false |