(require (lib "ssax.ss" "ssax")) (require (lib "sxml-to-markup.ss" "sxml")) (define my-sentence (ssax:xml->sxml (open-input-file "sentence.xml") '())) (define my-lamp (ssax:xml->sxml (open-input-file "lamp.xml") '())) (define my-html (ssax:xml->sxml (open-input-file "doc.html") '())) ; take a list of strings and return a shtml format ; as a ordered list of boldfaced items ; ; example... ; input: '("one good thing" "another good thing" "it's all good") ; output: '(ol (li (b "one good thing")) ; (li (b "another good thing")) ; (li (b "it's all good"))) (define (xformelt e) (list 'li (list 'b e))) (define (xformelt+ e) `(li (b ,e))) (define (wrap los) (cons 'ol (map xformelt+ los))) (define (gcd-with-first-bigger a b) (let ((c (modulo a b))) (if (= c 0) b (gcd-with-first-bigger b c))))