examples/htmldoc.ss
#lang scheme

; this module shows that my XML/XHTML maker at least produces
; a document 100% parseable by plt's built-in XML parser.

(require "../xhtml.ss"
         (prefix-in xml: xml))

(define (main)
  (define-values (input-p output-p) (make-pipe))
  (define producer
    (thread
     (λ ()
       (output
        (document 
         (build-head "Test" "style.css"
                     (link #:rel "next" #:href "test.html"))
         (p "Hi"))
        output-p)
       (close-output-port output-p))))
  
  (xml:display-xml (xml:read-xml input-p)))
(provide main)