summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2013-08-05 01:26:25 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2013-08-05 01:26:25 +0200
commite8de99f90cde4832065d7a87d74393a46c191d0b (patch)
treee009ef13d66784a1fd519139a8debe5e668ae476 /xpath.c
parentb4bcba23f64b71105514875f165a63d4cc720609 (diff)
downloadlibxml2-e8de99f90cde4832065d7a87d74393a46c191d0b.tar.gz
Fix XPath expressions of the form '@ns:*'
Use namespace for match-all queries on the attribute axis.
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xpath.c b/xpath.c
index 09adb005..b4cdcdc8 100644
--- a/xpath.c
+++ b/xpath.c
@@ -12425,7 +12425,14 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
if (axis == AXIS_ATTRIBUTE) {
if (cur->type == XML_ATTRIBUTE_NODE)
{
- XP_TEST_HIT
+ if (prefix == NULL)
+ {
+ XP_TEST_HIT
+ } else if ((cur->ns != NULL) &&
+ (xmlStrEqual(URI, cur->ns->href)))
+ {
+ XP_TEST_HIT
+ }
}
} else if (axis == AXIS_NAMESPACE) {
if (cur->type == XML_NAMESPACE_DECL)