xhtml-1.0 transitional and xmerl?
Joakim G.
jocke@REDACTED
Sat Jan 15 22:56:08 CET 2005
Hi,
I tried to validate couple of xhtml-1.0 pages with xmerl. I downloaded
the xhtml-1.0 transitional DTDs from:
http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Transitional and
tried to use them with xmerl:
====
Erlang (BEAM) emulator version 5.4.3 [source] [hipe]
Eshell V5.4.3 (abort with ^G)
1> xmerl_scan:file("test.html", [{validation, true}, {fetch_fun, fun(U, G) -> {ok, {file, "xhtml1-transitional.dtd"}, G} end}]).
2748- fatal: {invalid_name," HTMLl"}
** exited: {fatal,{{invalid_name," HTMLl"},"xhtml1-transitional.dtd",29,700}} **
====
Hmm. Sifting through the xmerl release notes I realised that external
entities isn't supported. Just for the heck of it I replaced the
external entity references in the DTD with the actual content and
tried again:
====
Erlang (BEAM) emulator version 5.4.3 [source] [hipe]
Eshell V5.4.3 (abort with ^G)
1> xmerl_scan:file("test.html", [{validation, true}, {fetch_fun, fun(U, G) -> {ok, {file, "xhtml1-transitional.dtd"}, G} end}]).
3319- fatal: unexpected_end
** exited: {fatal,{unexpected_end,"xhtml1-transitional.dtd",635,111}} **
2>
====
It was doomed to fail I suppose.
My question: Has anyone else used xmerl in combination with the xhtml-1.0
DTDs?
Cheers
/Jocke
More information about the erlang-questions
mailing list