aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl_otpsgml.erl
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2015-04-28 15:22:36 +0200
committerRichard Carlsson <[email protected]>2015-04-28 15:31:41 +0200
commitbca6864c181eb8c14a0b8e47afb3dd6206e6ae7c (patch)
tree72a44e2363184aa911666438e20f31b42e3dc322 /lib/xmerl/src/xmerl_otpsgml.erl
parent861145a503c77d8144033f38d288bdda31699edd (diff)
downloadotp-bca6864c181eb8c14a0b8e47afb3dd6206e6ae7c.tar.gz
otp-bca6864c181eb8c14a0b8e47afb3dd6206e6ae7c.tar.bz2
otp-bca6864c181eb8c14a0b8e47afb3dd6206e6ae7c.zip
Stop xmerl printing to stdout
Replace sloppy calls to io:format() in xmerl to use error_logger or debug macros instead, as appropriate.
Diffstat (limited to 'lib/xmerl/src/xmerl_otpsgml.erl')
-rw-r--r--lib/xmerl/src/xmerl_otpsgml.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/xmerl/src/xmerl_otpsgml.erl b/lib/xmerl/src/xmerl_otpsgml.erl
index 38688e788f..b9649ecbad 100644
--- a/lib/xmerl/src/xmerl_otpsgml.erl
+++ b/lib/xmerl/src/xmerl_otpsgml.erl
@@ -34,6 +34,7 @@
export_text/1]).
-include("xmerl.hrl").
+-include("xmerl_internal.hrl").
'#xml-inheritance#'() -> [xmerl_sgml].
@@ -58,7 +59,7 @@
%% the scope of a markup is not extended by mistake.)
'#element#'(Tag, Data, Attrs, _Parents, _E) ->
-% io:format("parents:\n~p\n",[_Parents]),
+% ?dbg("parents:\n~p\n",[_Parents]),
case convert_tag(Tag,Attrs) of
{false,NewTag,NewAttrs} ->
markup(NewTag, NewAttrs, Data);
@@ -108,7 +109,7 @@ convert_aref([#xmlAttribute{name = href, value = V}|_Rest]) ->
seealso
end;
convert_aref([#xmlAttribute{name = K}|Rest]) ->
- io:format("Warning: ignoring attribute \'~p\' for tag \'a\'\n",[K]),
+ error_logger:warning_msg("ignoring attribute \'~p\' for tag \'a\'\n",[K]),
convert_aref(Rest).
convert_aref_attrs(url,Attrs) ->
Attrs;
@@ -130,7 +131,7 @@ html_content([_H|T]) ->
% convert_seealso_attrs([#xmlAttribute{name = href, value = V} = A|Rest]) ->
% [A#xmlAttribute{name=marker,value=normalize_web_ref(V)}|convert_seealso_attrs(Rest)];
% convert_seealso_attrs([#xmlAttribute{name = K}|Rest]) ->
-% io:format("Warning: ignoring attribute \'~p\' for tag \'a\'\n",[K]),
+% error_logger:warning_msg("ignoring attribute \'~p\' for tag \'a\'\n",[K]),
% convert_seealso_attrs(Rest);
% convert_seealso_attrs([]) ->
% [].