D.4 <form:if-single-item>

The <form:if-single-item> element is used to conditionally insert data into the output document. The content of <form:if- single -item> is processed only if the specified item appears exactly once in the replacement data.

Attributes

name: Specifies the name of the replacement data item. If the named item appears exactly once in the replacement data, then the content of the <form:if-single-item> element is processed.

Example

<form:if-single-item name="responder-dn">
  <input TYPE="hidden" name="responder-dn" value="$responder-dn$"/>
  $responder-dn$
</form:if-single-item>

This example inserts an HTML INPUT element and some replacement text into the output document if there is exactly one replacement data item named “responder-dn” in the replacement data.