aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl_validate.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_validate.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_validate.erl')
-rw-r--r--lib/xmerl/src/xmerl_validate.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/xmerl/src/xmerl_validate.erl b/lib/xmerl/src/xmerl_validate.erl
index 60f228474b..e1d71aa818 100644
--- a/lib/xmerl/src/xmerl_validate.erl
+++ b/lib/xmerl/src/xmerl_validate.erl
@@ -23,7 +23,7 @@
-include("xmerl.hrl"). % record def, macros
-
+-include("xmerl_internal.hrl").
%% +type validate(xmerl_scanner(),xmlElement())->
@@ -300,7 +300,7 @@ test_attribute_value('NMTOKEN',#xmlAttribute{name=Name,value=V}=Attr,
true->
ok;
false->
- %%io:format("Warning*** nmtoken,value_incorrect: ~p~n",[V]),
+ %%?dbg("nmtoken,value_incorrect: ~p~n",[V]),
exit({error,{invalid_value_nmtoken,Name,V}})
end
end,
@@ -381,7 +381,7 @@ test_attribute_value({Type,L},#xmlAttribute{value=Value}=Attr,Default,_S)
exit({error,{duplicate_tokens_not_allowed,{list,L}}})
end;
test_attribute_value(_Rule,Attr,_,_) ->
-% io:format("Attr Value*****~nRule~p~nValue~p~n",[Rule,Attr]),
+% ?dbg("Attr Value*****~nRule~p~nValue~p~n",[Rule,Attr]),
Attr.
@@ -423,11 +423,11 @@ parse({'+',SubRule}, XMLS, Rules, WSaction, S) ->
parse({choice,CHOICE}, XMLS, Rules, WSaction, S)->
% case XMLS of
% [] ->
-% io:format("~p~n",[{choice,CHOICE,[]}]);
+% ?dbg("~p~n",[{choice,CHOICE,[]}]);
% [#xmlElement{name=Name,pos=Pos}|_] ->
-% io:format("~p~n",[{choice,CHOICE,{Name,Pos}}]);
+% ?dbg("~p~n",[{choice,CHOICE,{Name,Pos}}]);
% [#xmlText{value=V}|_] ->
-% io:format("~p~n",[{choice,CHOICE,{text,V}}])
+% ?dbg("~p~n",[{choice,CHOICE,{text,V}}])
% end,
choice(CHOICE, XMLS, Rules, WSaction, S);
parse(empty, [], _Rules, _WSaction, _S) ->
@@ -550,10 +550,10 @@ star(Rule,XMLS,Rules,WSaction,Tree,S) ->
{WS,XMLS1} = whitespace_action(XMLS,WSaction),
case parse(Rule,XMLS1,Rules,WSaction,S) of
{error, _E, {{next,N},{act,A}}}->
- %%io:format("Error~p~n",[_E]),
+ %%?dbg("Error~p~n",[_E]),
{WS++Tree++A,N};
{error, _E}->
- %%io:format("Error~p~n",[_E]),
+ %%?dbg("Error~p~n",[_E]),
% {WS++[Tree],[]};
case whitespace_action(XMLS,ws_action(WSaction,remove)) of
{[],_} ->