Package: xpath-sys

Macro define-xpath-function/single-type

Lambda List

define-xpath-function/single-type (ext name type args &body body)

Arguments

  • ext -- name of an XPath extension (a symbol)
  • name -- XPath function name
  • args -- XPath function arguments

Details

Defines an XPath function, "eager" style with automatic type conversion.

The body is evaluated during evaluation of XPath expressions each time the function being defined is called. It's passed a list of values corresponding to XPath function arguments and should return a value of one of XPath types (string, boolean, number, node set). Argument values are automatically converted to specified XPath type.

Example:
   (xpath-sys:define-xpath-function/single-type my-ext add-quotes string (string)
     (concat "\"" string "\""))   
 

See also