Re: [xml] xmlXPathEval(*str,*ctxt)



On Thu, Mar 28, 2002 at 11:48:06AM -0500, Robert G. Brown wrote:
On Thu, 28 Mar 2002, Daniel Veillard wrote:
Is there a reason that an empty object is allocated and returned even if
the xpath doesn't exist in the associated context?  What can one do with
with such an empty object?

  It's not an empty object.
  It is an object whose type is a node set and that set is empty.
Returning NULL means:
   - execution error
Otherwise the execution returns an object. That object has a type
and a content. You need the type and the content may be empty in case
of a node set. For the list of existing object type see the XPath
specification, XSLT also add Value Tree as an extra type.

  Look at the code of xmlXPathDebugDumpObject() in xpath.c

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]