8 |
return $self; |
return $self; |
9 |
} # new |
} # new |
10 |
|
|
11 |
sub generate_parse_error_section ($) { |
sub generate_syntax_error_section ($) { |
12 |
my $self = shift; |
my $self = shift; |
13 |
|
|
14 |
my $out = shift; |
my $out = $self->output; |
15 |
|
|
16 |
$out->start_section (id => 'parse-errors', title => 'Errors'); |
$out->start_section (role => 'parse-errors'); |
17 |
$out->start_tag ('dl'); |
$out->start_error_list (role => 'parse-errors'); |
18 |
|
$self->result->layer_applicable ('syntax'); |
19 |
|
|
20 |
|
$self->result->add_error (input => $self->input, |
21 |
|
level => 'u', |
22 |
|
layer => 'syntax', |
23 |
|
type => 'media type not supported:syntax', |
24 |
|
text => $self->input->{media_type}); |
25 |
|
|
26 |
## TODO: |
$out->end_error_list (role => 'parse-errors'); |
|
$out->start_tag ('dt', class => 'unsupported'); |
|
|
$out->url ($input->{uri}); |
|
|
$out->html (q[<dd class=unsupported><strong><a href="../error-description#level-u">Not |
|
|
supported</a></strong>: |
|
|
Media type |
|
|
<code class="MIME" lang="en">]); |
|
|
$out->text ($input->{media_type}); |
|
|
$out->html (q[</code> is not supported.]); |
|
|
$out->end_tag ('dl'); |
|
27 |
$out->end_section; |
$out->end_section; |
28 |
|
|
29 |
my $result = $self->result; |
$self->result->layer_uncertain ('structure'); |
30 |
|
$self->result->layer_uncertain ('semantics'); |
31 |
|
} # generate_syntax_error_section |
32 |
|
|
33 |
add_error (char => {level => 'u'} => $result); |
sub generate_source_string_section ($) { } |
|
add_error (syntax => {level => 'u'} => $result); |
|
|
add_error (structure => {level => 'u'} => $result); |
|
|
} # generate_parse_error_section |
|
34 |
|
|
35 |
sub generate_structure_error_section ($) { } |
sub generate_structure_error_section ($) { } |
36 |
|
|