diff --git a/collects/xml/test.ss b/collects/xml/test.ss index c2f1c57a29..e0f0fc43fa 100644 --- a/collects/xml/test.ss +++ b/collects/xml/test.ss @@ -2,7 +2,8 @@ ;; % mzscheme --require test.ss (module test mzscheme - (require xml/xml) + (require xml/xml + scheme/port) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -66,7 +67,7 @@ ;; permissive? (with-handlers ([exn? (lambda (exn) - (regexp-match #rx"Expected content," (exn-message exn)))]) + (regexp-match #rx"Expected content," (exn-message exn)))]) (report-err "Non-permissive" (xml->xexpr #f) "Exception")) (with-handlers ([exn? @@ -77,6 +78,29 @@ (when tmp (report-err "Permissive" tmp "#f"))))) + ;; doctype + (let () + (define source-string #< + +END + ) + + (define source-document + (read-xml (open-input-string source-string))) + (define result-string + (with-output-to-string (lambda () (write-xml source-document)))) + (define expected-string #< +END + ) + (unless (string=? expected-string result-string) + (report-err "DOCTYPE dropping" + result-string + expected-string))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; done diff --git a/collects/xml/xml.scrbl b/collects/xml/xml.scrbl index dc89b9042d..e8f14dd0fc 100644 --- a/collects/xml/xml.scrbl +++ b/collects/xml/xml.scrbl @@ -23,9 +23,9 @@ generating XML. XML can be represented as an instance of the @scheme[document] structure type, or as a kind of S-expression that is called an @deftech{X-expression}. -The @schememodname[xml] library does not provides Document Type -Declaration (DTD) processing, validation, expanding user-defined -entities, or reading user-defined entities in attributes. +The @schememodname[xml] library does not provide Document Type +Declaration (DTD) processing, including preservation of DTDs in read documents, or validation. +It also does not expand user-defined entities or read user-defined entities in attributes. @; ----------------------------------------------------------------------