Package: xpattern

Function matching-value

Lambda List

matching-value (matcher node &optional (default nil))

Arguments

  • matcher -- a pattern matching function
  • node -- any node implementing the XPath protocol
  • default -- an object

Return Value

an object

Details

Apply a pattern matcher to node, and return exactly one value.

For use with matcher functions that have been returned by make-pattern-matcher or a higher-level function like make-pattern-matcher*.

If exactly one pattern matches, or several patterns for the same value match, the user-specified values as determined by pattern-value will be returned by this function.

If no pattern matches, default will be returned instead.

If more than one pattern of highest priority and different values match, an xpath-error will be signalled.

 

See also