[libxml2] Fix XPath expressions of the form '@ns:*'
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix XPath expressions of the form '@ns:*'
- Date: Sun, 4 Aug 2013 23:32:24 +0000 (UTC)
commit e8de99f90cde4832065d7a87d74393a46c191d0b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Aug 5 01:26:25 2013 +0200
Fix XPath expressions of the form '@ns:*'
Use namespace for match-all queries on the attribute axis.
xpath.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index 09adb00..b4cdcdc 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]