On 20/11/2013 08:53, Diego Bosc? wrote: > Take into account that [position()=1] is equivalent to [1] in XPath. > In fact, another thing worth noticing is that if you can assure unique > atCodes you only need to put last one. Using both XPath look like this > > /cluster[@archetype_id='openEHR-EHR-CLUSTER.bert.v1']/items[@archetype_node_id='at0008']/value[1]/value=Jan > /cluster[@archetype_id='openEHR-EHR-CLUSTER.bert.v1']/items[@archetype_node_id='at0008']/value[2]/value=Peter > /cluster[@archetype_id='openEHR-EHR-CLUSTER.bert.v1']/items[@archetype_node_id='at0009']/value/value=Balkenende
firstly, the statement about atcodes above is right - we only need to do this [1] [2] business when there are multiple instances of the same at-code. In the above, the [1] and [2] selectors aren't to select different values from under an ELEMENT (which is what the at0008 selects), so I would have expected them where Bert put them. But I'm not sure if the above is wrong either. Someone should see what Saxon makes of the above compared to Bert or Alessando's version. I'll try on the weekend if noone else gets round to it before then... - thomas

