Unique Constraint on Tamino Document

I have a document with a series of elements. One of the element is employee-number and I need Tamino to enforce the uniqueness of this element. Is there a way for Tamino to enforce unique constraint at the document level such that Tamino will return an error if two inserts result in duplicate employee-number.

Hello Min Chai,

at the moment I don’t think it is possible to enforce that the employee-number element be unique.
Please see this topic: Unique attribute values

At the moment, unique-ness is provided on the ino:docname attribute. Perhaps you could code a solution in which the value of employee-number is copied into ino:docname before inserting the document? If there is already a document with that ino:docname/employee-number, you will get an error from the Tamino Server on insert.

I hope that helps,