|
|
|
The initial fix for this bug was ill-advised, so I backed it out.
We don't pass w3c html validation[1] because there is not doctype specified. [1] http://validator.w3.org/ ------------------------------------------------------------------------
r7571 | ben | 2007-12-17 13:41:02 -0800 (Mon, 17 Dec 2007) | 31 lines Changed paths: M /openlaszlo/trunk/docs/src/xsl/parameters.xsl Change 20071217-ben-K by ben@slim.local on 2007-12-17 12:42:03 PST in /Users/ben/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Make doc build output a doctype Bugs Fixed: Technical Reviewer: ptw Documentation: In order to generate html with a doctype, we have to tell docbook-xsl's chunker that we want a doctype. These two parameters are the way we do so: + <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/> + <xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/html4/loose.dtd'"/> Release Notes: Details: Tests: ant clean doc inspect one of the output files notice it begins with... <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed paths:
M /openlaszlo/trunk/docs/src/build.xml
M /openlaszlo/trunk/docs/src/xsl/common-html.xsl
Change 20071213-ben-V by ben@slim.local 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-5258doctools should generate html with a DOCTYPEQA 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!