History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5258
Type: Task Task
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Benjamin Shine
Reporter: Benjamin Shine
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

doctools should generate html with a DOCTYPE

Created: 13/Dec/07 07:50 PM   Updated: 17/Dec/07 01:43 PM
Component/s: Doc Tools
Affects Version/s: RingDingTools (4.1 Ref Guide + Tools)
Fix Version/s: RingDingTools (4.1 Ref Guide + Tools)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,571
Runtime: N/A
Fix in hand: False


 Description  « Hide
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 -- notably LPP-5245.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benjamin Shine - 13/Dec/07 08:51 PM
r7539 | ben | 2007-12-13 20:50:04 -0800 (Thu, 13 Dec 2007) | 63 lines
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-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!

Benjamin Shine - 17/Dec/07 11:29 AM
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/

Benjamin Shine - 17/Dec/07 01:43 PM
------------------------------------------------------------------------
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: LPP-5258 doctools should generate html with a DOCTYPE

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">