Author: ben
Date: 2007-12-13 20:50:04 -0800 (Thu, 13 Dec 2007)
New Revision: 7539
Modified:
openlaszlo/trunk/docs/src/build.xml
openlaszlo/trunk/docs/src/xsl/common-html.xsl
Log:
Change 20071213-ben-V by [EMAIL PROTECTED] on 2007-12-13 19:36:49 PST
in /Users/ben/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Include a DOCTYPE in the doctools generated content
Bugs Fixed: LPP-5258 doctools should generate html with a DOCTYPE
QA Reviewer: brynn
Documentation:
The html that the doctools was generating did not have a doctype at all. Some
research (thank you, Tucker) revealed that the lack of a doctype was probably
sending IE into quirks mode, which probably explains the many visual errors we
were seeing only in IE.
This change gets saxon to insert a doctype (XHTML 1.0 Transitional) at the
beginning of every html file it generates. This change *should* avoid quirks
mode in everything we care about except for IE6; apparently, this combination
will still evoke quirks mode in IE6.
When this code makes it into a build, the various IE-specific visual errors
should be rechecked; hopefully they will be gone!
HOWEVER: this change seems to cause tons of extra space to be inserted in
program listings. That seems like a problem that we'll just have to deal with;
getting a right doctype in is the Right Thing To Do.
The first lines of every generated html file now look like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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">
..
based on http://hsivonen.iki.fi/doctype/ this doctype/xml declaration
combination will provoke standards mode in almost everything:
NS6
Mozilla 0.6=0.9.4 and Netscape 6.0--6.2.3
Old Moz
Mozilla 0.9.5 through 1.1 alpha and Mozilla 1.0
Moz & Safari
Mozilla 1.0.1, Mozilla 1.1 beta and later, Firefox and Netscape 7, Safari
v73 aka. 0.9 through Safari v419.3 aka. 2.0.4, Konqueror 3.5
Opera 9
Opera 9.0-9.10
Opera 7.5
Opera 7.5-8.02
.."Almost Standards" mode in...
IE 7 & Opera 7.10
Windows IE 7 and Opera 7.10-7.23
..and quirks mode only in...
IE 6 & Opera 7.0
Windows IE 6 and Opera 7.0-7.03
Konq 3.2
Tests:
Inspect a single html page output by the doctools in both the reference and the
devguide. Notice that it begins with a doctype. Also note that it is w3c valid
XHTML transitional!
Modified: openlaszlo/trunk/docs/src/build.xml
===================================================================
--- openlaszlo/trunk/docs/src/build.xml 2007-12-14 03:56:52 UTC (rev 7538)
+++ openlaszlo/trunk/docs/src/build.xml 2007-12-14 04:50:04 UTC (rev 7539)
@@ -154,10 +154,14 @@
<xmlcatalog id="docbook.local.xsl">
<entity
publicId="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
location="${docbook-xsl}/html/chunk.xsl"/>
+ <entity
publicId="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"
+ location="${docbook-xsl}/xhtml/chunk.xsl"/>
<entity
publicId="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"
location="${docbook-xsl}/htmlhelp/htmlhelp.xsl"/>
<entity
publicId="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
- location="${docbook-xsl}/html/docbook.xsl"/>
+ location="${docbook-xsl}/html/docbook.xsl"/>
+ <entity
publicId="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
+ location="${docbook-xsl}/xhtml/docbook.xsl"/>
<entity
publicId="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
location="${docbook-xsl}/fo/docbook.xsl"/>
</xmlcatalog>
Modified: openlaszlo/trunk/docs/src/xsl/common-html.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/common-html.xsl 2007-12-14 03:56:52 UTC
(rev 7538)
+++ openlaszlo/trunk/docs/src/xsl/common-html.xsl 2007-12-14 04:50:04 UTC
(rev 7539)
@@ -16,14 +16,18 @@
xmlns:xi="http://www.w3.org/2003/XInclude"
xmlns:dbk="http://docbook.org/ns/docbook"
exclude-result-prefixes="exslt xi dbk dyn saxon"
+ xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
- <xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+ <xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
<xsl:import href="parameters.xsl"/>
<xsl:import href="synop-javascript.xsl"/>
<xsl:import href="synop-lzx.xsl"/>
<xsl:import href="lzx-pretty-print.xsl"/>
+ <!-- output xhtml with a doctype -->
+ <xsl:output method="saxon:xhtml" />
+
<!-- Path to base directory on local disk of output files -->
<xsl:param name="base.dir" />
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins