aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl_xpath.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2010-12-08 11:01:12 +0100
committerLars Thorsen <[email protected]>2011-11-11 11:58:43 +0100
commitbffc6b40025b620b36c764aa9b74f00d31edb3a8 (patch)
tree09499c5acdf8849f9be7bd1c488d838739dea51c /lib/xmerl/src/xmerl_xpath.erl
parent3eaca03e5c07429fc82fde26dc0fb3020b022be0 (diff)
downloadotp-bffc6b40025b620b36c764aa9b74f00d31edb3a8.tar.gz
otp-bffc6b40025b620b36c764aa9b74f00d31edb3a8.tar.bz2
otp-bffc6b40025b620b36c764aa9b74f00d31edb3a8.zip
Fix processing-instruction(name?)
Diffstat (limited to 'lib/xmerl/src/xmerl_xpath.erl')
-rw-r--r--lib/xmerl/src/xmerl_xpath.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/xmerl/src/xmerl_xpath.erl b/lib/xmerl/src/xmerl_xpath.erl
index b23a659ed2..40ba48b357 100644
--- a/lib/xmerl/src/xmerl_xpath.erl
+++ b/lib/xmerl/src/xmerl_xpath.erl
@@ -734,12 +734,14 @@ node_test({node_type, NT}, #xmlNode{node = N}, _Context) ->
true;
{comment, #xmlComment{}} ->
true;
+ {processing_instruction, #xmlPI{}} ->
+ true;
_ ->
false
end;
-node_test({processing_instruction, {literal, _, Name}},
- #xmlNode{node = {processing_instruction, Name, _Data}}, _Context) ->
- true;
+node_test({processing_instruction, Name1},
+ #xmlNode{node = #xmlPI{name = Name2}}, _Context) ->
+ Name1 == atom_to_list(Name2);
node_test(_Other, _N, _Context) ->
%io:format("node_test(~p, ~p) -> false.~n", [_Other, write_node(_N)]),
false.