Yeah, and in that case you don't need "./" which is redundant. The
behavior of the two is exactly the same (will always select the same
nodes). I'd expect any difference in performance to be negligible (someone
correct me if I'm wrong). So it's a matter of personal preference.


Evan

On 5/13/11 7:06 AM, "Mike Sokolov" <[email protected]> wrote:

>Thanks Ken and Evan - I got snarled up with the "-or-self" piece, I
>guess.  Evan I think you are exactly right that confusion arises from
>the apparent equivalence of .//foo and ./descendant::foo.  I guess what
>I was trying to share is that I think it's often more clear to write
>
>  ./descendant::foo[1] rather than (.//foo)[1].
>
>Of course that's a matter of opinion - I don't think there is any
>difference in performance or behavior, is there?
>
>-Mike

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to