[xml-bindings] XPointer & string-range with libxml2-python


I want to evaluate XPointer expressions with libxml2-python. It works well when a XPointer selects one or several nodes. However I do not succeed in evaluating XPointer that uses the function string-range.

For example, here is my xml file:
<?xml version = "1.0"?>
       <ENTRY ID="pa">
       <ENTRY ID="en">

And here is my code:
import libxml2

It does not work and it gives me the following error:
Unable to convert XPath object type 7
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/libxml2.py", line 6443, in xpointerEval
   if ret is None:raise treeError('xmlXPtrEval() failed')
libxml2.treeError: xmlXPtrEval() failed

Is there something wrong in my code or in my XPointer ? Does the evaluation of that XPointer work if I use libxml2 directly ?

Moreover several xpointer-functions of xmlNode (xpointerNewCollapsedRange ...) do not work. I have tried with an old version (python2.3.4 and libxml2-2.6.13) and with the latest(python2.4.1 and libxml2-2.6.19) but there have not been any improvements.

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