2.4.1.18 Section Control and Optional Section Control

A section control acts as a container for other controls. An optional section control has the same functionality as a regular section, but it can also be deleted or inserted by the user. A SECTION MUST have one of the symbols in the following table.

Symbol

Description

SIMPLE_SECTION_CALL

The first part of the section that indicates where the section control is rendered.

OPTIONAL_SECTION_CALL

The first part of the optional section that indicates where the optional section control is rendered. This part can be configured to not allow the user to delete or insert the optional section.

SIMPLE_SECTION_BODY

The second part of the section or optional section that defines the properties of the section and its content.

SIMPLE_SECTION_BODY_WITH_DIGITAL_SIGNATURE

The second part of the section that defines the properties of the section and its content. It also contains a digital signature component that enables the user to sign it.

SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING

The second part of the section or optional section that defines the properties of the section and its content. This part is used when the section is conditionally hidden.

SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING_AND_DIGITAL_SIGNATURE

The second part of the section or optional section that defines the properties of the section and its content. This part is used when the section is conditionally hidden. It also contains a digital signature component that enables the user to sign it.

A SECTION MUST consist of a SIMPLE_SECTION_CALL at the point in the XSL where the control appears, which is the body of the main template or another XSL template, and a SECTION_BODY that defines the section and appears as a separate XSL template. TEMPLATE_MODE_ID values in SIMPLE_SECTION_CALL and SECTION_BODY MUST match.

An OPTIONAL_SECTION MUST consist of an OPTIONAL_SECTION_CALL at the point in the XSL where the control appears, which is the body of the main template or another XSL template, and a SECTION_BODY that defines the section and appears as a separate XSL template. TEMPLATE_MODE_ID values in OPTIONAL_SECTION_CALL and SECTION_BODY MUST match.

SIMPLE_SECTION_CALL:

 CHECK_FOR_GETDOM_BEGIN1
 <xsl:apply-templates select="(GROUP_XPATH/)?RELATIVE_GROUP_XPATH" mode="TEMPLATE_MODE_ID1"/>
 CHECK_FOR_GETDOM_END1
  
 OPTIONAL_SECTION_CALL ::= SIMPLE_SECTION_CALL |
 (CHECK_FOR_GETDOM_BEGIN1
 <xsl:choose>
     <xsl:when test="OPTIONAL_SECTION_XPATH1">
         <xsl:apply-templates select="OPTIONAL_SECTION_XPATH1" mode="TEMPLATE_MODE_ID1"/>
     </xsl:when>
     <xsl:otherwise>
         <div class="optionalPlaceholder" xd:xmlToEdit="XML_TO_EDIT_NAME" tabIndex="TABINDEX" align="ALIGN" style="STYLE_WIDTH">ANY_STRING</div>
     </xsl:otherwise>
 </xsl:choose>
 CHECK_FOR_GETDOM_END1)

OPTIONAL_SECTION_XPATH: (GROUP_XPATH/)?RELATIVE_GROUP_XPATH

SECTION_STYLE: Semicolon-delimited list of (STYLE_SIZE?, STYLE_DIRECTION?, STYLE_BACKGROUND_COLOR?, STYLE_BORDER?, STYLE_MARGIN?, STYLE_PADDING?)

DIGITAL_SIGNATURE_STYLE: Semicolon-delimited list of (STYLE_MARGIN?, BEHAVIOR: url (#default#SignaturesInDocUI), STYLE_WIDTH?)

SECTION_BODY: SIMPLE_SECTION_BODY or SIMPLE_SECTION_BODY_WITH_DIGITAL_SIGNATURE or SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING or SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING_AND_DIGITAL_SIGNATURE.

SIMPLE_SECTION_BODY:

 <xsl:template match="RELATIVE_GROUP_XPATH" mode="TEMPLATE_MODE_ID1">
     <div class="xdSection xdRepeating" title="ANY_STRING" (style="SECTION_STYLE")? align="ALIGN" xd:xctname="Section" xd:CtrlId="CONTROL_ID" (tabIndex="-1")? (xd:postbackModel="POSTBACKMODEL")?>
         XML_HTML_4_1_WITH_CONTROLS
         (<xsl:attribute name="style">SECTION_STYLE(<xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>|
                 <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISPLAY_NONE</xsl:when>|
                 <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_BACKGROUND_COLOR</xsl:when>)+
             </xsl:choose>)?
             (<xsl:if test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISABLE_CHILD_XML_TO_EDIT</xsl:if>)*
         </xsl:attribute>)?
     </div>
 </xsl:template>

SIMPLE_SECTION_BODY_WITH_DIGITAL_SIGNATURE:

 <xsl:template match="RELATIVE_GROUP_XPATH" mode="TEMPLATE_MODE_ID1">
     <div class="xdSection xdRepeating" title="ANY_STRING" (style="SECTION_STYLE")? align="ALIGN" xd:xctname="Section" xd:CtrlId="CONTROL_ID" xd:SignedSectionName="ANY_STRING1" (tabIndex="-1")? (xd:postbackModel="POSTBACKMODEL")?>
         XML_HTML_4_1_WITH_CONTROLS
         (<xsl:attribute name="style">SECTION_STYLE(<xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>|
                 <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISPLAY_NONE</xsl:when>|
                 <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_BACKGROUND_COLOR</xsl:when>)+
             </xsl:choose>)?
             (<xsl:if test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISABLE_CHILD_XML_TO_EDIT</xsl:if>)*
         </xsl:attribute>)?
     </div>
     (SECTION_DIGITAL_SIGNATURE_BLOCK | SECTION_DIGITAL_SIGNATURE_BLOCK_NOT_SHOWING_SIGNATURES)
 </xsl:template>

SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING:

 <xsl:template match="RELATIVE_GROUP_XPATH" mode="TEMPLATE_MODE_ID1">
     <xsl:if test="BOOLEAN_XPATH_EXPRESSION">
         <div class="xdSection xdRepeating" title="ANY_STRING" (style="SECTION_STYLE")? align="ALIGN" xd:xctname="Section" xd:CtrlId="CONTROL_ID" (tabIndex="-1")? (xd:postbackModel="POSTBACKMODEL")?>
             XML_HTML_4_1_WITH_CONTROLS
             (<xsl:attribute name="style">SECTION_STYLE(<xsl:choose>
                     (<xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>|
                     <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISPLAY_NONE</xsl:when>|
                     <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_BACKGROUND_COLOR</xsl:when>)+
                 </xsl:choose>)?
                 (<xsl:if test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISABLE_CHILD_XML_TO_EDIT</xsl:if>)*
             </xsl:attribute>)?
         </div>
     </xsl:if>
 </xsl:template>

SIMPLE_SECTION_BODY_WITH_CONDITIONAL_HIDING_AND_DIGITAL_SIGNATURE:

 <xsl:template match="RELATIVE_GROUP_XPATH" mode="TEMPLATE_MODE_ID1">
     <xsl:if test="BOOLEAN_XPATH_EXPRESSION">
         <div class="xdSection xdRepeating" title="ANY_STRING" (style="SECTION_STYLE")? align="ALIGN" xd:xctname="Section" xd:CtrlId="CONTROL_ID" xd:SignedSectionName="ANY_STRING1" (tabIndex="-1")? (xd:postbackModel="POSTBACKMODEL")?>
             XML_HTML_4_1_WITH_CONTROLS
             (<xsl:attribute name="style">SECTION_STYLE(<xsl:choose>
                     (<xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>|
                     <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISPLAY_NONE</xsl:when>|
                     <xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_BACKGROUND_COLOR</xsl:when>)+
                 </xsl:choose>)?
                 (<xsl:if test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISABLE_CHILD_XML_TO_EDIT</xsl:if>)*
             </xsl:attribute>)?
         </div>
         (SECTION_DIGITAL_SIGNATURE_BLOCK | SECTION_DIGITAL_SIGNATURE_BLOCK_NOT_SHOWING_SIGNATURES)
     </xsl:if>
 </xsl:template>

SECTION_DIGITAL_SIGNATURE_BLOCK_VALID_SIGNATURE_BUTTON:

 <button title="" style="width: 100%; height: 100%; text-align: left; border: 0px solid; padding: 2px; background-color: window; cursor: hand;">
     <table style="color: windowtext;" class="defaultInDocUI">
         <tbody>
             <tr>
                 <xsl:choose>
                     <xsl:when test="function-available('xdImage:getImageUrl') and sig:Object/sig:SignatureProperties/sig:SignatureProperty/xdSignatureProperties:NonRepudiation/xdSignatureProperties:ValidSignedImage">
                         <td style="display: none;"><img src="res://infopath.exe/signaturevalid.gif"/></td>
                         <td><img src="{xdImage:getImageUrl(sig:Object/sig:SignatureProperties/sig:SignatureProperty/xdSignatureProperties:NonRepudiation/xdSignatureProperties:ValidSignedImage)}"/> </td>
                     </xsl:when>
                     <xsl:otherwise>
                         <td><img src="res://infopath.exe/signaturevalid.gif" width="12" height="12"/></td>
                         <td style="color: gray;">
                             <div><b><xsl:value-of select="xdXDocument:GetNamedNodeProperty(., 'SignedBy', '???')"/></b><span style="margin: 0pt 20pt">ANY_STRING</span></div>
                             <div><xsl:value-of select="xdXDocument:GetNamedNodeProperty(., 'SignedOn', '???')"/></div>
                         </td>
                     </xsl:otherwise>
                 </xsl:choose>
             </tr>
         </tbody>
     </table>
 </button>

