[xml] RE: namespaces in XPath queries (bug?)
- From: "Igor Zlatkovic" <izlatkovic daenet de>
- To: "Krzysztof Jarecki" <zenderx ipro pl>
- Cc: <xml gnome org>
- Subject: [xml] RE: namespaces in XPath queries (bug?)
- Date: Fri, 5 Oct 2001 11:07:43 +0200
Hi there.
I am forwarding your message to the libxml2 mailing list. Chances are
that someone there knows the cure for you.
I'm using the libxml 2.4.3 for Win32 (IA32) that You have compiled.
[...]
Error C:\php4-build\ports\source\libxml2-2.3.7\xpath.c:6565:
Undefined namespace prefix
file://xform:caption
^
Take a look at the location of the offending .c file in the error line
above. I started providing binaries as of version 2.4.0, so far I can
remember. More, I have never had my sources in
c:\php4-build\ports\source\. I don't know what you are running, but it
is nothing of my creation.
Ciao
Igor
-----Original Message-----
From: Krzysztof Jarecki [mailto:zenderx ipro pl]
Sent: Thursday, October 04, 2001 6:57 PM
To: Igor Zlatkovic
Subject: namespaces in XPath queries (bug?)
hi;)
I'm using the libxml 2.4.3 for Win32 (IA32) that You have compiled.
My development enviroment consists also from an apache 1.3.20
and php 4.0.6.
I have encountered a small problem using XPath and namespaces.
I have the following (tested example) XML:
<?xml version="1.0"?>
<xform:xform xmlns:xform="www.xdom.pl/myxforms">
<xform:caption>Test</xform:caption>
</xform:xform>
and I would like to issue a simple XPath query like:
"//caption"
and this gives an empty result...
so I tried something like this:
"//xform:caption"
and I saw that libxml gives me the following error in
apache's error log:
Error C:\php4-build\ports\source\libxml2-2.3.7\xpath.c:6565:
Undefined namespace prefix
file://xform:caption
^
xmlXPathEval: evaluation failed
Entity: line 1: warning: Namespace prefix xform is not defined
<xform:xform>
^
Entity: line 2: warning: Namespace prefix xform is not defined
When I've changed the xml to look like this:
<?xml version="1.0"?>
<xform:xform xmlns:xform="www.xdom.pl/myxforms">
<caption>Test</caption>
</xform:xform>
the query "//caption" worked perfectly.
I'm writing to You in order to maybe get some help...
I don't know whether I do something wrong (maybe there's a
special namespace calling convention in XPath?) or
this is a bug in libxml...???
Hope to hear from You:)
Any word will be appreciated ;)
Chris Jarecki
Ipro Int.
www.ipro.pl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]