try {
String[] reports = this.reportsDir.list(HtmlFilter.INSTANCE);
//boolean styleDone = false;
ResourceBundle bundle = getBundle( locale );
Sink sink = this.getSink();
sinkBeginReport(sink, bundle);
sink.sectionTitle1();
sink.text( bundle.getString( "report.fitnesse.name" ) );
sink.sectionTitle1_();
for(String report : reports) {
//String html = html(report);
Document document = Jsoup.parse(new File(this.reportsDir, report), null);
Elements tables = document.getElementsByTag("table");
// Is it a top-level index page?
if(tables.size() == 1 &&
testTdElements(tables.get(0).getElementsByTag("td"), "name", "right", "wrong", "exceptions")) {
Elements hrefs = document.getElementsByTag("a");
for(Element href : hrefs) {
String extant = href.attr("href");
href.attr("href", OUTPUT_NAME + "." + extant);
}
sink.rawText(document.html());
/*
if(!styleDone) {
addElements(sink, document.head().getElementsByTag("link"));
addElements(sink, document.head().getElementsByTag("script"));
styleDone = true;