SECTION_DIGITAL_SIGNATURE_BLOCK_INVALID_SIGNATURE_BUTTON:

 <button title="" style="width: 100%; height: 100%; text-align: left; border: 0px solid; padding: 2px; background-color: window; cursor: hand;">
     <table style="font: message-box; color: windowtext;">
         <tbody>
             <tr>
                 <xsl:choose>
                     <xsl:when test="function-available('xdImage:getImageUrl') and sig:Object/sig:SignatureProperties/sig:SignatureProperty/xdSignatureProperties:NonRepudiation/xdSignatureProperties:InvalidSignedImage">
                         <td style="display: none;"><img src="res://infopath.exe/signaturevalid.gif"/></td>
                         <td><img src="{xdImage:getImageUrl(sig:Object/sig:SignatureProperties/sig:SignatureProperty/xdSignatureProperties:NonRepudiation/xdSignatureProperties:InvalidSignedImage)}"/> </td>
                     </xsl:when>
                     <xsl:otherwise>
                         <td><img src="res://infopath.exe/signatureerror.gif" width="12" height="12"/></td>
                         <td style="color: red;"><b>ANY_STRING</b><span style="margin: 0pt 20pt">ANY_STRING</span></td>
                     </xsl:otherwise>
                 </xsl:choose>
             </tr>
         </tbody>
     </table>
 </button>

SECTION_DIGITAL_SIGNATURE_BLOCK:

 <div xd:disableEditing="yes" xd:SignatureBlock="ANY_STRING1" xd:SignedSectionDisplaySignatures="true" style="DIGITAL_SIGNATURE_STYLE">
     <xsl:if test="function-available('xdXDocument:GetNamedNodeProperty')">
         <xsl:if test="xdXDocument:GetNamedNodeProperty(DIGITAL_SIGNATURE_XPATH, 'CanAddSignature', 'false') = 'true'">
             <button title="" style="width: 100%; height: 100%; text-align: left; border: 0px solid; padding: 2px; background-color: window; cursor: hand;">
                 <table style="color: windowtext;" class="defaultInDocUI">
                     <tbody>
                         <tr>
                             <td><img src="res://infopath.exe/AddSignatureButton.gif" width="12" height="12"/></td>
                             <td>ANY_STRING</td>
                         </tr>
                     </tbody>
                 </table>
             </button>
         </xsl:if>
         <xsl:for-each select="DIGITAL_SIGNATURE_XPATH">
             <xsl:for-each select="sig:Signature">
                 <xsl:choose>
                     <xsl:when test="xdXDocument:GetNamedNodeProperty(., 'IsValidSignature', 'false') = 'true'">

SECTION_DIGITAL_SIGNATURE_BLOCK_VALID_SIGNATURE_BUTTON:

                     </xsl:when>
                     <xsl:otherwise>

SECTION_DIGITAL_SIGNATURE_BLOCK_INVALID_SIGNATURE_BUTTON:

                     </xsl:otherwise>
                 </xsl:choose>
             </xsl:for-each>
         </xsl:for-each>
     </xsl:if>
 </div>

SECTION_DIGITAL_SIGNATURE_BLOCK_NOT_SHOWING_SIGNATURES:

 <div xd:disableEditing="yes" xd:SignatureBlock="ANY_STRING1" style="DIGITAL_SIGNATURE_STYLE">
     <xsl:if test="function-available('xdXDocument:GetNamedNodeProperty')">
         <xsl:if test="xdXDocument:GetNamedNodeProperty(DIGITAL_SIGNATURE_XPATH, 'CanAddSignature', 'false') = 'true'">
             <button title="" style="width: 100%; height: 100%; text-align: left; border: 0px solid; padding: 2px; background-color: window; cursor: hand;">
                 <table style="color: windowtext;" class="defaultInDocUI">
                     <tbody>
                         <tr>
                             <td><img src="res://infopath.exe/AddSignatureButton.gif" width="12" height="12"/></td>
                             <td>ANY_STRING</td>
                         </tr>
                     </tbody>
                 </table>
             </button>
         </xsl:if>
     </xsl:if>
 </div>

Control-specific attributes used by the section control are as follows:

XSL function extensions used by the section control are as follows:

  • xdImage:getImageUrl (section 2.4.3.5)

  • xdXDocument:GetNamedNodeProperty (section 2.4.3.9.3)