--- test/html-webhacc/cc.cgi 2007/11/18 11:05:12 1.26
+++ test/html-webhacc/cc.cgi 2008/02/09 12:22:19 1.30
@@ -166,7 +166,7 @@
$result->{conforming_min} = 0;
} elsif ($err->{level} eq 'w' or $err->{level} eq 'g') {
$result->{$layer}->{warning}++;
- } elsif ($err->{level} eq 'unsupported') {
+ } elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') {
$result->{$layer}->{unsupported}++;
$result->{unsupported} = 1;
} else {
@@ -403,7 +403,7 @@
$r .= '
';
for my $attr (sort {$a->[0] cmp $b->[0]} map { [$_->name, $_->value, $_->namespace_uri, 'node-'.refaddr $_] }
@{$child->attributes}) {
- $r .= qq[] . htescape ($attr->[0]) . '
= '; ## ISSUE: case?
+ $r .= qq[] . htescape ($attr->[0]) . '
= '; ## ISSUE: case?
$r .= '' . htescape ($attr->[1]) . '
'; ## TODO: children
}
$r .= '
';
@@ -424,6 +424,21 @@
} elsif ($nt == $child->DOCUMENT_NODE) {
$r .= qq'Document';
$r .= qq[];
+ my $cp = $child->manakai_charset;
+ if (defined $cp) {
+ $r .= qq[charset
parameter = ];
+ $r .= htescape ($cp) . qq[
];
+ }
+ $r .= qq[inputEncoding
= ];
+ my $ie = $child->input_encoding;
+ if (defined $ie) {
+ $r .= qq[@{[htescape ($ie)]}
];
+ if ($child->manakai_has_bom) {
+ $r .= qq[ (with BOM
)];
+ }
+ } else {
+ $r .= qq[(null
)];
+ }
$r .= qq[- @{[scalar get_text ('manakaiIsHTML:'.($child->manakai_is_html?1:0))]}
];
$r .= qq[- @{[scalar get_text ('manakaiCompatMode:'.$child->manakai_compat_mode)]}
];
unless ($child->manakai_is_html) {
@@ -791,9 +806,9 @@
];
push @nav, ['#parse-errors' => 'Errors'];
- add_error (char => {level => 'unsupported'} => $result);
- add_error (syntax => {level => 'unsupported'} => $result);
- add_error (structure => {level => 'unsupported'} => $result);
+ add_error (char => {level => 'u'} => $result);
+ add_error (syntax => {level => 'u'} => $result);
+ add_error (structure => {level => 'u'} => $result);
} # print_result_unknown_type_section
sub print_result_input_error_section ($) {
@@ -850,7 +865,7 @@
} elsif ($err->{level} eq 'w') {
$r = qq[Warning:
];
- } elsif ($err->{level} eq 'unsupported') {
+ } elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') {
$r = qq[Not
supported: ];
} else {
@@ -913,6 +928,7 @@
sub get_text ($) {
my ($type, $level, $node) = @_;
$type = $level . ':' . $type if defined $level;
+ $level = 'm' unless defined $level;
my @arg;
{
if (defined $Msg->{$type}) {
@@ -937,13 +953,13 @@
? htescape ($node->owner_element->manakai_local_name)
: ''
}ge;
- return ($type, $Msg->{$type}->[0], $msg);
+ return ($type, 'level-' . $level . ' ' . $Msg->{$type}->[0], $msg);
} elsif ($type =~ s/:([^:]*)$//) {
unshift @arg, $1;
redo;
}
}
- return ($type, '', htescape ($_[0]));
+ return ($type, 'level-'.$level, htescape ($_[0]));
} # get_text
}
@@ -999,6 +1015,7 @@
$ua->protocols_allowed ([qw/http/]);
$ua->max_size (1000_000);
my $req = HTTP::Request->new (GET => $request_uri);
+ $req->header ('Accept-Encoding' => 'identity, *; q=0');
my $res = $ua->request ($req);
## TODO: 401 sets |is_success| true.
if ($res->is_success or $http->get_parameter ('error-page')) {
@@ -1134,4 +1151,4 @@
=cut
-## $Date: 2007/11/18 11:05:12 $
+## $Date: 2008/02/09 12:22:19 $