xmerl_scan {validation, true}

Mikael Karlsson <>
Tue May 3 17:28:15 CEST 2005


I have similar problem (OTB R10B-3)
Something with a page break, like:
<!ENTITY % listings "Rup | Bog | 
                  BoR">

seems to give me 3326- fatal: unexpected_end

=== reason={error,{fatal,{unexpected_end,"./mp.dtd",131,156}}}


Regards
Mikael

måndag 02 maj 2005 16:55 skrev Bertil Karlsson:
> The content of the fix is as follows:
> diff xmerl_scan.erl@@/main/xmerl/90 xmerl_scan.erl@@/main/xmerl/89
> 2785,2790d2784
> < scan_nmtoken("%"++T, S0=#xmerl_scanner{environment={external,_}}) ->
> <     ?bump_col(1),
> <     {PERefName, T1, S1} = scan_pe_reference(T, S),
> <     ExpRef = expand_pe_reference(PERefName, S1,as_PE),
> <     {_,T2,S2}  = strip(ExpRef ++ T1,S1),
> <     scan_nmtoken(T2,S2);
>
>
> /Bertil
>
> Bertil Karlsson wrote:
> > This was a bug in xmerl, that now is corrected and probably will be part
> > of the next open source release.
> > /Bertil
> >
> > Michael McDaniel wrote:
> >> using this DTD...
> >> ---------------------
> >> <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> <!ENTITY % listings "Rup | Bog | BoR">
> >>
> >> <!ATTLIST test
> >>      testListings (%listings;)  #REQUIRED
> >>
> >> ---------------------
> >>
> >> results in
> >> ()90> xmerl_scan:file("test.xml",
> >> [{validation,true}, {doctype_DTD, "foo.dtd"}]).
> >> 2775- fatal: {invalid_nmtoken,"%listi"}
> >> ** exited: {fatal,{{invalid_nmtoken,"%listi"},"./foo.dtd",7,20}} **
> >>
> >>
> >> although using this one works...
> >> ---------------------
> >> <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> <!ATTLIST test
> >>      testListings (Rup | Bog | BoR)  #REQUIRED
> >>
> >> ---------------------
> >>
> >>
> >> QUESTION: 1) is something incorrect with the first DTD or is it a bug
> >> in xmerl_scan using validation?
> >>
> >>
> >> thanks,
> >>
> >> ~Michael



More information about the erlang-questions mailing list