Re: [xml] XSL context from node



On Fri, Jun 03, 2005 at 11:08:08AM -0700, Byron Wright wrote:
Hi all,

I cannot seem to find any indication of this from looking at the API  
documentation. Is it possible to create a xmlXPathContextPtr from a  
node (xmlNodePtr) ?

  You create an evaluation context for the document of the node.
Then do ctxt->node = node

say I have a XPath that I evaluate, which returns a xmlXPathObjectPtr  
containing a nodeset. What I would then like to do is perform further  
xPath evaluations on this nodeset.

  you will have to loop over the values of the node set and update
the node of the context for each of them.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
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]