Hi there.
At the moment there is no “unique constraint” in Tamino.
There are two attributes that will be unique - one which is provided by Tamino, the other that you must supply.
When a document is inserted into Tamino, the document is assigned an ino:id. This value (a number) will be unique for a doctype.
However, this will be assigned for your document, not for each element.
When inserting a document into Tamino, you are able to specify a value for the ino:docname attribure. This attribute is also at the doctype level, and must be unique for the doctype. If you specify a non-unique value for ino:docname, Tamino raise an error.
If you have the possibility to modify the schema, perhaps you should remodel so that the “wrapper” node is removed, and then store documents into Tamino.
I never recommend people to build applications on the ino:id attribute without first fully understanding how it works. When you insert a document into Tamino, it is assigned an ino:id. If you insert the same document five times, then you will have five documents stored in Tamino - with five different ino:id’s.
This should already be enough information to see that the ino:id is not computed from the document’s content, just allocated from a pool.
If you un-load all the documents from Tamino, then re-load them later, they might get different ino:id’s than they previously had.
(Which would be fairly tragic if the ino:id were being used to reference other documents…)
However, if your requirement is just that there is a unique identifier, you could use ino:id.
If you need to compute some unique identifier, you should have a look at writing a “Server Extension” (SXS) to create the identifier at insert time.
I hope that helps,
Trevor.
#API-Management#webMethods#Tamino