(load (string-append laml-dir "laml.scm")) (laml-style "simple-xhtml1.0-transitional-validating") (define doc (html (head (title "Table Examples")) (body (p 'id "5" "First paragraph") (p (em "Second") "paragraph") (div (p "Third paragraph"))))) (match-ast doc (location-step 'child "body") (location-step 'child "div")) (match-ast doc (location-step 'descendant "p")) (match-ast doc (location-step 'child "body") (location-step 'child "p" (nt:child-number 2))) (match-ast doc (location-step 'descendant "p" (nt:for-which (location-step 'attribute "id")))) (find-asts doc "p" ast-text) (find-first-ast doc "p") (traverse-and-collect-all-from-ast doc (lambda (ast) ...) id-1) (write-html '(pp prolog) doc ) (end-laml)