3.4.2.7 List Controls (Bulleted List Control, Numbered List Control and Plain List Control)

The following XSL examples are for list controls, as specified in section 2.3.2.7.

The following example is a plain list control with no conditional formatting.

 <span style="WIDTH: 651px; MARGIN-BOTTOM: 1px; " class="xdRepeating" title="" xd:xctname="PlainList">
     <ol style="LIST-STYLE-TYPE: none; MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
         <xsl:for-each select="my:group1/my:field1">
             <li>
                 <span hideFocus="1" class="xdListItem" xd:xctname="ListItem_Plain" tabIndex="0" xd:binding="." xd:CtrlId="CTRL1" style="WIDTH: 100%">
                     <xsl:value-of select="."/>
                 </span>
             </li>
         </xsl:for-each>
     </ol>
 </span>

The following example is a bulleted list control with conditional formatting. The bulleted list control outputs a link with the text "Insert Item" that adds an additional list item to the list (1) after clicking this link. Conditional formatting is set such that if the value of my:field1 is "a", the control has a red background color.

 <span style="WIDTH: 651px; MARGIN-BOTTOM: 1px; " class="xdRepeating" title="" xd:xctname="bulletedlist">
     <ol style="LIST-STYLE-TYPE: square; MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
         <xsl:for-each select="my:group1/my:field1">
             <li>
                 <span hideFocus="1" class="xdListItem" xd:xctname="ListItem_Plain" tabIndex="0" xd:binding="." xd:CtrlId="CTRL1">
                     <xsl:attribute name="style">WIDTH: 100%;
                         <xsl:choose>
                             <xsl:when test=". = &quot;a&quot;">BACKGROUND-COLOR: #ff0000; caption: Rule 1</xsl:when>
                         </xsl:choose>
                     </xsl:attribute>
                     <xsl:value-of select="."/>
                 </span>
             </li>
         </xsl:for-each>
     </ol>
 </span>
 <div class="optionalPlaceholder" xd:xmlToEdit="field1_1" tabIndex="0" xd:action="xTextList::insert" style="MARGIN-LEFT: 40px; WIDTH: 651px">Insert item</div>

The following example is a numbered list control with lower case Roman numbering, a background color set to green, and conditional formatting. Conditional formatting is set such that if the value of my:field1 is "a", the control is disabled.

 <span style="BACKGROUND-COLOR: #00ff00; WIDTH: 651px; MARGIN-BOTTOM: 1px; " class="xdRepeating" title="" xd:xctname="numberedlist">
     <ol style="LIST-STYLE-TYPE: lower-roman; MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
         <xsl:for-each select="my:group2/my:field2">
             <li>
                 <span hideFocus="1" class="xdListItem" xd:xctname="ListItem_Plain" tabIndex="0" xd:binding="." xd:CtrlId="CTRL2">
                     <xsl:attribute name="style">WIDTH: 100%;
                         <xsl:choose>
                             <xsl:when test=". = &quot;a&quot;">caption: Rule 1</xsl:when>
                         </xsl:choose>
                     </xsl:attribute>
                     <xsl:choose>
                         <xsl:when test=". = &quot;a&quot;">
                             <xsl:attribute name="contentEditable">false</xsl:attribute>
                         </xsl:when>
                     </xsl:choose>
                     <xsl:value-of select="."/>
                 </span>
             </li>
         </xsl:for-each>
     </ol>
 </span>