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 9666 - Tests on DOM tree are not run when DOCTYPE and XHTML namespace are missing
Summary: Tests on DOM tree are not run when DOCTYPE and XHTML namespace are missing
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: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 12:18 UTC by fd
Modified: 2010-05-06 12:42 UTC (History)
0 users

See Also:


Attachments

Description fd 2010-05-06 12:18:28 UTC
Subtests such as IMAGES_SPECIFY_SIZE-4 are applied to the DOM tree generated from the resource under test.

When that resource neither declares a DOCTYPE nor contains an XHTML namespace declaration (the "xmlns" attribute), these tests are not run because the XSL stylesheets expect that the DOM tree in the moki document belongs to the XHTML namespace.

Ex of source that triggers the problem (with an image that is bigger than the dimensions announced in the markup):
<html xml:lang="en">
 <head>
  <title>No doctype, no namespace</title>
 </head>
 <body>
  <p><img src="w3c.gif" alt="W3C" height="50" width="50" /></p>
 </body>
</html>
Comment 1 fd 2010-05-06 12:42:32 UTC
XHTML namespace forced in XhtmlContent.importNodeWithPosition.

It might be better to add a DOCTYPE declaration before injecting the content in the XML parser, but then the whole question would be: when does "tidying" start? In other words, if we change the source, we already start the tidying process (note that if the source has to go through parseTidiedDOM, the namespace would be automatically added).

The IMAGES_SPECIFY_SIZE 15 test was added to the test suite to prevent regression.