; selects all the 'item' elements that have an 'olist' parent (which is not root) ; and that are in the same document as the context node ; ; Abbreviated XPath: //olist/item ; Full XPath: /descendant::olist/child::item (define tree '(doc (olist (item "1")) (item "2") (nested (olist (item "3")))) ) ; Low-level: ((node-join (node-closure (ntype?? 'olist)) (select-kids (ntype?? 'item))) tree) ; SXPath: ((sxpath `(// olist item)) tree) ==> ((item "1") (item "3"))