Typewriter land again…
test_sgml.
(...)
c:/rtools42/home/matthias/swipl-devel/packages/sgml/Test/estag.sgml-c:/rtools42/home/matthias/swipl-devel/packages/sgml/Test/ok/estag.ok
WRONG
OK:
[element(oops,[],['<snag attr=2>'])]
ANSWER:
[element(oops,[],['<snag attr=2>\n'])]
I can silence this message by changing load_sgml_file/2 to load_sgml/3 which is recommended anyway, and passing [type(text)] as an option.
Like this:
load_file(File, Term) :-
load_pred(Ext, Pred),
file_name_extension(_, Ext, File),
!,
retractall(error(_,_,_)),
call(Pred, File, Term, [type(text)]). %%%%%% here
load_file(Base, Term) :-
load_pred(Ext, Pred),
file_name_extension(Base, Ext, File),
exists_file(File),
!,
retractall(error(_,_,_)),
call(Pred, File, Term, []).
load_pred(sgml, load_sgml).
load_pred(xml, load_xml).
load_pred(html, load_html).