From e885fc742f3429270ad677a4a0c8932712ab7444 Mon Sep 17 00:00:00 2001 From: Dave Gurnell Date: Thu, 17 Sep 2009 12:00:19 +0000 Subject: [PATCH] Added xml-1.0-header. --- scribblings/xml-util.scrbl | 7 +++++++ xml/util.ss | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/scribblings/xml-util.scrbl b/scribblings/xml-util.scrbl index 2d363ea..692989e 100644 --- a/scribblings/xml-util.scrbl +++ b/scribblings/xml-util.scrbl @@ -47,6 +47,13 @@ Returns @scheme[#t] if @scheme[val] is an XML fragment that will produce no rend The following XML expressions are defined for convenience: +@defthing[xml-1.0-header xml]{ +An XML 1.0 header that specifies the character encoding as UTF-8: + +@interaction[ + #:eval xml-eval + (display (xml->string xml-1.0-header))]} + @defthing[xhtml-1.0-strict-doctype xml]{ The HTML 1.0 transitional DOCTYPE, complete with newline character: diff --git a/xml/util.ss b/xml/util.ss index e12baa5..d5b80c0 100644 --- a/xml/util.ss +++ b/xml/util.ss @@ -6,6 +6,12 @@ "struct.ss" (only-in "struct-internal.ss" quotable-value?)) +(define xml-1.0-header + (xml (!raw #< +ENDHEADER + ))) + ; xml (define xhtml-1.0-strict-doctype (xml (!raw #<