| 21 |
|
|
| 22 |
my $onerror = sub { |
my $onerror = sub { |
| 23 |
my $err = shift; |
my $err = shift; |
| 24 |
my $line = $err->location->line_number; |
$result->add_error (line => $err->location->line_number, |
| 25 |
$out->start_tag ('dt'); |
column => $err->location->column_number, |
| 26 |
$out->xref (qq[Line $line], target => 'line-' . $line); |
type => 'xml parse error', |
| 27 |
$out->html (' column ' . $err->location->column_number . '<dd>'); |
value => $err->text, |
| 28 |
$out->text ($err->text); |
level => [ |
|
|
|
|
add_error ('syntax', {type => $err->text, |
|
|
level => [ |
|
| 29 |
$err->SEVERITY_FATAL_ERROR => 'm', |
$err->SEVERITY_FATAL_ERROR => 'm', |
| 30 |
$err->SEVERITY_ERROR => 'm', |
$err->SEVERITY_ERROR => 'm', |
| 31 |
$err->SEVERITY_WARNING => 's', |
$err->SEVERITY_WARNING => 's', |
| 32 |
]->[$err->severity]} => $result); |
]->[$err->severity], |
| 33 |
|
layer => 'syntax'); |
| 34 |
return 1; |
return 1; |
| 35 |
}; |
}; |
| 36 |
|
|