--- test/html-webhacc/cc.cgi 2007/07/16 13:56:26 1.12 +++ test/html-webhacc/cc.cgi 2007/07/17 14:28:20 1.14 @@ -31,13 +31,11 @@ } binmode STDOUT, ':utf8'; + $| = 1; require Message::DOM::DOMImplementation; my $dom = Message::DOM::DOMImplementation->new; - my $input = get_input_document ($http, $dom); - my $inner_html_element = $http->parameter ('e'); - load_text_catalog ('en'); ## TODO: conneg my @nav; @@ -50,8 +48,15 @@ -

Web Document Conformance Checker (beta)

+

Web Document Conformance Checker +(beta)

+]; + $| = 0; + my $input = get_input_document ($http, $dom); + my $inner_html_element = $http->parameter ('e'); + + print qq[
Request URI
@@ -211,6 +216,7 @@ if (@{$elements->{table}}) { require JSON; + push @nav, ['#tables' => 'Tables']; print STDOUT qq[

Tables

@@ -227,7 +233,9 @@ $i++; print STDOUT qq[

] . get_node_link ($table_el) . q[

]; - + + ## TODO: Make |ContentChecker| return |form_table| result + ## so that this script don't have to run the algorithm twice. my $table = Whatpm::HTMLTable->form_table ($table_el); for (@{$table->{column_group}}, @{$table->{column}}, $table->{caption}) { @@ -262,7 +270,25 @@ print STDOUT qq[
]; } + if (keys %{$elements->{id}}) { + push @nav, ['#identifiers' => 'IDs']; + print STDOUT qq[ +
+

Identifiers

+ +
+]; + for my $id (sort {$a cmp $b} keys %{$elements->{id}}) { + print STDOUT qq[
@{[htescape $id]}
]; + for (@{$elements->{id}->{$id}}) { + print STDOUT qq[
].get_node_link ($_).qq[
]; + } + } + print STDOUT qq[
]; + } + if (keys %{$elements->{term}}) { + push @nav, ['#terms' => 'Terms']; print STDOUT qq[

Terms

@@ -277,6 +303,23 @@ } print STDOUT qq[
]; } + + if (keys %{$elements->{class}}) { + push @nav, ['#classes' => 'Classes']; + print STDOUT qq[ +
+

Classes

+ +
+]; + for my $class (sort {$a cmp $b} keys %{$elements->{class}}) { + print STDOUT qq[
@{[htescape $class]}
]; + for (@{$elements->{class}->{$class}}) { + print STDOUT qq[
].get_node_link ($_).qq[
]; + } + } + print STDOUT qq[
]; + } } ## TODO: Show result @@ -673,4 +716,4 @@ =cut -## $Date: 2007/07/16 13:56:26 $ +## $Date: 2007/07/17 14:28:20 $