probles with index

Hello,

I need some help with the different kind of indexes in Tamino 4.2.1.

for example although there is standard index at “@value” and “@id
and there are only a few instances the following query needs quite long.

for $q in input()/foo/featList/feat[@value=“NP”],
$a in input()/foo/structList/struct[@id=$q/@ref]

I tried to set a unique-key constraint on @id, but I was not successful.
The system is complaining that the elements/attributes pointed to must have a cardinality of 1 together with line number which has nothing to do with the constraint and the relevant attribute has cardinality of 1.

I think, instead of discussing the specific schema I use, a couple of examples for the different kind of indexes methods(Unique, multipath, Compound, reference…) might be very helpful.

If you have some nice tamino-schemas please post them to kuessner@ling.uni-potsdam.de or to this forum.

thank you for your help

uwe

Hello,

even if I do not have access to the schema, I assume that an element called structList will allow to have more than one child, which means that the path /foo/structList/struct/@id does not have the cardinality of 1 for each document that is valid according to the schema. This explains why you cannot define a tsd:unique constraint.

Regards

Harald