chickadee » sxpath » sxml:filter

sxml:filter pred?procedure

Returns a procedure that accepts a nodelist or a node (which will be converted to a one-element nodelist) and returns only those nodes for which the predicate pred? does not return #f or '().

((sxml:filter (ntype?? 'div)) '((div "hi") (span "hello") (div "still here?")))
 => ((div "hi") (div "still here?"))