Re: [xml] string-range in xpointers from python?



On Fri, Aug 18, 2006 at 10:44:30AM -0500, Ross J. Reedstrom wrote:
O.k, so this is better, some:
print ctx.xpointerEval('xpointer(/cnx:document/cnx:content/cnx:para[1])')[0].content

      Geometric representation of signals can provide a compact
      characterization of signals and can simplify analysis of their
      performance as modulation signals.

ctx.xpointerEval('xpointer(string-range(/cnx:document/cnx:content/cnx:para[1],"Geometric"))')
Unable to convert XPath object type 7

I see this same error from a list posting a year ago, May. I'm using
libxml2 2.6.26. Is there more complete support in CVS? Should I be
getting my devel setup functional, and see about providing a patch or
two?

  Hum, yeah, that must be the binding missing support from the extra
XPath types (XPATH_POINT, XPATH_RANGE and XPATH_LOCATIONSET), I guess
nobody tried to really use them from Python, you're in unknown land.
  Probably libxml_xmlXPathObjectPtrWrap() should be augmented to 
handle them (python/types.c around line 397), and convert them to Python
type. I don't know what would be the best way to represent a point, 
maybe a tuple made of a node and an index.
  I would be glad to get patches and some example to run the regression tests
from python/test/ !

  Thanks in advance :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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