Re: [xml] xpath: empty nodeset



On Mon, Mar 11, 2002 at 10:50:34AM +0100, Felix Natter wrote:
hi,

~/src/libxml2-2.4.17 $ ./testXPath -i ~/.ftimerrc.xml '//controlpoint'
Object is a Node Set :
Set contains 0 nodes:

where this is .ftimerrc.xml:

<?xml version="1.0"?>
<interval-controlpoints xmlns="http://www.felix-natter.de/ftimerrc/1.0/";>
 <largest-interval unit="hours" value="10"/>
 <controlpoint unit="hours" value="10">
  <interval unit="hours" value="5"/>
 </controlpoint>

  Yes, that means libxml2 XPath engine is compliant to the
W3C XPath specification.  controlpoint nodes are in a namespace
defined by your xmlns="" on the root.
   //controlpoint
doesn't match namespaced nodes with a local name 'controlpoint'
they have an expanded-name different from the one specified by the test.

  time to read the spec !
    http://www.w3.org/TR/xpath#node-tests

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]