Paths in archetyped data

2013-11-22 Thread Thomas Beale
On 22/11/2013 09:44, Thomas Beale wrote:

 Something IMPORTANT I have said before, and completely forgot due to 
 other distractions:

'should' have said before!


 There is a proposal (it's on the SPECPR issue tracker somewhere) to 
 add a property to the LOCATABLE class called (say) sibling_id: INTEGER

 which would have the effect of unambiguously numbering sibings under a 
 container attribute in the data. In XML data I would expect to make 
 this an attribute, so the effect on paths would be be able to say

 cluster[at0009]/items[at0008, 2]

 as ADL short hand for

 cluster[@archetype_node_id='at0009']/items[@archetype_node_id='at0008', 
 @sibling_id='2'] 


 This is for next-gen openEHR obviously, so doesn't help Bert/Leo right 
 now.

 anyone have thoughts on that? Note that the position() predicate 
 should still work, which means it can't be in its short form as [, 
 2], or else the sibling_id needs a different short syntax.

 Other note: sibling_id order will be the same regardless of 
 re-ordering whereas the value of position() is whatever the physical 
 position is.

 - thomas




Paths in archetyped data

2013-11-22 Thread Bert Verhees
On 11/22/2013 10:44 AM, Thomas Beale wrote:
 as ADL short hand for

 cluster[@archetype_node_id='at0009']/items[@archetype_node_id='at0008', 
 @sibling_id='2'] 


I am not sure about this, sibling_id is the array-index, when I 
understand. What happens in case a dataset changes, for example an item 
is removed from a cluster, in that case all the other datasets should 
need revisiting to have this property changed.

For my idea, the array-index is volatile and calculated at the moment of 
need.

Bert



Paths in archetyped data

2013-11-22 Thread Diego Boscá
Or attribute is unordered
El 22/11/2013 11:19, Bert Verhees bert.verhees at rosa.nl escribi?:

 On 11/22/2013 10:44 AM, Thomas Beale wrote:

 as ADL short hand for

 cluster[@archetype_node_id='at0009']/items[@archetype_node_id='at0008',
 @sibling_id='2']



 I am not sure about this, sibling_id is the array-index, when I
 understand. What happens in case a dataset changes, for example an item is
 removed from a cluster, in that case all the other datasets should need
 revisiting to have this property changed.

 For my idea, the array-index is volatile and calculated at the moment of
 need.

 Bert

 ___
 openEHR-technical mailing list
 openEHR-technical at lists.openehr.org
 http://lists.openehr.org/mailman/listinfo/openehr-
 technical_lists.openehr.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20131122/732d929d/attachment.html


Paths in archetyped data

2013-11-22 Thread Thomas Beale
On 22/11/2013 10:18, Bert Verhees wrote:
 On 11/22/2013 10:44 AM, Thomas Beale wrote:
 as ADL short hand for

 cluster[@archetype_node_id='at0009']/items[@archetype_node_id='at0008', 
 @sibling_id='2'] 


 I am not sure about this, sibling_id is the array-index, when I 
 understand. What happens in case a dataset changes, for example an 
 item is removed from a cluster, in that case all the other datasets 
 should need revisiting to have this property changed.

 For my idea, the array-index is volatile and calculated at the moment 
 of need.

the intention is that it would only ever be calculated once, at creation 
time. So it would be immutable in fact. That's the current design idea - 
this isn't documented anywhere properly, and others may have better 
ideas, so feel free to suggest them.

- thomas