nodeAttributes

Iterates over the attributes for a given node.

The nodeAttributes tag will construct a set of temporary model nodes, each representing one of the attributes for the specified node. These temporary nodes describe their corresponding attribute with a set of attributes including "name" (the name of the described attribute), "value" (the value of the attribute for the specified node) and "index" (the zero-based index of the attribute). For each one of these descriptive, temporary nodes, the nodeAttributes tag will associate the given variable name with the node and process the contents of the nodeAttributes tag. DPTK tags nested in the nodeAttributes tag can refer to the current temporary node using this variable name.


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

Required Attributes
 
node A query expression that resolves to a single node. The nodeAttributes tag will iterate over this node's attributes.
name The variable name to associate with each temporary node describing an attribute. Once the variable name is assigned to the temporary node, the nodeAttributes tag will process its contents once.

Optional Attributes
 
delimiter A string to write out after every iteration except the last.

Example
 
<nodeAttributes
        node="tag"
        name="current"
        delimiter=" , " >(<attr node="current" name="index" />) <attr node="current" name="name" /></nodeAttributes>

This nodeAttribtues tag will iterate over all of the attributes for the model node associated with the name "tag". If the model node has attributes named "name", "id", "required" and "deprecated" then the resulting output will look something like this:

(0) name , (1) id , (2) required , (3) deprecated


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