aboutsummaryrefslogtreecommitdiffstats
path: root/pattern.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-02-05 14:00:10 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-02-05 14:00:10 +0000
commit0996a162c90716627b8b3bfec71fa941357d1aca (patch)
tree568112b25c69d91289fd46adc8d7ab4adfff7a09 /pattern.c
parente92bf5d6f4c0024264d83f1d2f6d50ac8e58419c (diff)
downloadandroid_external_libxml2-0996a162c90716627b8b3bfec71fa941357d1aca.tar.gz
android_external_libxml2-0996a162c90716627b8b3bfec71fa941357d1aca.tar.bz2
android_external_libxml2-0996a162c90716627b8b3bfec71fa941357d1aca.zip
fixed the namespaces support fixed xmlGetNodePath when namespaces are used
* pattern.c: fixed the namespaces support * tree.c: fixed xmlGetNodePath when namespaces are used * result/pattern/multiple result/pattern/namespaces test/pattern/multiple.* test/pattern/namespaces.*: added more regression tests Daniel
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/pattern.c b/pattern.c
index e9975f76..66452247 100644
--- a/pattern.c
+++ b/pattern.c
@@ -19,8 +19,6 @@
* currently push(NULL, NULL) means a reset of the streaming context
* and indicating we are on / (the document node), probably need
* something similar for .
- * - xmlPatterncompile support of namespaces arguments, I'm not sure
- * it's implemented and definitely not tested
* - handling of disjunction "pattern1 | pattern2" mean needed to build
* and check a list internally
* - get rid of the "compile" starting with lowercase
@@ -882,7 +880,6 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
NEXT;
if (CUR != ':') {
xmlChar *prefix = name;
- xmlNsPtr ns;
int i;
/*
@@ -891,7 +888,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
token = xmlPatScanName(ctxt);
for (i = 0;i < ctxt->nb_namespaces;i++) {
if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
- URL = xmlStrdup(ctxt->namespaces[2 * i + 1]);
+ URL = xmlStrdup(ctxt->namespaces[2 * i]);
break;
}
}
@@ -901,8 +898,6 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
prefix);
ctxt->error = 1;
goto error;
- } else {
- URL = xmlStrdup(ns->href);
}
xmlFree(prefix);
if (token == NULL) {