From: Chris Hanson Date: Tue, 1 Aug 2006 04:23:41 +0000 (+0000) Subject: Share the definition of STRING-OF-XML-CHARS? with "xml-rpc.scm". X-Git-Tag: 20090517-FFI~966 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ca680e55fc6bd038e39de88b5275777836c8de2c;p=mit-scheme.git Share the definition of STRING-OF-XML-CHARS? with "xml-rpc.scm". --- diff --git a/v7/src/xml/xml-rpc.scm b/v7/src/xml/xml-rpc.scm index 8c8538b1c..711a96222 100644 --- a/v7/src/xml/xml-rpc.scm +++ b/v7/src/xml/xml-rpc.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-rpc.scm,v 1.6 2006/07/28 16:23:08 riastradh Exp $ +$Id: xml-rpc.scm,v 1.7 2006/08/01 04:23:41 cph Exp $ Copyright 2003,2004,2005,2006 Massachusetts Institute of Technology @@ -294,11 +294,7 @@ USA. (define (encode-string string) (if (and (utf8-string-valid? string) - (for-all-chars-in-string? (alphabet-predicate alphabet:xml-char) - string - 0 - (string-length string) - 'UTF-8)) + (string-of-xml-chars? string)) string (rpc-elt:base64 (call-with-output-string diff --git a/v7/src/xml/xml.pkg b/v7/src/xml/xml.pkg index 71f348da9..114bd0c57 100644 --- a/v7/src/xml/xml.pkg +++ b/v7/src/xml/xml.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml.pkg,v 1.77 2006/08/01 02:50:50 cph Exp $ +$Id: xml.pkg,v 1.78 2006/08/01 04:23:35 cph Exp $ Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology @@ -270,7 +270,8 @@ USA. %make-xml-parameter-!entity %make-xml-parameter-entity-ref %make-xml-processing-instructions - %make-xml-unparsed-!entity)) + %make-xml-unparsed-!entity + string-of-xml-chars?)) (define-package (runtime xml parser) (files "xml-chars" "xml-parser")