This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5882 - publicDoctype set to XHTML Basic 1.1 when no doctype is defined
Summary: publicDoctype set to XHTML Basic 1.1 when no doctype is defined
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Abel Rionda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-21 13:17 UTC by fd
Modified: 2008-07-22 10:01 UTC (History)
0 users

See Also:


Attachments

Description fd 2008-07-21 13:17:31 UTC
When the page does not define a DOCTYPE, for validation purposes, we append a fake XHTML Basic 1.1 doctype declaration.

The code takes care of resetting systemDoctype afterwards, but does not reset publicDoctype. The resulting moki thus contains:
 <doctypeDecl publicID="-//W3C//DTD XHTML Basic 1.1//EN"/>

instead of
 <doctypeDecl publiID="" />

See test:
 CONTENT_FORMAT_SUPPORT 2

Code:
HTTPXHTMLResource.java
 validateMobile
  body = htmlRootPattern
   .matcher(rawbody)
   .replaceFirst(
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.1//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd\"><html$1");