[plexippus-xpath-devel] do-node-set woes

David Lichteblau david at lichteblau.com
Tue May 26 11:05:08 UTC 2009


Quoting Peter Stiernstr?m (peter at stiernstrom.se):
>   (xpath:do-node-set (n (xpath:evaluate "//c" doc))
>     (format t "~d~%" (xpath:number-value (xpath:evaluate "//d" n)))))
> 
> I would like to have this print:
> 1
> 2
> 3
> 
> But instead it always prints:
> 1
> 1
> 1

Use ".//d" rather than "//d".  The latter doesn't start at N, it starts
at the root of the document, ignoring the context node N.


d.




More information about the plexippus-xpath-devel mailing list