Hey folks, On 20 Nov 2013, at 09:53, Diego Bosc? <yampeku at gmail.com> wrote: > Take into account that [position()=1] is equivalent to [1] in XPath.
Yup! The only reason to have the discussion is the difference, in xpath, between (: from the items with node id at0009, take the first one :) /*[@archetype_node_id=at0009][1] (: from all the items, take the first one, then take all the ones with node id at0009 :) /*[1][@archetype_node_id=at0009] (: from all the items, take the first one iff it has node id at0009 :) /*[@archetype_node_id=at0009 and position()=1] Depending on the data you're xpathing, these may or may not have the same result, since the construct [][] is a sub-select. I believe, looking at everyone's answers, the intent of ADL paths is that most-precise third option (AND of the predicates), which is also what we've implemented previously on our SQL backend, and conceptually matches that proposal of [at0009,1] (the , meaning AND I think), and that would make for an easy and unambiguous ADL path --> xpath translation. But, those aren't the current rules, and with our xml backend, right now, we have a not so easy ADL path --> xpath translation, because people want to write [at0009][1] which we dutifully turn into xpath [@archetype_node_id=at0009][1] which _seems_ the most spec-compatible behavior insofar as ADL paths are precisely defined -- but that does not match what people mean. Hence, confusion, anger, suffering, and me asking Bert and Bert asking you :) regards, Leo PS: Jan Peter Balkende is prof. mr. dr. dr.h.c. mult. Jan __Pieter__ Balkende, Jan Peter is his roepnaam which should probably be kept as one string..... -- This e-mail message is intended exclusively for the addressee(s). Please inform us immediately if you are not the addressee.

