X-Application

Reference Information for the <count> Tag

Parameter Required Values
target false specifies a defined context for returning the number of occurrences;
needs not to be the enclosing context, but it has to be defined earlier

Note:
For further information concerning the target parameter, see the Tamino X-Application user documentation, section Tips and Tricks.

query false specifies an X-Query expression for direct counting without any context
if query is set to "USEBODY" then the body of the count tag is used as query input

If no parameter is set, the count tag uses the current iteration context (for example browse or loop). It is not allowed to use the target and the query parameter simultaneously.

Explanation

Counts the the number of occurrences either in the current iteration context or a specified predefined context. It is also possible to count the result set of a direct query.

Example <count> Definition

Using the current iterating context in a "browse" of "loop" page:
<bdm:count/>

Using a previous set context:
<bdm:count target="previousDefinedContext" />

Using a query: 
<bdm:count query="/Doctype/Root/ElementX[/Doctype/Root/ElementX='aCertainResult']" />

Using a dynamic query: 
<bdm:count query="USEBODY">/Doctype/Root/ElementX[/Doctype/Root/ElementX='aCertainResult']</bdm:count>

Tip:
It is also possible to use a display tag in a context of a count tag.

Note:
For further information, please refer to the Simple Sample within Tamino X-Application.

Top of page