I am developing web application using tapestry. I am testing my application using junit test suite and generating war file and html reports, using ant build. In my html report files, I have the following warnings.
Multiple annotations found at this line:
- Attribute (width) is obsolete. Its use is discouraged in HTML5 documents.
- Attribute (cellpadding) is obsolete. Its use is discouraged in HTML5
documents.
- Undefined attribute value (0).
- Attribute (language) is obsolete. Its use is discouraged in HTML5 documents.
Following is my test and report generating code.
<target name="test" depends="compile" description="Running Test Suite">
<mkdir dir="${target.data.dir}"/>
<mkdir dir="${target.htmlreports.dir}"/>
<junit fork="no" haltonfailure="no" showoutput="yes" printsummary="true" >
<test name="${junit.class.name}" todir="${target.data.dir}"/>
<formatter type="brief" usefile="false"/>
<classpath refid="classpath.test"/>
<sysproperty key="ant.home" value="${ant.home}"/>
<formatter type="xml"/>
</junit>
<junitreport todir="${target.htmlreports.dir}">
<fileset dir="${target.data.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${target.htmlreports.dir}"/>
</junitreport>
</target>
This is my one of the html report file.
<html xmlns:lxslt="http://xml.apache.org/xslt" xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Unit Test Results: Summary</title>
<link rel="stylesheet" type="text/css" title="Style" href="stylesheet.css">
</head>
<body onload="open('allclasses-frame.html','classListFrame')">
<h1>Unit Test Results.</h1>
<table width="100%">
<tr>
<td align="left"></td><td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://ant.apache.org/">Ant</a>.</td>
</tr>
</table>
<hr size="1">
<h2>Summary</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Tests</th><th>Failures</th><th>Errors</th><th>Success rate</th><th>Time</th>
</tr>
<tr valign="top" class="Pass">
<td><a title="Display all tests" href="all-tests.html">1</a></td><td><a title="Display all failures" href="alltests-fails.html">0</a></td><td><a title="Display all errors" href="alltests-errors.html">0</a></td><td>100.00%</td><td>0.070</td>
</tr>
</table>
<table border="0" width="95%">
<tr>
<td style="text-align: justify;">
Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
</td>
</tr>
</table>
<h2>Packages</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th width="80%">Name</th><th>Tests</th><th>Errors</th><th>Failures</th><th nowrap>Time(s)</th><th nowrap>Time Stamp</th><th>Host</th>
</tr>
<tr valign="top" class="Pass">
<td><a href="./test/web/app/sampleApp/juint/package-summary.html">test.web.app.sampleApp.juint</a></td><td>1</td><td>0</td><td>0</td><td>0.070</td><td>2013-01-17T04:52:59</td><td>123456</td>
</tr>
</table>
</body>
</html>
Please any one say how can I remove this warnings.
I face the same issue and i got the solution by using HTML 4.01 doc type instead HTML 5 doctype. these warning is only because of HTML5 validator