Summary
Copies attributes from one element to another. The command belongs to the group "Document".
Parameters
Parameter Name |
Description |
Type |
AttrNamesFrom |
The names of the attributes to be copied (comma-seperated list). |
valueexpression |
AttrNamesTo |
The names of the attributes in which to copy (comma-seperated list in the correct order). If ommited, the original/input-names are used |
valueexpression |
EleRefFrom |
The name of the reference to the element containing the attributes to be copied. |
elementReference |
EleRefTo |
The name of the reference to the element in which to copy the attributes. |
elementReference |
Valid parameter combinations
- EleRefFrom,EleRefTo
- EleRefFrom,AttrNamesFrom,EleRefTo
- EleRefFrom,AttrNamesFrom,EleRefTo,AttrNamesTo
Description
Copies one or more attributes from an element to an other. Use "AttrNamesFrom" to specifiy the source attribute names and "AttrNamesTo" to specifiy the destination attribute names. The destination attribute names are the same as the source attribute names, if you do not set "AttrNamesTo".
Examples
Example 1
The example below copies the attributes "factory" and "product" from "myManufacturer" to "myOtherManufacturer". The destination attributes are named the same as the source attributes.
<CopyAttrs EleRefFrom="$myManufacturer" AttrNamesFrom="factory,product" EleRefTo="$myOtherManufacturer"/>
Example 2
The second example copies the attributes "factory" and "product" to the attributes "facility" and "item" of the destination element.Important: the number of attributes at the source and destination has to be the same!
<CopyAttrs EleRefFrom="$myManufacturer" AttrNamesFrom="factory,product" EleRefTo="$myOtherManufacturer" AttrNamesTo="facility,item"/>