Re: [xml] xpath problem



Thanks for explanation!!! It really looked strange :)

Aleksey.

 Conclusion: it's not a bug !

 [(ancestor::node() = /EndUsers[1]/child::EndUser[ Id='aaa'])]
does a comparison between nodesets, defined at
  http://www.w3.org/TR/xpath#booleans

"If both objects to be compared are node-sets, then the comparison
will be true if and only if there is a node in the first node-set and
a node in the second node-set such that the result of performing the
comparison on the string-values of the two nodes is true."

 in the case of b.xml the string-value of EndUsers and EndUser
are the same (because there is no \n to differenciate them), so EndUsers matches the criteria and the EndUser child is selected in the
resutling node-list.

 The bug is in the expression given, it does *not* select all childs
of the EndUser node !

  NOTABUG, CLOSED

 XPath is subtle :-\

Daniel






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]