uniform XML header;
authorwenzelm
Thu, 14 Feb 2019 14:44:41 +0100
changeset 69804 9efccbad7d42
parent 69803 a24865b6262f
child 69805 a8debe27c36c
uniform XML header;
src/Pure/PIDE/xml.ML
src/Pure/PIDE/xml.scala
src/Pure/Thy/html.ML
src/Pure/Thy/html.scala
src/Pure/Tools/main.scala
--- a/src/Pure/PIDE/xml.ML	Wed Feb 13 11:25:23 2019 +0100
+++ b/src/Pure/PIDE/xml.ML	Thu Feb 14 14:44:41 2019 +0100
@@ -122,7 +122,7 @@
 
 (** string representation **)
 
-val header = "<?xml version=\"1.0\"?>\n";
+val header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
 
 
 (* escaped text *)
--- a/src/Pure/PIDE/xml.scala	Wed Feb 13 11:25:23 2019 +0100
+++ b/src/Pure/PIDE/xml.scala	Thu Feb 14 14:44:41 2019 +0100
@@ -99,6 +99,8 @@
 
   /** string representation **/
 
+  val header: String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+
   def output_char(c: Char, s: StringBuilder)
   {
     c match {
--- a/src/Pure/Thy/html.ML	Wed Feb 13 11:25:23 2019 +0100
+++ b/src/Pure/Thy/html.ML	Thu Feb 14 14:44:41 2019 +0100
@@ -126,7 +126,7 @@
 (* document *)
 
 fun begin_document symbols title =
-  "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" ^
+  XML.header ^
   "<!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\">\n" ^
--- a/src/Pure/Thy/html.scala	Wed Feb 13 11:25:23 2019 +0100
+++ b/src/Pure/Thy/html.scala	Thu Feb 14 14:44:41 2019 +0100
@@ -324,8 +324,8 @@
   /* document */
 
   val header: String =
-    """<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    XML.header +
+    """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">"""
 
   val head_meta: XML.Elem =
--- a/src/Pure/Tools/main.scala	Wed Feb 13 11:25:23 2019 +0100
+++ b/src/Pure/Tools/main.scala	Thu Feb 14 14:44:41 2019 +0100
@@ -55,8 +55,8 @@
           File.write(settings_dir + Path.explode("DockableWindowManager/perspective-view0.xml"),
             """<DOCKING LEFT="isabelle-documentation" TOP="" RIGHT="isabelle-theories" BOTTOM="" LEFT_POS="250" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" />""")
           File.write(settings_dir + Path.explode("perspective.xml"),
-            """<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd">
+            XML.header +
+"""<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd">
 <PERSPECTIVE>
 <VIEW PLAIN="FALSE">
 <GEOMETRY X="0" Y="35" WIDTH="1200" HEIGHT="850" EXT_STATE="0" />