key constraint

Hello everybody!

I must use the key constraint in a schema. I’ve read that it’s not possible with the “classic” xs:key.

My question is: is there another possibility to do this? With a tsd: …?

Thanks!

Basile

Hi Basile

identity constraints as described by XML schema
- are not yet supported by Tamino (probably the next version, 4.4, will)
- have a scope of a single XML document

Tamino supports unique keys per document
- the scope is “all documents in a doctype” - each document
has its own unique key composed of the values of one or more
nodes given in the schema, which must have cardinality 1
- supported since Tamino 4.2

Hope that helps
Uli

Hi,

xs:key works only within a single document; hence it does not help a lot
for a collection of XML documents as managed by Tamino. Tamino has introduced
tsd:key etc. which allow the specification of uniqueness constraints over a collection of XML documents, and thus is much more powerful than xs:key

Regards

Harald

Hi,

just to clarify:

the extension introduced by Tamino is available via tsd:unique,
there is no tsd:key.

Cheers
Uli