3.4.1.6 Expression Box Control

The following XSL examples are expression box controls, as specified in section 2.3.1.6.

The following example is an expression box control that is displaying the value of my:field1.

 <span class="xdExpressionBox xdDataBindingUI" title="" xd:xctname="ExpressionBox" tabIndex="-1" xd:CtrlId="CTRL3" xd:disableEditing="yes" style="WIDTH: 145px">
     <xsl:value-of select="my:field1" /> 
 </span>

The following example is an expression box control with conditional formatting that is displaying the value of my:field1.xd:datafmt is equal to "&quot;datetime&quot;,&quot;dateFormat:Short Date;timeFormat:none;&quot;". This formats the value of my:field1 to be a short date.

 <span class="xdExpressionBox xdDataBindingUI xdBehavior_Formatting" title="texas" xd:binding="my:field1" xd:xctname="ExpressionBox" tabIndex="-1" xd:CtrlId="CTRL4" xd:disableEditing="yes" xd:datafmt="&quot;datetime&quot;,&quot;dateFormat:Short Date;timeFormat:none;&quot;" xd:num="">
     <xsl:attribute name="style">
         WIDTH: 145px; 
         <xsl:choose>
             <xsl:when test="my:field1 = &quot;1&quot;">DISPLAY: none</xsl:when> 
         </xsl:choose>
     </xsl:attribute>
     <xsl:attribute name="xd:num">
         <xsl:value-of select="my:field1" /> 
     </xsl:attribute>
     <xsl:choose>
         <xsl:when test="function-available('xdFormatting:formatString')">
             <xsl:value-of select="xdFormatting:formatString(my:field1,&quot;datetime&quot;,&quot;dateFormat:Short Date;timeFormat:none;&quot;)" /> 
         </xsl:when>
         <xsl:otherwise>
             <xsl:value-of select="my:field1" /> 
         </xsl:otherwise>
     </xsl:choose>
 </span>