DIGIFORMS
Digiforms Designer Documentation
 
 
 
 
 
 
Help by samples
 
 
 
Capture or output data in a defined layout
 
Extensible Markup Language
xsl:if
Conditional section
Use
Output content based on conditional tests on XML data.
Any content added within the <xsl:if> object will be output ONLY when the test expression evaluates to true()
Test expression
The xpath expression to be avaluated
A valid xpath expression addressing xml data and variables that evaluates to boolean. Examples: xsl:if test="true()" xsl:if test="number(@amount) < 100"
Adding test conditon on existing object(s)
You can enclose almost any design-time object within the <xsl:if> element.
Right-click the object(s) to add test condition for, and select [ if ] from the popup-menu.
To remove condition, right-click <xsl:if> element and uncheck the [ if ] menu item.
XSLT code
Using the <xsl:if> element in textbox conent.
Within textbox conent, xsl:if can be used to perform logical tests in combination with xslt, svg, html or xsl:fo markup.
<xsl:for-each select="item"> <xsl:if test="position() > 1">,</xsl:if> <xsl:value-of select="@number"></xsl:value> </xsl:for-each> Output: 34-233, 35-872
xslt
The above example iterates <item> elements and outputs their @number attribute, delimited by ( , ) The xsl:if test in this case ensures that a delimiter is not added after the last item.