Op donderdag 21 november 2013 schreef Thomas Beale (
thomas.beale at oceaninformatics.com):

> 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.


I agree, since we are not writing XML or xPath, but ADL paths, we can
honour our own rules. In XML the archetype_node_id is just an attribute,
and when you read about XML Schema, you see that the element name is very
important, and attributes are often ignored in these element rules. So in
XML formalism it is understandable that elements with different
archetype_node_id
(an attribute) can fit in the same list-array, and having the same counter-

But because we need to honour our own rules in which the archetype_node_id
is very important, and two elements with same names but
different archetype_node_ids cannot be in the same list-array.

Bert



>
> 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
>
>
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at lists.openehr.org
> http://lists.openehr.org/mailman/listinfo/openehr-
> technical_lists.openehr.org
>


-- 

*This e-mail message is intended exclusively for the addressee(s). Please
inform us immediately if you are not the addressee.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20131122/55ef1233/attachment.html>

Reply via email to