PATCH: style.mhtml -- support both HTML and XHTML
Gerald Pfeifer
pfeifer@dbai.tuwien.ac.at
Mon Oct 28 11:59:00 GMT 2002
Janis,
this is the patch that has been in the works for some time now.
Add support for adding either a HTML or an XHTML DOCTYPE, based on the
name of the input file. Default to XHTML, use HTML for install/*.
It does not yet address adding the proper logo at the end of the page,
and there are still some validation problems, but the DOCTYPE is now
set properly.
Gerald
Index: style.mhtml
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/style.mhtml,v
retrieving revision 1.29
diff -u -3 -p -r1.29 style.mhtml
--- style.mhtml 25 Oct 2002 20:00:14 -0000 1.29
+++ style.mhtml 28 Oct 2002 19:50:28 -0000
@@ -1,7 +1,22 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+;;; Default to DOCTYPE XHTML, except for the install/ pages.
+
+<set-var XHTML>
+<if <match <get-var env::PREPROCESS_FILE> "install/.*">
+ <unset-var XHTML>
+>
+
+<if <var-exists XHTML>
+ <group
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ >
+ <group
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+ >
+>
;;; Given a dirname PATH, set BACKPATH to a relative URL pointing from PATH
;;; back to the original directory.
More information about the Gcc-patches
mailing list