| 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: |
| 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.
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.
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.