Share the definition of STRING-OF-XML-CHARS? with "xml-rpc.scm".
authorChris Hanson <org/chris-hanson/cph>
Tue, 1 Aug 2006 04:23:41 +0000 (04:23 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 1 Aug 2006 04:23:41 +0000 (04:23 +0000)
v7/src/xml/xml-rpc.scm
v7/src/xml/xml.pkg

index 8c8538b1cdcdd11355d1cbb597b217b40d979f41..711a96222675ba3fb114b1f0087e29731c7c160d 100644 (file)
@@ -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
index 71f348da97d264b8d4aa90d917b5f7ec44328e17..114bd0c57c66cca60e0567a8b1c8c4c97cae658a 100644 (file)
@@ -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")