(module sxml-modifications (sxml-modify sxml-modify! sxml-delete sxml-delete-undeep sxml-rename sxml-insert-into sxml-insert-preceding sxml-insert-following) (import (chicken base) scheme) (import xpath-parser sxpath-lolevel context-sxpath-lolevel ddo-sxpath-lolevel) (import (only srfi-1 filter)) (define nl (string #\newline)) (define (cerr . args) (for-each (lambda (x) (if (procedure? x) (x (current-error-port)) (display x (current-error-port)))) args)) (include "modif.scm") ;; Change this to raise an error (set! sxml:modification-error (lambda text (apply error "Modification error: " text))) (define sxml-modify sxml:modify) (define sxml-modify! sxml:modify!) (define sxml-insert-following modif:insert-following) (define sxml-insert-preceding modif:insert-preceding) (define sxml-insert-into modif:insert-into) (define sxml-delete modif:delete) (define sxml-delete-undeep modif:delete-undeep) (define sxml-rename modif:rename))