--- test/html-webhacc/WebHACC/Result.pm 2008/08/14 15:50:42 1.9
+++ test/html-webhacc/WebHACC/Result.pm 2008/08/16 07:42:20 1.14
@@ -52,6 +52,7 @@
my ($self, %opt) = @_;
my $out = $self->output;
+ $out->has_error (1);
my $error_level = $opt{level};
if (not defined $error_level) {
@@ -80,8 +81,6 @@
$error_layer = 'syntax'; ## NOTE: Unknown - an error of the implementation
}
- my $error_type_text = $opt{type};
-
my $class = qq[level-$error_level layer-$error_layer];
## Line & column numbers (prepare values)
@@ -186,14 +185,14 @@
} elsif (defined $opt{input}->{request_uri}) {
$out->url ($opt{input}->{request_uri});
$has_location = 1;
- } elsif (defined $opt{input}->{uri}) {
- $out->url ($opt{input}->{uri});
+ } elsif (defined $opt{input}->url) {
+ $out->url ($opt{input}->url);
$has_location = 1;
}
}
unless ($has_location) {
- $out->text ('Unknown location');
+ $out->nl_text ('Unknown location');
}
}
@@ -204,14 +203,9 @@
$out->text (': ');
## Error message
- $out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text});
-
- ## Additional error description
- if (defined $opt{text}) {
- $out->html (' (');
- $out->text ($opt{text});
- $out->html ('
)');
- }
+ my $error_type_text = $opt{type};
+ $out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text},
+ value => $opt{value});
## Link to a long description
@@ -287,22 +281,22 @@
$out->start_tag ('th', colspan => 7, scope => 'col');
$out->nl_text ('Main document');
},
- {label => 'Transfer', status => $self->{layers}->{transfer},
+ {label => 'Transfer L.', status => $self->{layers}->{transfer},
target => 'transfer-errors', score_base => 20,
parent_status => $maindoc_status},
- {label => 'Encode', status => $self->{layers}->{encode},
- score_base => 10,
+ {label => 'Encode L.', status => $self->{layers}->{encode},
+ target => 'parse-errors', score_base => 10,
parent_status => $maindoc_status},
- {label => 'Charset', status => $self->{layers}->{charset},
+ {label => 'Char L.', status => $self->{layers}->{charset},
score_base => 10,
parent_status => $maindoc_status},
- {label => 'Syntax', status => $self->{layers}->{syntax},
+ {label => 'Syntax L.', status => $self->{layers}->{syntax},
target => 'parse-errors', score_base => 20,
parent_status => $maindoc_status},
- {label => 'Structure', status => $self->{layers}->{structure},
+ {label => 'Structure L.', status => $self->{layers}->{structure},
target => 'document-errors', score_base => 20,
parent_status => $maindoc_status},
- {label => 'Semantics', status => $self->{layers}->{semantics},
+ {label => 'Semantics L.', status => $self->{layers}->{semantics},
score_base => 20,
parent_status => $maindoc_status},
);