| 157 |
} |
} |
| 158 |
|
|
| 159 |
$out->start_tag ('dd', class => $class); |
$out->start_tag ('dd', class => $class); |
| 160 |
|
|
| 161 |
|
## Error level |
| 162 |
|
|
| 163 |
|
if ($error_level eq 'm') { |
| 164 |
|
$out->html (qq[<strong><a href="../error-description#level-m"><em class=rfc2119>MUST</em>-level |
| 165 |
|
error</a></strong>: ]); |
| 166 |
|
} elsif ($error_level eq 's') { |
| 167 |
|
$out->html (qq[<strong><a href="../error-description#level-s"><em class=rfc2119>SHOULD</em>-level |
| 168 |
|
error</a></strong>: ]); |
| 169 |
|
} elsif ($error_level eq 'w') { |
| 170 |
|
$out->html (qq[<strong><a href="../error-description#level-w">Warning</a></strong>: ]); |
| 171 |
|
} elsif ($error_level eq 'u') { |
| 172 |
|
$out->html (qq[<strong><a href="../error-description#level-u">Not |
| 173 |
|
supported</a></strong>: ]); |
| 174 |
|
} elsif ($error_level eq 'i') { |
| 175 |
|
$out->html (qq[<strong><a href="../error-description#level-i">Information</a></strong>: ]); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
## Error message |
| 179 |
|
|
| 180 |
$out->text ($error_type_text); |
$out->text ($error_type_text); |
| 181 |
|
|
| 182 |
|
## Additional error description |
| 183 |
|
|
| 184 |
if (defined $opt{text}) { |
if (defined $opt{text}) { |
| 185 |
$out->html (' (<q>'); |
$out->html (' (<q>'); |
| 186 |
$out->text ($opt{text}); |
$out->text ($opt{text}); |
| 187 |
$out->html ('</q>)'); |
$out->html ('</q>)'); |
| 188 |
} |
} |
| 189 |
|
|
| 190 |
|
## Link to a long description |
| 191 |
|
|
| 192 |
my $fragment = $opt{type}; |
my $fragment = $opt{type}; |
| 193 |
$fragment =~ tr/ /-/; |
$fragment =~ tr/ /-/; |
| 194 |
$fragment = $out->encode_url_component ($fragment); |
$fragment = $out->encode_url_component ($fragment); |
| 195 |
$out->text (' ['); |
$out->text (' ['); |
| 196 |
$out->link ('Description', url => '../error-description#' . $fragment); |
$out->link ('Description', url => '../error-description#' . $fragment, |
| 197 |
|
rel => 'help'); |
| 198 |
$out->text (']'); |
$out->text (']'); |
| 199 |
|
|
| 200 |
|
|
| 318 |
$out->end_section; |
$out->end_section; |
| 319 |
} # generate_result_section |
} # generate_result_section |
| 320 |
|
|
|
sub get_error_level_label ($) { |
|
|
my $self = shift; |
|
|
my $err = shift; |
|
|
|
|
|
my $r = ''; |
|
|
|
|
|
if (not defined $err->{level} or $err->{level} eq 'm') { |
|
|
$r = qq[<strong><a href="../error-description#level-m"><em class=rfc2119>MUST</em>-level |
|
|
error</a></strong>: ]; |
|
|
} elsif ($err->{level} eq 's') { |
|
|
$r = qq[<strong><a href="../error-description#level-s"><em class=rfc2119>SHOULD</em>-level |
|
|
error</a></strong>: ]; |
|
|
} elsif ($err->{level} eq 'w') { |
|
|
$r = qq[<strong><a href="../error-description#level-w">Warning</a></strong>: |
|
|
]; |
|
|
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') { |
|
|
$r = qq[<strong><a href="../error-description#level-u">Not |
|
|
supported</a></strong>: ]; |
|
|
} elsif ($err->{level} eq 'i') { |
|
|
$r = qq[<strong><a href="../error-description#level-i">Information</a></strong>: ]; |
|
|
} else { |
|
|
my $elevel = htescape ($err->{level}); |
|
|
$r = qq[<strong><a href="../error-description#level-$elevel">$elevel</a></strong>: |
|
|
]; |
|
|
} |
|
|
|
|
|
return $r; |
|
|
} # get_error_level_label |
|
|
|
|
| 321 |
1; |
1; |