xpointer with python-libxml2?
Ben Decker <[email protected]> Fri, 13 Jun 2003 17:23:14 +0100
| Newsgroups | gmane.comp.gnome.lib.xml.bindings |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--=_NextPart_Lycos_0177711055517794_ID
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hello,
I am tesing the libxml2 python wrapper for libxml2 2.5.4.
I know that xinclude and xpointer are available in libxml2. When I
process an XML document containing (example):
<a>
<xi:include href="/dev/d/d/xml/program/python.xml#xpointer
(//python/libs)" parse="xml"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:fallback/>
</xi:include>
</a>
...using xsltproc, the resulting xml correctly includes the section from
the external XML document. When I process the same XML document
with python using:
import libxml2
doc = libxml2.parseFile("sample.xml")
branch = doc.xpathEval("a")
...or however...the link in no case seems to get recognized. Some
scripts return an error like:
"""
XPath error Undefined namespace prefix
/a/xi:include/xi:fallback
xmlXPathEval: evaluation failed
"""
Should the python libxml2 wrapper recognize xpointers like this? If so,
can anyone 'point' me to some examples of the implementation?
Thanks,
Ben
This is your brain:
bash-2.05$
This is your brain on drugs:
Starting Windows XP...
Any questions?
Get your free 15MB mailbox on Lycos Email - http://mail.lycos.co.uk
--=_NextPart_Lycos_0177711055517794_ID--