From a6773c71e5afe39cbf756db2183fd50941a9361b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 15 Oct 2003 01:25:14 +0000 Subject: [PATCH] Don't put empty character data strings in element content. --- v7/src/xml/xml-parser.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 -- 2.25.1