Hi guilers, Just a note to say that we found a solution to nalaginrut's problem on IRC.
(lambda (mypattern) ;; Instead of testing the head of the pattern in the sxml-match, I ;; have moved it out to here. (let* ((new-tag (if (equal? mypattern (car cl)) 'success 'fail)) ;; replace the head with 'success or 'fail depending on a match (new-expr (cons new-tag (cdr cl)))) (sxml-match new-expr ;; here we test against the new head [(success (@ (type ,tv)) ,cv) ...] [,otherwise #f]))) Another suggestion was to use syntax-rules to create the match pattern at expand time. If anyone else has a better solution, feel free to pipe up. :) Ian