While typical decomposition processes decompose only XML element or attribute content, annotated XML schema decomposition supports the insertion of values that do not necessarily exist in the XML document.
The latter two values are possible through the db2-xdb:expression annotation. This annotation allows you to specify an expression, the result of which is inserted during decomposition.
The value from an XML document can be applied to an expression to generate a result, thereby transforming the data before it is inserted into the target column. An expression can also generate a value that is based on the mapped element or attribute (such as the element's name). db2-xdb:expression also allows constants to be specified, where the constant might or might not be related to the mapped value from the XML document.db2-xdb:expression enables you to combine any of these techniques to generate a value for insertion.
Note that the expression is invoked as many times as the element or attirubte with which it is associated, is encountered in the XML document.