waffle-debugging added by iterrogo on Wed Apr 23 17:46:09 2014

(define (sxml-apply-rules content . rules)
  (fold (λ (rules content)
          (pre-post-order* content rules)) content rules))

(define (expand-waffle-sxml sxml)
    (let* ((widget-rules `((*text* . ,(λ (tag str) str))
                         (*default* . ,cons)
                         (*TOP* . ,(λ (tag str) str))
                         . ,(widget-rules) ; Each widget needs its own rule as we can't use *macro* with *default* without creating an endless loop.                                             
                         )))
    (sxml-apply-rules (pre-post-order* sxml widget-rules))))