concatAttribute Element

This topic describes the <concatAttribute> XML element.

General syntax
<concatAttribute target="targetname" name="regexp" 
                 value="attributelist" separator="separatorstring" 
                 [maxLengt="maxlength" 
                 defaultValueForNotExistent="attributelist"] 
/>
Description Specifies an attribute value created from values of the attributes in the attributeList separated by the given separator. Each attribute has to be surrounded by a single quote ('). If maximum length is efined, the value will be cropped to the maxLength. If an attribute from the list does not exist, the defaultValueForNotExistent will be used. If the defaultValueForNotExistent is not defined, the not found attribute will be ignored (also the separator will be not added).
Attributes Name Use Annotation
target required The target on which the type of operation is executed.

Valid values are:

Value Description
attribute Defines to add an attribute.

name required The name of the target to define. The value can be either a string or any Regular Expression.
value required List of attribute names (each in single quotes (‘) to be concatenated.
separator required The string to use to separate the entries of the value.
maxLength optional The maximum length of the value. If the concatenated (inclusive separators) is longer than the max value, it will be cut to maximum length. Value needs to be a non-negative integer.
defaultValueForNotExistent optional Used if an attribute from the attribute list does not exist in the component. If not defined, those attributes will be ignored (inclusive separator).
Examples
<!-- concatenates the attributes PART_NAME and VALUE separated by | to value of the DESCRIPTION 
     attribute. If the concatenated value has more than 20 it will be croped to 20 characters. If for 
     e.g. no VALUE attribute exists a ? will be used instead.             
     - PART_NAME=res, VALUE=100                     -> DESCRIPTION=res|100 
     - PART_NAME=myNewPart, <no value attribute>    -> DESCRIPTION=myNewPart|? --> 
<concatAttribute target="attribute" 
                 name="DESCRIPTION"
                 value="PART_NAMEVALUE" 
                 separator="|" 
                 maxLength="10" 
                 defaultValueForNotExistent="? 
/>