[erlang-questions] xmerl and DTD

Bertil Karlsson <>
Fri Oct 27 08:51:38 CEST 2006


I tried the same as you describe below, and it works fine for me.
I am using the last release of OTP.

/Bertil

Arndt Jonasson wrote:
>I have problems using xmerl to validate an XML document using a DTD.
>
>The DTD looks like this:
>    <!ELEMENT a1 (d, (b | c)*)>
>    <!ELEMENT a2 (d | b | c)*>
>
>    <!ELEMENT b EMPTY>
>    <!ELEMENT c EMPTY>
>    <!ELEMENT d EMPTY>
>
>The document looks like this:
>    <a1>
>
>      <d/>
>
>      <b/>
>
>      <c/>
>
>    </a1>
>
>When I do
>
>xmerl_scan:file("test.xml", [{doctype_DTD, "test.dtd"}, {validation, true}])
>
>I get this crash:
>
>   535- fatal: {failed_validation,{function_clause,
>				       [{xmerl_validate,
>					    choice,
>					    [[b,c],
>					     [],
>					     37,
>					     remove,
>					     {xmerl_scanner,
>						 undefined,
>						 no,
>   ...
>




More information about the erlang-questions mailing list