[erlang-bugs] xmerl_xpath doesn't handle "//@*" correctly?
Matthew Dempsky
matthew@REDACTED
Mon Aug 11 23:38:36 CEST 2008
I'm not an xpath expert, but this seems inconsistent to me:
1> F = fun(S) -> {Doc, _} = xmerl_scan:string(S),
length(xmerl_xpath:string("//@*", Doc)) end.
#Fun<erl_eval.6.13229925>
2> F("<a b='c'></a>").
1
3> F("<a b='c'><d/></a>").
1
4> F("<a b='c'> </a>").
0
Shouldn't "//@*" return 1 attribute for the last case as well? (Using
"//*/@*" instead works in all three cases as I expect.)
More information about the erlang-bugs
mailing list