On 30/08/2013 14:23, pablo pazos wrote: > Hi all, > > Maybe this is OT but is related. I remembered a problem I had some > time ago working with algorithms that traverses the archetype structure. > > For CObjects without nodeID, the path of the CObject is equal to the > path of it's parent CAttribute, so when I want to get the node with > that path using Archetype.node(path), only one of those nodes will be > returned.
the usual thing to do here is to provide two (well actually 4, including the 'has' ones) functions: c_attribute_at_path (a_path: String): C_ATTRIBUTE pre-condition has_attribute_path (a_path) c_object_at_path (a_path: String): C_OBJECT pre-condition has_object_path (a_path) in the ADL workbench, we actually pre-compute this in the parse phase, but that isn't necessary of course. - thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20130830/ad1d82f6/attachment.html>