ClassName

atg.droplet.xml.NodeForEach

Component

/atg/dynamo/droplet/xml/NodeForEach

The NodeForEach servlet bean selects a set of Data Object Model nodes using a pattern and renders its output parameters for each of the nodes. The NodeForEach servlet bean is based on the ForEach servlet bean and inherits its output and open parameter definitions from ForEach.

Input Parameters

node
Specifies the DOM node to be passed to this servlet bean.

select
Optional. Sets the pattern that is used to select the nodes to be iterated over. The pattern language conforms to the pattern definition provided by the XPath specification at
http://www.w3.org/TR/xpath. If no pattern is provided, then NodeForEach selects all the children of this node.

Output Parameters

index
This parameter is set to the zero-based index of the current element of the set of nodes each time that the output parameter is rendered. The value of index for the first iteration is 0.

count
This parameter is set to the one-based index of the current element of the set of nodes each time that the output parameter is rendered. The value of count for the first iteration is 1.

element
This parameter is set to the current element of the set of nodes each time that the index increments and the output parameter is rendered.

Open Parameters

output
This parameter is rendered once for each element in the set of nodes.

outputStart
If any nodes are selected, this parameter is rendered before any output elements. It can be used to render the heading of a table, for instance.

outputEnd
If any nodes are selected, this parameter is rendered after all output elements. It can be used to render text following a table, for instance.

empty
This optional parameter is rendered if no nodes are selected.

Example

See Processing XML in a JSP.

 
loading table of contents...