If an element in a TSD3 schema can be reached on many paths there are 3 potential reasons:
1. explicit recursion via ref’s to global element(s)
2. highly-connected schema with many ref’s to global elements which themselves have again refs to global elements etc.
3. implicit references to global elements due to usage of wildcards (xs:any) with appropriate value of the namespace attribute. This leads to scenarios comparable to 1. and 2.
If no tsd:which is given, the behaviour depends on whether a recursion is being detected:
if a possible path to a given element contains the same element twice, this indicates a recursion and no index will be created.
In your example, this means that there will be
an index for
/elementA/elementB/elementC
but not for
/elementA/elementB/elementC/elementB/elementC.
Otherwise, an index will be created. That means there will be three indexes, one for each path out of
/elementA/elementB/elementC/
/elementA/elementD/elementC/
/elementE/elementC
However, in a highly-connected schema (scenario 2.) Tamino builtin limitations may be reached, because there is a separate index for each possible path.
The reason for the different treatment is: a recursion always leads to an infinite set of possible paths, whereas multiple ref’s without recursion lead to a finite set.
Execution time for a query like “//elementC” is independent of this, as it can be evaluated efficiently, if a full structure index is available. However, standard indexes might be used in a query like “//elementC[.=‘string’]”.
#webMethods#Tamino#API-Management