[xml] xpointer with python-libxml2?


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):
<xi:include href="/dev/d/d/xml/program/python.xml#xpointer
(//python/libs)" parse="xml" 

...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
xmlXPathEval: evaluation failed

Should the python libxml2 wrapper recognize xpointers like this? If so, 
can anyone 'point' me to some examples of the implementation?


This is your brain:
This is your brain on drugs:
    Starting Windows XP...
Any questions?

Get your free 15MB mailbox on Lycos Email - http://mail.lycos.co.uk

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]