#!/usr/bin/guile -s !# (use-modules (sxml match)) (define (unbogus x) (sxml-match x ((a (@ . ,attrs) ...) `(a (@ ,@(delete '(shape "rect") attrs)) ...)))) (define bad '(a (@ (shape "rect") (href "foo.html")) "kid")) (pk bad) (pk (unbogus bad)) ;; expect: (a (@ (href "foo.html")) "kid")