setAttr

Sets an existing or new attribute value for a node

The value of the attribute is supplied as the content of the setAttr tag and can be scripted with other DPTK tags.


Tag Summary
 
required <setAttr node="value" name="value" />
 
full tag <setAttr node="value" name="value" />

Required Attributes
 
node A query expression specifying a single node in the model.
name The name of the attribute whose value is to be set

There are no optional attributes
 

Example
 
<setAttr
        node="bean"
        name="className" >%lt;attr node="bean" name="name" format="u1"/>Impl</setAttr>

This setAttr tag will set the "className" attribute using its content as the value of the classname attribute. In this case, the content is the result of running the attr tag (which writes out the name of the bean with the first letter capitalized) and appending the string constant "Impl". If the value of the name attribute if "policy" the the classNamr attribute will be set to "PolicyImpl".


© Copyright IBM Corporation 2000, 2006. All Rights Reserved.