United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4625400 stddoclet: Missing whitespace in DOCTYPE declaration
JDK-4625400 : stddoclet: Missing whitespace in DOCTYPE declaration

Details
Type:
Bug
Submit Date:
2002-01-17
Status:
Resolved
Updated Date:
2002-10-25
Project Name:
JDK
Resolved Date:
2002-10-25
Component:
docs
OS:
solaris_8
Sub-Component:
doclet
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

Description

Name: jl125535			Date: 01/17/2002


FULL PRODUCT VERSION :
java version "1.3.1"
Jav(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS)
Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode)

FULL OPERATING SYSTEM VERSION :
linux-2.4.17
libc6-2.2.4
Debian GNU 3.0

This behavior also appears on Solaris 8 with JDK 1.4 beta 3.


A DESCRIPTION OF THE PROBLEM :
This bug is very similar to 4418115.

The generated JavaDoc documentation has a wrong DOCTYPE
definition:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

There is no blank between the public identifier
"-//W3C/DTD HTML 4.0 Transitional//EN"
and its URI
"http://www.w3.org/TR/REC-html40/loose.dtd"

Every old generated JavaDoc is wrong. The bug was found when
trying to parse generated JavaDoc for automated index
generation of installed package documentation.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. echo "public class x { }" > x.java
2. javadoc x.java
3. head -1 *.html

EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual Result:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

Expected Result:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
class x { }
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Postprecess every generated JavaDoc and add a blank:
find . -name \*.html -exec perl -i -p -e 's,<!DOCTYPE HTML
PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">,<!DOCTYPE
HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">,' {} \;
(Review ID: 138175) 
======================================================================

                                    

Comments
EVALUATION

It does appear from spot checking that there is indeed not a character space.  However, I'm not sure if the specification for the DOCTYPE declaration requires a space.  Must be investigated.

###@###.### 2002-01-17
                                     
2002-01-17
PUBLIC COMMENTS

Fixed by adding the required space.

Regresssion test at:
<ws>/test/com/sun/javadoc/ValidHtml/ValidHtml.java

###@###.### 2002-09-25
                                     
2002-09-25
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b05


                                     
2004-06-14



Hardware and Software, Engineered to Work Together