#| -*-Scheme-*-
-$Id: xhtml.scm,v 1.4 2004/07/15 19:50:43 cph Exp $
+$Id: xhtml.scm,v 1.5 2004/07/18 04:34:00 cph Exp $
Copyright 2002,2003,2004 Massachusetts Institute of Technology
""))))
(define (html:comment . strings)
- (make-xml-comment (string-append " " (apply string-append strings) " ")))
\ No newline at end of file
+ (make-xml-comment
+ (let* ((s (apply string-append (map canonicalize-char-data strings)))
+ (ws (utf8-string->wide-string s))
+ (n (wide-string-length ws)))
+ (if (fix:> n 0)
+ (string-append
+ (if (char-whitespace? (wide-string-ref ws 0)) "" " ")
+ s
+ (if (char-whitespace? (wide-string-ref ws (fix:- n 1))) "" " "))
+ " "))))
\ No newline at end of file
#| -*-Scheme-*-
-$Id: xml.pkg,v 1.43 2004/07/12 19:08:36 cph Exp $
+$Id: xml.pkg,v 1.44 2004/07/18 04:34:06 cph Exp $
Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology
%make-xml-parameter-!entity
%make-xml-parameter-entity-ref
%make-xml-processing-instructions
- %make-xml-unparsed-!entity))
+ %make-xml-unparsed-!entity)
+ (export (runtime xml html)
+ canonicalize-char-data))
(define-package (runtime xml parser)
(files "xml-chars" "xml-parser")