[xuriella-devel] Question concerning custom xpath functions returning node sets

David Lichteblau david at lichteblau.com
Sun May 20 14:39:29 UTC 2012


Hi,

Quoting R. Mattes (rm at mh-freiburg.de):
> My first (naive) implementation looked like this:
> 
>  (xpath-sys:define-xpath-function/eager 
>     my fun (string &optional (count 1))
>   (loop for i from 0 to count
>         collect string into value-list
>         finally (return (xpath-sys:make-node-set 
>                          (xpath-sys:make-pipe (car value-list) (cdr
> value-list))))))

sorry for the late reply.  I suspect that by now you might have come up
with a solution yourself, so I'll keep my answer brief for now:

I think you need to return a set of nodes, whereas you have a set of
strings, and a string as such isn't a node.

If the above is too obscure, please let me know, and I'll elaborate! :-)


d.




More information about the xuriella-devel mailing list