From: Chris Hanson Date: Thu, 26 Jan 2006 05:53:49 +0000 (+0000) Subject: When writing processing instructions, don't emit space after name X-Git-Tag: 20090517-FFI~1129 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d26202cb12ae9ea37cad19943e7fd31bbdb9bcb6;p=mit-scheme.git When writing processing instructions, don't emit space after name unless needed. --- diff --git a/v7/src/xml/xml-output.scm b/v7/src/xml/xml-output.scm index 72b789b62..c70590a6b 100644 --- a/v7/src/xml/xml-output.scm +++ b/v7/src/xml/xml-output.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-output.scm,v 1.37 2005/12/19 04:11:32 cph Exp $ +$Id: xml-output.scm,v 1.38 2006/01/26 05:53:49 cph Exp $ Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology @@ -163,8 +163,13 @@ USA. (define-method %write-xml ((pi ) ctx) (emit-string " (string-length text) 0) + (begin + (if (not (char-set-member? char-set:xml-whitespace + (string-ref text 0))) + (emit-string " " ctx)) + (emit-string text ctx)))) (emit-string "?>" ctx)) (define-method %write-xml ((dtd ) ctx)