How is the path to an ArchetypeInternalRef constructed so that it is
pssible that it points to some ohter point in an archetype, and at the
same time is identifiable as being an unique point in the archetype.
For example:
I have contacts in an archetype, and these have addresses, for
efficiency-reasons the addresses are defined only once in the archetype,
like this:
addresses cardinality matches {0..*; ordered} matches {
ADDRESS[at0006] matches { -- phone number
type matches {
CODED_TEXT matches {
code matches {[ac0006]} -- phone
number
}
}
details matches {
allow_archetype LIST matches {
include
id matches {"some.other.archetype.*"}
}
}
}
In this case the path to details is:
/contacts[at0005]/addresses[at0006]/details
Then I have this construct
addresses cardinality matches {0..*; ordered} matches {
use_node ADDRESS /contacts[at0005]/addresses[at0006]
The path of addresses will be in this case: /contacts[at0009]/addresses
I will, when I dig into this, also have a details-attribute, but what
will be the path then of it?
Two simple possibilities have disadvantages
- replace the first part of the path, like this:
/contacts[at0009]/addresses[at0006]/details
- do not replace the first part, which leaves the original path of the
item referred in tact.
The first seems to have disadvantage that the second part of the path is
not a followable path, because it makes a jump somewhere in the middle
and has no indication that it does.
The second solution as bad, because it makes Items to have a non-unique
path.
So I prefer the first solution, my question, are there any agreements on
this, i did not find them. If there are, please excuse me for not
looking at the right place.
-------------------
I also have a related questions, how to construct a path going into an
archetype-slot.
thanks,
Bert Verhees