| 86 |
<dd>$char_length byte@{[$char_length == 1 ? '' : 's']}</dd> |
<dd>$char_length byte@{[$char_length == 1 ? '' : 's']}</dd> |
| 87 |
</dl> |
</dl> |
| 88 |
</div> |
</div> |
| 89 |
|
|
| 90 |
|
<script src="../cc-script.js"></script> |
| 91 |
]; |
]; |
| 92 |
|
|
| 93 |
$input->{id_prefix} = ''; |
$input->{id_prefix} = ''; |
| 134 |
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') { |
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') { |
| 135 |
$result->{$layer}->{unsupported}++; |
$result->{$layer}->{unsupported}++; |
| 136 |
$result->{unsupported} = 1; |
$result->{unsupported} = 1; |
| 137 |
|
} elsif ($err->{level} eq 'i') { |
| 138 |
|
# |
| 139 |
} else { |
} else { |
| 140 |
$result->{$layer}->{must}++; |
$result->{$layer}->{must}++; |
| 141 |
$result->{$layer}->{score_max} -= 2; |
$result->{$layer}->{score_max} -= 2; |
| 173 |
'text/xml' => 1, |
'text/xml' => 1, |
| 174 |
'application/atom+xml' => 1, |
'application/atom+xml' => 1, |
| 175 |
'application/rss+xml' => 1, |
'application/rss+xml' => 1, |
| 176 |
'application/svg+xml' => 1, |
'image/svg+xml' => 1, |
| 177 |
'application/xhtml+xml' => 1, |
'application/xhtml+xml' => 1, |
| 178 |
'application/xml' => 1, |
'application/xml' => 1, |
| 179 |
|
## TODO: Should we make all XML MIME Types fall |
| 180 |
|
## into this category? |
| 181 |
|
|
| 182 |
|
'application/rdf+xml' => 1, ## NOTE: This type has different model. |
| 183 |
}->{$input->{media_type}}) { |
}->{$input->{media_type}}) { |
| 184 |
($doc, $el) = print_syntax_error_xml_section ($input, $result); |
($doc, $el) = print_syntax_error_xml_section ($input, $result); |
| 185 |
print_source_string_section ($input, |
print_source_string_section ($input, |
| 218 |
print_listing_section ({ |
print_listing_section ({ |
| 219 |
id => 'classes', label => 'Classes', heading => 'Classes', |
id => 'classes', label => 'Classes', heading => 'Classes', |
| 220 |
}, $input, $elements->{class}) if keys %{$elements->{class}}; |
}, $input, $elements->{class}) if keys %{$elements->{class}}; |
| 221 |
|
print_rdf_section ($input, $elements->{rdf}) if @{$elements->{rdf}}; |
| 222 |
} elsif (defined $cssom) { |
} elsif (defined $cssom) { |
| 223 |
print_structure_dump_cssom_section ($input, $cssom); |
print_structure_dump_cssom_section ($input, $cssom); |
| 224 |
## TODO: CSSOM validation |
## TODO: CSSOM validation |
| 299 |
<div id="$input->{id_prefix}parse-errors" class="section"> |
<div id="$input->{id_prefix}parse-errors" class="section"> |
| 300 |
<h2>Parse Errors</h2> |
<h2>Parse Errors</h2> |
| 301 |
|
|
| 302 |
<dl>]; |
<dl id="$input->{id_prefix}parse-errors-list">]; |
| 303 |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
| 304 |
|
|
| 305 |
my $onerror = sub { |
my $onerror = sub { |
| 306 |
my (%opt) = @_; |
my (%opt) = @_; |
| 307 |
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level}); |
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level}); |
| 308 |
if ($opt{column} > 0) { |
print STDOUT qq[<dt class="$cls">], get_error_label ($input, \%opt), |
| 309 |
print STDOUT qq[<dt class="$cls"><a href="#$input->{id_prefix}line-$opt{line}">Line $opt{line}</a> column $opt{column}</dt>\n]; |
qq[</dt>]; |
|
} else { |
|
|
$opt{line} = $opt{line} - 1 || 1; |
|
|
print STDOUT qq[<dt class="$cls"><a href="#$input->{id_prefix}line-$opt{line}">Line $opt{line}</a></dt>\n]; |
|
|
} |
|
| 310 |
$type =~ tr/ /-/; |
$type =~ tr/ /-/; |
| 311 |
$type =~ s/\|/%7C/g; |
$type =~ s/\|/%7C/g; |
| 312 |
$msg .= qq[ [<a href="../error-description#@{[htescape ($type)]}">Description</a>]]; |
$msg .= qq[ [<a href="../error-description#@{[htescape ($type)]}">Description</a>]]; |
| 353 |
<div id="$input->{id_prefix}parse-errors" class="section"> |
<div id="$input->{id_prefix}parse-errors" class="section"> |
| 354 |
<h2>Parse Errors</h2> |
<h2>Parse Errors</h2> |
| 355 |
|
|
| 356 |
<dl>]; |
<dl id="$input->{id_prefix}parse-errors-list">]; |
| 357 |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{prefix}; |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{prefix}; |
| 358 |
|
|
| 359 |
my $onerror = sub { |
my $onerror = sub { |
| 393 |
require Whatpm::CSS::Parser; |
require Whatpm::CSS::Parser; |
| 394 |
my $p = Whatpm::CSS::Parser->new; |
my $p = Whatpm::CSS::Parser->new; |
| 395 |
|
|
|
# if ($parse_mode eq 'q') { |
|
|
# $p->{unitless_px} = 1; |
|
|
# $p->{hashless_color} = 1; |
|
|
# } |
|
|
|
|
| 396 |
$p->{prop}->{$_} = 1 for qw/ |
$p->{prop}->{$_} = 1 for qw/ |
| 397 |
|
alignment-baseline |
| 398 |
background background-attachment background-color background-image |
background background-attachment background-color background-image |
| 399 |
background-position background-position-x background-position-y |
background-position background-position-x background-position-y |
| 400 |
background-repeat border border-bottom border-bottom-color |
background-repeat border border-bottom border-bottom-color |
| 406 |
border-style border-top border-top-color border-top-style border-top-width |
border-style border-top border-top-color border-top-style border-top-width |
| 407 |
border-width bottom |
border-width bottom |
| 408 |
caption-side clear clip color content counter-increment counter-reset |
caption-side clear clip color content counter-increment counter-reset |
| 409 |
cursor direction display empty-cells float font |
cursor direction display dominant-baseline empty-cells float font |
| 410 |
font-family font-size font-size-adjust font-stretch |
font-family font-size font-size-adjust font-stretch |
| 411 |
font-style font-variant font-weight height left |
font-style font-variant font-weight height left |
| 412 |
letter-spacing line-height |
letter-spacing line-height |
| 418 |
padding padding-bottom padding-left padding-right padding-top |
padding padding-bottom padding-left padding-right padding-top |
| 419 |
page page-break-after page-break-before page-break-inside |
page page-break-after page-break-before page-break-inside |
| 420 |
position quotes right size table-layout |
position quotes right size table-layout |
| 421 |
text-align text-decoration text-indent text-transform |
text-align text-anchor text-decoration text-indent text-transform |
| 422 |
top unicode-bidi vertical-align visibility white-space width widows |
top unicode-bidi vertical-align visibility white-space width widows |
| 423 |
word-spacing z-index |
word-spacing writing-mode z-index |
| 424 |
/; |
/; |
| 425 |
$p->{prop_value}->{display}->{$_} = 1 for qw/ |
$p->{prop_value}->{display}->{$_} = 1 for qw/ |
| 426 |
block clip inline inline-block inline-table list-item none |
block clip inline inline-block inline-table list-item none |
| 497 |
$p->{prop_value}->{'white-space'}->{$_} = 1 for qw/ |
$p->{prop_value}->{'white-space'}->{$_} = 1 for qw/ |
| 498 |
normal pre nowrap pre-line pre-wrap -moz-pre-wrap |
normal pre nowrap pre-line pre-wrap -moz-pre-wrap |
| 499 |
/; |
/; |
| 500 |
|
$p->{prop_value}->{'writing-mode'}->{$_} = 1 for qw/ |
| 501 |
|
lr rl tb lr-tb rl-tb tb-rl |
| 502 |
|
/; |
| 503 |
|
$p->{prop_value}->{'text-anchor'}->{$_} = 1 for qw/ |
| 504 |
|
start middle end |
| 505 |
|
/; |
| 506 |
|
$p->{prop_value}->{'dominant-baseline'}->{$_} = 1 for qw/ |
| 507 |
|
auto use-script no-change reset-size ideographic alphabetic |
| 508 |
|
hanging mathematical central middle text-after-edge text-before-edge |
| 509 |
|
/; |
| 510 |
|
$p->{prop_value}->{'alignment-baseline'}->{$_} = 1 for qw/ |
| 511 |
|
auto baseline before-edge text-before-edge middle central |
| 512 |
|
after-edge text-after-edge ideographic alphabetic hanging |
| 513 |
|
mathematical |
| 514 |
|
/; |
| 515 |
$p->{prop_value}->{'text-decoration'}->{$_} = 1 for qw/ |
$p->{prop_value}->{'text-decoration'}->{$_} = 1 for qw/ |
| 516 |
none blink underline overline line-through |
none blink underline overline line-through |
| 517 |
/; |
/; |
| 564 |
<div id="$input->{id_prefix}parse-errors" class="section"> |
<div id="$input->{id_prefix}parse-errors" class="section"> |
| 565 |
<h2>Parse Errors</h2> |
<h2>Parse Errors</h2> |
| 566 |
|
|
| 567 |
<dl>]; |
<dl id="$input->{id_prefix}parse-errors-list">]; |
| 568 |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
| 569 |
|
|
| 570 |
my $p = get_css_parser (); |
my $p = get_css_parser (); |
| 571 |
|
$p->init; |
| 572 |
$p->{onerror} = sub { |
$p->{onerror} = sub { |
| 573 |
my (%opt) = @_; |
my (%opt) = @_; |
| 574 |
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level}); |
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level}); |
| 593 |
$p->{href} = $input->{uri}; |
$p->{href} = $input->{uri}; |
| 594 |
$p->{base_uri} = $input->{base_uri}; |
$p->{base_uri} = $input->{base_uri}; |
| 595 |
|
|
| 596 |
|
# if ($parse_mode eq 'q') { |
| 597 |
|
# $p->{unitless_px} = 1; |
| 598 |
|
# $p->{hashless_color} = 1; |
| 599 |
|
# } |
| 600 |
|
|
| 601 |
|
## TODO: Make $input->{s} a ref. |
| 602 |
|
|
| 603 |
my $s = \$input->{s}; |
my $s = \$input->{s}; |
| 604 |
my $charset; |
my $charset; |
| 605 |
unless ($input->{is_char_string}) { |
unless ($input->{is_char_string}) { |
| 630 |
<div id="$input->{id_prefix}parse-errors" class="section"> |
<div id="$input->{id_prefix}parse-errors" class="section"> |
| 631 |
<h2>Parse Errors</h2> |
<h2>Parse Errors</h2> |
| 632 |
|
|
| 633 |
<dl>]; |
<dl id="$input->{id_prefix}parse-errors-list">]; |
| 634 |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; |
| 635 |
|
|
| 636 |
my $onerror = sub { |
my $onerror = sub { |
| 676 |
<h2>Document Source</h2> |
<h2>Document Source</h2> |
| 677 |
<ol lang="">\n]; |
<ol lang="">\n]; |
| 678 |
if (length $$s) { |
if (length $$s) { |
| 679 |
while ($$s =~ /\G([^\x0A]*?)\x0D?\x0A/gc) { |
while ($$s =~ /\G([^\x0D\x0A]*?)(?>\x0D\x0A?|\x0A)/gc) { |
| 680 |
print STDOUT qq[<li id="$input->{id_prefix}line-$i">], htescape $1, |
print STDOUT qq[<li id="$input->{id_prefix}line-$i">], htescape $1, |
| 681 |
"</li>\n"; |
"</li>\n"; |
| 682 |
$i++; |
$i++; |
| 683 |
} |
} |
| 684 |
if ($$s =~ /\G([^\x0A]+)/gc) { |
if ($$s =~ /\G([^\x0D\x0A]+)/gc) { |
| 685 |
print STDOUT qq[<li id="$input->{id_prefix}line-$i">], htescape $1, |
print STDOUT qq[<li id="$input->{id_prefix}line-$i">], htescape $1, |
| 686 |
"</li>\n"; |
"</li>\n"; |
| 687 |
} |
} |
| 688 |
} else { |
} else { |
| 689 |
print STDOUT q[<li id="$input->{id_prefix}line-1"></li>]; |
print STDOUT q[<li id="$input->{id_prefix}line-1"></li>]; |
| 690 |
} |
} |
| 691 |
print STDOUT "</ol></div>"; |
print STDOUT "</ol></div> |
| 692 |
|
<script> |
| 693 |
|
addSourceToParseErrorList ('$input->{id_prefix}', 'parse-errors-list'); |
| 694 |
|
</script>"; |
| 695 |
} # print_input_string_section |
} # print_input_string_section |
| 696 |
|
|
| 697 |
sub print_document_tree ($$) { |
sub print_document_tree ($$) { |
| 829 |
unless $input->{nested}; |
unless $input->{nested}; |
| 830 |
|
|
| 831 |
print STDOUT qq[<dl><dt>Explicit entries</dt>]; |
print STDOUT qq[<dl><dt>Explicit entries</dt>]; |
| 832 |
|
my $i = 0; |
| 833 |
for my $uri (@{$manifest->[0]}) { |
for my $uri (@{$manifest->[0]}) { |
| 834 |
my $euri = htescape ($uri); |
my $euri = htescape ($uri); |
| 835 |
print STDOUT qq[<dd><code class=uri><<a href="$euri">$euri</a>></code></dd>]; |
print STDOUT qq[<dd id="$input->{id_prefix}index-@{[$i++]}"><code class=uri><<a href="$euri">$euri</a>></code></dd>]; |
| 836 |
} |
} |
| 837 |
|
|
| 838 |
print STDOUT qq[<dt>Fallback entries</dt><dd> |
print STDOUT qq[<dt>Fallback entries</dt><dd> |
| 841 |
for my $uri (sort {$a cmp $b} keys %{$manifest->[1]}) { |
for my $uri (sort {$a cmp $b} keys %{$manifest->[1]}) { |
| 842 |
my $euri = htescape ($uri); |
my $euri = htescape ($uri); |
| 843 |
my $euri2 = htescape ($manifest->[1]->{$uri}); |
my $euri2 = htescape ($manifest->[1]->{$uri}); |
| 844 |
print STDOUT qq[<tr><td><code class=uri><<a href="$euri">$euri</a>></code></td> |
print STDOUT qq[<tr><td id="$input->{id_prefix}index-@{[$i++]}"><code class=uri><<a href="$euri">$euri</a>></code></td> |
| 845 |
<td><code class=uri><<a href="$euri2">$euri2</a>></code></td>]; |
<td id="$input->{id_prefix}index-@{[$i++]}"><code class=uri><<a href="$euri2">$euri2</a>></code></td>]; |
| 846 |
} |
} |
| 847 |
|
|
| 848 |
print STDOUT qq[</table><dt>Online whitelist</dt>]; |
print STDOUT qq[</table><dt>Online whitelist</dt>]; |
| 849 |
for my $uri (@{$manifest->[2]}) { |
for my $uri (@{$manifest->[2]}) { |
| 850 |
my $euri = htescape ($uri); |
my $euri = htescape ($uri); |
| 851 |
print STDOUT qq[<dd><code class=uri><<a href="$euri">$euri</a>></code></dd>]; |
print STDOUT qq[<dd id="$input->{id_prefix}index-@{[$i++]}"><code class=uri><<a href="$euri">$euri</a>></code></dd>]; |
| 852 |
} |
} |
| 853 |
|
|
| 854 |
print STDOUT qq[</dl></div>]; |
print STDOUT qq[</dl></div>]; |
| 860 |
print STDOUT qq[<div id="$input->{id_prefix}document-errors" class="section"> |
print STDOUT qq[<div id="$input->{id_prefix}document-errors" class="section"> |
| 861 |
<h2>Document Errors</h2> |
<h2>Document Errors</h2> |
| 862 |
|
|
| 863 |
<dl>]; |
<dl id=document-errors-list>]; |
| 864 |
push @nav, [qq[#$input->{id_prefix}document-errors] => 'Document Error'] |
push @nav, [qq[#$input->{id_prefix}document-errors] => 'Document Error'] |
| 865 |
unless $input->{nested}; |
unless $input->{nested}; |
| 866 |
|
|
| 888 |
} |
} |
| 889 |
$time{check} = time - $time1; |
$time{check} = time - $time1; |
| 890 |
|
|
| 891 |
print STDOUT qq[</dl></div>]; |
print STDOUT qq[</dl> |
| 892 |
|
<script> |
| 893 |
|
addSourceToParseErrorList ('$input->{id_prefix}', 'document-errors-list'); |
| 894 |
|
</script></div>]; |
| 895 |
|
|
| 896 |
return $elements; |
return $elements; |
| 897 |
} # print_structure_error_dom_section |
} # print_structure_error_dom_section |
| 1002 |
print STDOUT qq[</dl></div>]; |
print STDOUT qq[</dl></div>]; |
| 1003 |
} # print_listing_section |
} # print_listing_section |
| 1004 |
|
|
| 1005 |
|
sub print_rdf_section ($$$) { |
| 1006 |
|
my ($input, $rdfs) = @_; |
| 1007 |
|
|
| 1008 |
|
push @nav, ['#' . $input->{id_prefix} . 'rdf' => 'RDF'] |
| 1009 |
|
unless $input->{nested}; |
| 1010 |
|
print STDOUT qq[ |
| 1011 |
|
<div id="$input->{id_prefix}rdf" class="section"> |
| 1012 |
|
<h2>RDF Triples</h2> |
| 1013 |
|
|
| 1014 |
|
<dl>]; |
| 1015 |
|
my $i = 0; |
| 1016 |
|
for my $rdf (@$rdfs) { |
| 1017 |
|
print STDOUT qq[<dt id="$input->{id_prefix}rdf-@{[$i++]}">]; |
| 1018 |
|
print STDOUT get_node_link ($input, $rdf->[0]); |
| 1019 |
|
print STDOUT qq[<dd><dl>]; |
| 1020 |
|
for my $triple (@{$rdf->[1]}) { |
| 1021 |
|
print STDOUT '<dt>' . get_node_link ($input, $triple->[0]) . '<dd>'; |
| 1022 |
|
print STDOUT get_rdf_resource_html ($triple->[1]); |
| 1023 |
|
print STDOUT ' '; |
| 1024 |
|
print STDOUT get_rdf_resource_html ($triple->[2]); |
| 1025 |
|
print STDOUT ' '; |
| 1026 |
|
print STDOUT get_rdf_resource_html ($triple->[3]); |
| 1027 |
|
} |
| 1028 |
|
print STDOUT qq[</dl>]; |
| 1029 |
|
} |
| 1030 |
|
print STDOUT qq[</dl></div>]; |
| 1031 |
|
} # print_rdf_section |
| 1032 |
|
|
| 1033 |
|
sub get_rdf_resource_html ($) { |
| 1034 |
|
my $resource = shift; |
| 1035 |
|
if (defined $resource->{uri}) { |
| 1036 |
|
my $euri = htescape ($resource->{uri}); |
| 1037 |
|
return '<code class=uri><<a href="' . $euri . '">' . $euri . |
| 1038 |
|
'</a>></code>'; |
| 1039 |
|
} elsif (defined $resource->{bnodeid}) { |
| 1040 |
|
return htescape ('_:' . $resource->{bnodeid}); |
| 1041 |
|
} elsif ($resource->{nodes}) { |
| 1042 |
|
return '(rdf:XMLLiteral)'; |
| 1043 |
|
} elsif (defined $resource->{value}) { |
| 1044 |
|
my $elang = htescape (defined $resource->{language} |
| 1045 |
|
? $resource->{language} : ''); |
| 1046 |
|
my $r = qq[<q lang="$elang">] . htescape ($resource->{value}) . '</q>'; |
| 1047 |
|
if (defined $resource->{datatype}) { |
| 1048 |
|
my $euri = htescape ($resource->{datatype}); |
| 1049 |
|
$r .= '^^<code class=uri><<a href="' . $euri . '">' . $euri . |
| 1050 |
|
'</a>></code>'; |
| 1051 |
|
} elsif (length $resource->{language}) { |
| 1052 |
|
$r .= '@' . htescape ($resource->{language}); |
| 1053 |
|
} |
| 1054 |
|
return $r; |
| 1055 |
|
} else { |
| 1056 |
|
return '??'; |
| 1057 |
|
} |
| 1058 |
|
} # get_rdf_resource_html |
| 1059 |
|
|
| 1060 |
sub print_result_section ($) { |
sub print_result_section ($) { |
| 1061 |
my $result = shift; |
my $result = shift; |
| 1062 |
|
|
| 1186 |
|
|
| 1187 |
my $r = ''; |
my $r = ''; |
| 1188 |
|
|
| 1189 |
if (defined $err->{line}) { |
my $line; |
| 1190 |
if ($err->{column} > 0) { |
my $column; |
| 1191 |
$r = qq[<a href="#$input->{id_prefix}line-$err->{line}">Line $err->{line}</a> column $err->{column}]; |
|
| 1192 |
|
if (defined $err->{node}) { |
| 1193 |
|
$line = $err->{node}->get_user_data ('manakai_source_line'); |
| 1194 |
|
if (defined $line) { |
| 1195 |
|
$column = $err->{node}->get_user_data ('manakai_source_column'); |
| 1196 |
} else { |
} else { |
| 1197 |
$err->{line} = $err->{line} - 1 || 1; |
if ($err->{node}->node_type == $err->{node}->ATTRIBUTE_NODE) { |
| 1198 |
$r = qq[<a href="#$input->{id_prefix}line-$err->{line}">Line $err->{line}</a>]; |
my $owner = $err->{node}->owner_element; |
| 1199 |
|
$line = $owner->get_user_data ('manakai_source_line'); |
| 1200 |
|
$column = $owner->get_user_data ('manakai_source_column'); |
| 1201 |
|
} else { |
| 1202 |
|
my $parent = $err->{node}->parent_node; |
| 1203 |
|
if ($parent) { |
| 1204 |
|
$line = $parent->get_user_data ('manakai_source_line'); |
| 1205 |
|
$column = $parent->get_user_data ('manakai_source_column'); |
| 1206 |
|
} |
| 1207 |
|
} |
| 1208 |
|
} |
| 1209 |
|
} |
| 1210 |
|
unless (defined $line) { |
| 1211 |
|
if (defined $err->{token} and defined $err->{token}->{line}) { |
| 1212 |
|
$line = $err->{token}->{line}; |
| 1213 |
|
$column = $err->{token}->{column}; |
| 1214 |
|
} elsif (defined $err->{line}) { |
| 1215 |
|
$line = $err->{line}; |
| 1216 |
|
$column = $err->{column}; |
| 1217 |
|
} |
| 1218 |
|
} |
| 1219 |
|
|
| 1220 |
|
if (defined $line) { |
| 1221 |
|
if (defined $column and $column > 0) { |
| 1222 |
|
$r = qq[<a href="#$input->{id_prefix}line-$line">Line $line</a> column $column]; |
| 1223 |
|
} else { |
| 1224 |
|
$line = $line - 1 || 1; |
| 1225 |
|
$r = qq[<a href="#$input->{id_prefix}line-$line">Line $line</a>]; |
| 1226 |
} |
} |
| 1227 |
} |
} |
| 1228 |
|
|
| 1229 |
if (defined $err->{node}) { |
if (defined $err->{node}) { |
| 1230 |
$r .= ' ' if length $r; |
$r .= ' ' if length $r; |
| 1231 |
$r = get_node_link ($input, $err->{node}); |
$r .= get_node_link ($input, $err->{node}); |
| 1232 |
} |
} |
| 1233 |
|
|
| 1234 |
if (defined $err->{index}) { |
if (defined $err->{index}) { |
| 1235 |
$r .= ' ' if length $r; |
if (length $r) { |
| 1236 |
$r .= 'Index ' . (0+$err->{index}); |
$r .= ', Index ' . (0+$err->{index}); |
| 1237 |
|
} else { |
| 1238 |
|
$r .= "<a href='#$input->{id_prefix}index-@{[0+$err->{index}]}'>Index " |
| 1239 |
|
. (0+$err->{index}) . '</a>'; |
| 1240 |
|
} |
| 1241 |
} |
} |
| 1242 |
|
|
| 1243 |
if (defined $err->{value}) { |
if (defined $err->{value}) { |
| 1265 |
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') { |
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') { |
| 1266 |
$r = qq[<strong><a href="../error-description#level-u">Not |
$r = qq[<strong><a href="../error-description#level-u">Not |
| 1267 |
supported</a></strong>: ]; |
supported</a></strong>: ]; |
| 1268 |
|
} elsif ($err->{level} eq 'i') { |
| 1269 |
|
$r = qq[<strong><a href="../error-description#level-i">Information</a></strong>: ]; |
| 1270 |
} else { |
} else { |
| 1271 |
my $elevel = htescape ($err->{level}); |
my $elevel = htescape ($err->{level}); |
| 1272 |
$r = qq[<strong><a href="../error-description#level-$elevel">$elevel</a></strong>: |
$r = qq[<strong><a href="../error-description#level-$elevel">$elevel</a></strong>: |