3.4.2.8 Linked Picture Control

The following XSL examples are for linked picture controls, as specified in section 2.3.2.8.

The following example is a linked picture control that allows the user to specify a URL and is bound to my:field1.

 <img hideFocus="1" class="xdLinkedPicture" alt="Click here to insert a picture" displaytext="" tabStop="true" xd:boundProp="src" xd:binding="my:field1" tabIndex="0" xd:xctname="LinkedImage" xd:CtrlId="CTRL1">
     <xsl:attribute name="src">
         <xsl:value-of select="my:field1"/>
     </xsl:attribute>
 </img>

The following example is a linked picture control that allows the user to specify a URL, stored in my:field1, as well as a description of the picture that is stored in my:field1/@my:field2.

 <img hideFocus="1" class="xdLinkedPicture" xd:boundPropSecondary="displaytext" xd:binding_secondary="my:field1/@my:field2" tabStop="true" xd:boundProp="src" xd:binding="my:field1" tabIndex="0" xd:xctname="LinkedImage" xd:CtrlId="CTRL2">
     <xsl:attribute name="src">
         <xsl:value-of select="my:field1"/>
     </xsl:attribute>
     <xsl:attribute name="displaytext">
         <xsl:value-of select="my:field1/@my:field2"/>
     </xsl:attribute>
     <xsl:attribute name="alt">
         <xsl:choose>
             <xsl:when test="string-length(my:field1) &gt; 0">
                 <xsl:value-of select="my:field1/@my:field2"/>
             </xsl:when>
             <xsl:otherwise>Click here to insert a picture</xsl:otherwise>
         </xsl:choose>
     </xsl:attribute>
 </img>

The following example is a linked picture control that allows the user to specify a URL, stored in my:field1, as well as a description of the picture that is stored in my:field1/@my:field2. Additionally, conditional formatting is set such that if the value of my:field1/@my:field2 is "2", the control is hidden.

 <img hideFocus="1" class="xdLinkedPicture" xd:boundPropSecondary="displaytext" xd:binding_secondary="my:field1/@my:field2" tabStop="true" xd:boundProp="src" xd:binding="my:field1" tabIndex="0" xd:xctname="LinkedImage" xd:CtrlId="CTRL2">
     <xsl:attribute name="style">
         <xsl:choose>
             <xsl:when test="my:field1/@my:field2 = &quot;2&quot;">DISPLAY: none; caption: Rule 1</xsl:when>
         </xsl:choose>
     </xsl:attribute>
     <xsl:attribute name="src">
         <xsl:value-of select="my:field1"/>
     </xsl:attribute>
     <xsl:attribute name="displaytext">
         <xsl:value-of select="my:field1/@my:field2"/>
     </xsl:attribute>
     <xsl:attribute name="alt">
         <xsl:choose>
             <xsl:when test="string-length(my:field1) &gt; 0">
                 <xsl:value-of select="my:field1/@my:field2"/>
             </xsl:when>
             <xsl:otherwise>Click here to insert a picture</xsl:otherwise>
         </xsl:choose>
     </xsl:attribute>
 </img>