changeset 804:10fe57e4a8c2

Add extra XML preamble nonsense
author Adam Chlipala <adamc@hcoop.net>
date Sat, 16 May 2009 13:10:52 -0400
parents 152b61b2901a
children e2780d2f4afc
files src/cjr_print.sml
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cjr_print.sml	Sat May 16 12:47:01 2009 -0400
+++ b/src/cjr_print.sml	Sat May 16 13:10:52 2009 -0400
@@ -2829,7 +2829,7 @@
                                     newline,
                                     string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");",
                                     newline,
-                                    string "uw_write(ctx, \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\\n<html>\");",
+                                    string "uw_write(ctx, begin_xhtml);",
                                     newline,
                                     string "uw_set_script_header(ctx, \"",
                                     string (case side of
@@ -3228,6 +3228,11 @@
              string "\"",
              newline,
              newline,
+
+             string "static const char begin_xhtml[] = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\\n<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" xml:lang=\\\"en\\\" lang=\\\"en\\\">\";",
+             newline,
+             newline,
+
              p_list_sep newline (fn x => x) pds,
              newline,
              string "int uw_inputs_len = ",