From: Chris Hanson Date: Wed, 15 Oct 2003 01:25:14 +0000 (+0000) Subject: Don't put empty character data strings in element content. X-Git-Tag: 20090517-FFI~1771 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a6773c71e5afe39cbf756db2183fd50941a9361b;p=mit-scheme.git Don't put empty character data strings in element content. --- diff --git a/v7/src/xml/xml-parser.scm b/v7/src/xml/xml-parser.scm index 38e4f9526..9385b2931 100644 --- a/v7/src/xml/xml-parser.scm +++ b/v7/src/xml/xml-parser.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-parser.scm,v 1.49 2003/09/26 19:39:03 cph Exp $ +$Id: xml-parser.scm,v 1.50 2003/10/15 01:25:14 cph Exp $ Copyright 2001,2002,2003 Massachusetts Institute of Technology @@ -365,7 +365,16 @@ USA. #t)))) (define parse-char-data ;[14] - (terminated-region-parser "character data" alphabet:char-data "]]>")) + (let ((parse-body + (terminated-region-parser "character data" + alphabet:char-data + "]]>"))) + (*parser + (transform (lambda (v) + (if (string-null? (vector-ref v 0)) + '#() + v)) + parse-body)))) (define parse-comment ;[15] (let ((parse-body