XMERL - why fatal errors?

Bertil Karlsson bertil.karlsson@REDACTED
Fri Apr 28 13:29:22 CEST 2006


Hi,

The present version of xmerl does not distinguish between fatal errors 
and validation errors .
This is also commented in the User's Guide of xmerl.

Another error strategy is under development, but not entirely finished. 
With that strategy
it will continue parsing even though a minor error is encountered and 
return a parse/validation error as a tuple {error, Reason(s)}

/Bertil

karol skocik wrote:
> Hi all,
>  I am working with XMERL and I am curious why XMERL reacs so
> "brutally" when it failes to validate file agains some DTD. If I don't
> wrap xmerl_scan:parse_string in catch, it kills my server recieving
> for XML server. Parsing of a simple but wrong file results in :
>
> 3229- fatal: {error,{error_missing_element_declaration_in_DTD,
>                        'add-group-cacaca'}}
> !!!!! {'EXIT',{fatal,{{error,{error_missing_element_declaration_in_DTD,
>                                 'add-group-cacaca'}},
>                      {file,file_name_unknown},
>                      {line,4},
>                      {col,6}}}}
>
> Why? Why not simple as {error, validation_failed} or something?
>
> Is there any way to prevent XMERL fail to fatal panic when validation
> fails or should I cope with it myself?
>
> Karol



More information about the erlang-questions mailing list