--- test/html-webhacc/cc.cgi 2007/06/30 08:26:08 1.5 +++ test/html-webhacc/cc.cgi 2007/06/30 14:51:10 1.6 @@ -189,9 +189,8 @@ require Whatpm::ContentChecker; my $onerror = sub { my %opt = @_; - print STDOUT qq[
], - htescape get_node_path ($opt{node}), - "
\n
", htescape $opt{type}, "
\n"; + print STDOUT qq[
] . get_node_link ($opt{node}) . + "
\n
", htescape $opt{type}, "
\n"; }; my $elements; @@ -223,10 +222,8 @@ my $i = 0; for my $table_el (@{$elements->{table}}) { $i++; - print STDOUT qq[

]; - print STDOUT qq[], - htescape get_node_path ($table_el); - print STDOUT qq[

\n]; + print STDOUT qq[

] . + get_node_link ($table_el) . q[

]; my $table = Whatpm::HTMLTable->form_table ($table_el); @@ -260,6 +257,22 @@ print STDOUT qq[
]; } + + if (keys %{$elements->{term}}) { + print STDOUT qq[ +
+

Terms

+ +
+]; + for my $term (sort {$a cmp $b} keys %{$elements->{term}}) { + print STDOUT qq[
@{[htescape $term]}
]; + for (@{$elements->{term}->{$term}}) { + print STDOUT qq[
].get_node_link ($_).qq[
]; + } + } + print STDOUT qq[
]; + } } ## TODO: Show result @@ -323,7 +336,9 @@ if ($node->has_child_nodes) { $r .= '
    '; - unshift @node, @{$child->child_nodes}, '
'; + unshift @node, @{$child->child_nodes}, ''; + } else { + $r .= ''; } } elsif ($nt == $child->TEXT_NODE) { $r .= qq'
  • ' . htescape ($child->data) . '
  • '; @@ -332,10 +347,10 @@ } elsif ($nt == $child->COMMENT_NODE) { $r .= qq'
  • <!--' . htescape ($child->data) . '-->
  • '; } elsif ($nt == $child->DOCUMENT_NODE) { - $r .= qq'
  • Document
  • '; + $r .= qq'
  • Document'; if ($child->has_child_nodes) { $r .= '
      '; - unshift @node, @{$child->child_nodes}, '
    '; + unshift @node, @{$child->child_nodes}, '
  • '; } } elsif ($nt == $child->DOCUMENT_TYPE_NODE) { $r .= qq'
  • <!DOCTYPE>