concatAtribute Element

This topic describes the <concatAttribute> XML element.

General syntax
<concatAttribute target="targetname" name="regexp" 
                 value="attributelist" separator="separatorstring" 
                 [maxLengt="maxlength" 
                 defaultValueForNotExistent="attributelist"] 
/>
DescriptionSets 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 defined, 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).
AttributesNameUseAnnotation
targetrequiredThe target on which the type of operation is executed.

Valid values are:

ValueDescription
attributeDefines to add an attribute.

namerequiredThe name of the target to set. The value can be either a string or any Regular Expression.
valuerequiredList of attribute names (each in single quotes (‘) to be concatenated.
separatorrequiredThe string to use to separate the entries of the value.
maxLengthoptionalThe 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.
defaultValueForNotExistentoptionalUsed if an attribute from the attribute list does not exist in the component. If not set 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="? 
/>