--- test/html-webhacc/cc.cgi 2007/09/10 11:51:09 1.19 +++ test/html-webhacc/cc.cgi 2007/09/11 08:25:23 1.21 @@ -83,7 +83,7 @@ ]; - my $result = {}; + my $result = {conforming_min => 1, conforming_max => 1}; print_http_header_section ($input, $result); my $doc; @@ -571,11 +571,11 @@

Result

]; - if ($result->{unsupported}) { + if ($result->{unsupported} and $result->{conforming_max}) { print STDOUT qq[

The conformance checker cannot decide whether the document is conforming or not, since the document contains one or more unsupported - features.

]; + features. The document might or might not be conforming.

]; } elsif ($result->{conforming_min}) { print STDOUT qq[

No conformance-error is found in this document.

]; @@ -602,6 +602,7 @@ my $score_min = 0; my $score_max = 0; my $score_base = 20; + my $score_unit = $score_base / 100; for ( [Transfer => 'transfer', ''], [Character => 'char', ''], @@ -611,8 +612,8 @@ $must_error += ($result->{$_->[1]}->{must} += 0); $should_error += ($result->{$_->[1]}->{should} += 0); $warning += ($result->{$_->[1]}->{warning} += 0); - $score_min += ($result->{$_->[1]}->{score_min} += $score_base); - $score_max += ($result->{$_->[1]}->{score_max} += $score_base); + $score_min += (($result->{$_->[1]}->{score_min} *= $score_unit) += $score_base); + $score_max += (($result->{$_->[1]}->{score_max} *= $score_unit) += $score_base); my $uncertain = $result->{$_->[1]}->{unsupported} ? '?' : ''; my $label = $_->[0]; @@ -625,11 +626,11 @@ print STDOUT qq[$label$result->{$_->[1]}->{must}$uncertain$result->{$_->[1]}->{should}$uncertain$result->{$_->[1]}->{warning}$uncertain]; if ($uncertain) { - print qq[−∞..$result->{$_->[1]}->{score_max}]; + print qq[−∞..$result->{$_->[1]}->{score_max}]; } elsif ($result->{$_->[1]}->{score_min} != $result->{$_->[1]}->{score_max}) { - print qq[$result->{$_->[1]}->{score_min}..$result->{$_->[1]}->{score_max} + $score_base]; + print qq[$result->{$_->[1]}->{score_min}..$result->{$_->[1]}->{score_max}]; } else { - print qq[$result->{$_->[1]}->{score_min}]; + print qq[$result->{$_->[1]}->{score_min}]; } } @@ -638,7 +639,11 @@ print STDOUT qq[ Semantics0?0?0?−∞..$score_base -Total$must_error?$should_error?$warning?−∞..$score_max +Total +$must_error? +$should_error? +$warning? +−∞..$score_max

Important: This conformance checking service @@ -914,4 +919,4 @@ =cut -## $Date: 2007/09/10 11:51:09 $ +## $Date: 2007/09/11 08:25:23 $