sink.table();
for ( Iterator it2 = linkcheckFile.getResults().iterator(); it2.hasNext(); )
{
LinkcheckFileResult linkcheckFileResult = (LinkcheckFileResult) it2.next();
if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.VALID_LEVEL )
{
continue;
}
sink.tableRow();
sink.tableCell();
if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.WARNING_LEVEL )
{
iconWarning( locale, sink );
}
else if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.ERROR_LEVEL )
{
iconError( locale, sink );
}
sink.tableCell_();
sink.tableCell();
sink.italic();
if ( linkcheckFileResult.getTarget().startsWith( "#" ) )
{
sink.link( linkcheckFile.getRelativePath() + linkcheckFileResult.getTarget() );
}
else if ( linkcheckFileResult.getTarget().startsWith( "." ) )
{
// We need to calculate a correct absolute path here, because target is a relative path
String absolutePath = FilenameUtils.getFullPath( linkcheckFile.getRelativePath() )
+ linkcheckFileResult.getTarget();
String normalizedPath = FilenameUtils.normalize( absolutePath );
if ( normalizedPath == null )
{
normalizedPath = absolutePath;
}
sink.link( normalizedPath );
}
else
{
sink.link( linkcheckFileResult.getTarget() );
}
// Show the link as it was written to make it easy for
// the author to find it in the source document
sink.text( linkcheckFileResult.getTarget() );
sink.link_();
sink.text( ": " );
sink.text( linkcheckFileResult.getErrorMessage() );
sink.italic_();
sink.tableCell_();
sink.tableRow_();
}