All,
I’m working with Tamino 4.4 and I want to set a constrain using xs:key. I know that Tamino 4.4 schema supports xs:key, but I’m not sure if the feature is working.
I made the following simple schema with a constrain xs:key, the problem is that I can insert several times the Person document with the same ID, it supposes that the ID should be unique due to it was declared as the key elemet.
Also I would like to use keyRef for integrity but I want to solve this first issue.
Is something wrong in my shema? or is not xs:key constrain supported by Tamino?
Does Tamino 4.4 manage the ref integrity whit xs:key and xs:keyRef?
Here is the Schema code:
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:tsd = "http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<tsd:schemaInfo name = "test">
<tsd:collection name = "test"></tsd:collection>
<tsd:doctype name = "Person">
<tsd:logical>
<tsd:content>closed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = "Person">
<xs:complexType>
<xs:sequence>
<xs:element name = "ID" type = "xs:string"></xs:element>
<xs:element name = "Name" type = "xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name = "Person_key">
<xs:selector xpath = "Person"></xs:selector>
<xs:field xpath = "ID"></xs:field>
</xs:key>
</xs:element>
</xs:schema>
Thanks in advance,