[plexippus-xpath-devel] error with expression pointing to nonexistent child node

Ivan Shvedunov ivan4th at gmail.com
Fri Sep 17 07:06:45 UTC 2010


Hello,

On Fri, Sep 17, 2010 at 3:28 AM, David A. Thompson <thompdump at gmail.com> wrote:
> Depending on the xpath expression, when a match isn't found, either an
> empty node-set is returned or an error occurs. Is this deliberate?
>
> 1. Match works as expected:
>
> TTEST> (xpath:evaluate "/etx" (cxml:parse "<etx></etx>" (stp:make-builder)))
>
> #<XPATH:NODE-SET #.(ELEMENT LOCAL-NAME etx), ... {C9378D9}>
>
>
> 2. Evaluation of this xpath expression yields an empty node set:
>
> TTEST> (xpath:evaluate "/foo" (cxml:parse "<etx></etx>" (stp:make-builder)))
>
> #<XPATH:NODE-SET empty {CA0A879}>
>
>
> 3. Evaluation of this xpath expression triggers an error:
>
> TTEST> (xpath:evaluate "//foo" (cxml:parse "<etx></etx>"
> (stp:make-builder)))
>

No, it should not signal an error when a match isn't found.
Which CL implementation are you using? (looks like SBCL?)
I cannot reproduce this problem, what does the backtrace look like?

-- 
Ivan Shvedunov <ivan4th at gmail.com>
;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9  F7D0 613E C0F8 0BC5 2807




More information about the plexippus-xpath-devel mailing list