From d26202cb12ae9ea37cad19943e7fd31bbdb9bcb6 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 26 Jan 2006 05:53:49 +0000 Subject: [PATCH] When writing processing instructions, don't emit space after name unless needed. --- v7/src/xml/xml-output.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) -- 2.25.1