summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 13:10:52 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 13:10:52 -0400
commitbaaf89aa8df00acd5de624155043d9eecf32de5c (patch)
treefc632ea315206b324874b332469fc0425c0c0aec /src
parent76ac88d2939f7ca0e46f74045ff98503c0d9c3d9 (diff)
Add extra XML preamble nonsense
Diffstat (limited to 'src')
-rw-r--r--src/cjr_print.sml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 2ac99827..85e1c3f7 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2829,7 +2829,7 @@ fun p_file env (ds, ps) =
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 @@ fun p_file env (ds, ps) =
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 = ",