summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 10:15:07 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 10:15:07 +0000
commit7defdcdd04d528200347bd55b54d0e8408e3ce5a (patch)
tree83cfb25cc9f446449c6eae6d6e237be17233a917
parentf22d0647a2beea8ae01650a7fed7abade081133f (diff)
XPath: Fixed all_in_namespace node test
git-svn-id: http://pugixml.googlecode.com/svn/trunk@213 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r--src/pugixpath.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp
index 8e53487..a2859ec 100644
--- a/src/pugixpath.cpp
+++ b/src/pugixpath.cpp
@@ -1498,7 +1498,7 @@ namespace pugi
break;
case nodetest_all_in_namespace:
- if (!strncmp(a.name(), m_contents, strlen(m_contents)) && a.name()[strlen(m_contents)] == ':')
+ if (!strncmp(a.name(), m_contents, strlen(m_contents)))
ns.push_back(xpath_node(a, parent));
break;
@@ -1547,8 +1547,7 @@ namespace pugi
break;
case nodetest_all_in_namespace:
- if (n.type() == node_element && !strncmp(n.name(), m_contents, strlen(m_contents)) &&
- n.name()[strlen(m_contents)] == ':')
+ if (n.type() == node_element && !strncmp(n.name(), m_contents, strlen(m_contents)))
ns.push_back(n);
break;
@@ -3279,7 +3278,7 @@ namespace pugi
if (nt_name.size() > 2 && colon_pos == nt_name.size() - 2 && nt_name[nt_name.size() - 1] == '*') // NCName:*
{
- nt_name.erase(nt_name.size() - 1);
+ nt_name.erase(nt_name.size() - 1); // erase *
nt_type = nodetest_all_in_namespace;
}