Popups with Table Cells

Description

This override allows popups to be constructed using paragraphs from different table cells.

Problem

From Michael O'Neill via wwp-users:

Working Solution

You can try this recipe to change how ePublisher calculates dropdown content inclusion. The meat of the trick is that you effectively ignore the table structure when calculating dropdowns.

  1. Create an override for "Formats\Shared\common\behaviors\document.xsl".

  2. Search for the table template about line 350:
     <xsl:template match="wwdoc:TableCell" mode="wwmode:behavior">
  3. Eliminate the container for table cells, <wwbehaviors:TableCell>.

     <xsl:template match="wwdoc:TableCell" mode="wwmode:behavior">
      <xsl:param name="ParamTableCell" select="." />
      <xsl:param name="ParamWIFFile" />
      <xsl:param name="ParamTopLevel" />
    
      <wwbehaviors:TableCell>
       <xsl:apply-templates select="$ParamTableCell/wwdoc:*" mode="wwmode:behavior">
        <xsl:with-param name="ParamWIFFile" select="$ParamWIFFile" />
        <xsl:with-param name="ParamTopLevel" select="false()" />
       </xsl:apply-templates>
      </wwbehaviors:TableCell>
     </xsl:template>
  4. After the container for table cells has been removed, the template should look like this:
     <xsl:template match="wwdoc:TableCell" mode="wwmode:behavior">
      <xsl:param name="ParamTableCell" select="." />
      <xsl:param name="ParamWIFFile" />
      <xsl:param name="ParamTopLevel" />
    
      <xsl:apply-templates select="$ParamTableCell/wwdoc:*" mode="wwmode:behavior">
       <xsl:with-param name="ParamWIFFile" select="$ParamWIFFile" />
       <xsl:with-param name="ParamTopLevel" select="false()" />
      </xsl:apply-templates>
     </xsl:template>
  5. Convert away!

Now, ePublisher will allow popup content to span across table cells. Can be misused, but handy if that's really what you want.

Example Project

You can download a sample project, Popups.zip for use with 2009.3 or 2009.4. It includes sample output both for the standard popup behavior and the table cell popup behavior. This is controlled via two separate targets. The customization has been added at the target level. Sources in FrameMaker 7.2.

Original, Incorrect Solution with Feedback

You can try this recipe to change how ePublisher calculates dropdown content inclusion. The meat of the trick is that you effectively ignore the table structure when calculating dropdowns.

  1. Create an override for "Formats\Shared\common\behaviors\document.xsl".

  2. Search for the table template about line 112:
      <xsl:template match="wwdoc:Table" mode="wwmode:behavior">
  3. Near the bottom, you'll see a section where it emits table behavior information and then process child paragraphs (cells, etc.)
      <!-- Table -->
      <!--       -->
      <wwbehaviors:Table id="{$ParamTable/@id}">
       <xsl:if test="$ParamTopLevel">
        <xsl:attribute name="documentposition">
         <xsl:value-of select="position()" />
        </xsl:attribute>
        <xsl:attribute name="splitpriority">
         <xsl:value-of select="$VarSplitPriority" />
        </xsl:attribute>
       </xsl:if>
    
       <xsl:apply-templates select="$ParamTable/wwdoc:*" mode="wwmode:behavior">
        <xsl:with-param name="ParamWIFFile" select="$ParamWIFFile" />
        <xsl:with-param name="ParamTopLevel" select="false()" />
       </xsl:apply-templates>
      </wwbehaviors:Table>
  4. Move processing of child paragraphs (cells, etc.) outside of the table:
      <!-- Table -->
      <!--       -->
      <wwbehaviors:Table id="{$ParamTable/@id}">
       <xsl:if test="$ParamTopLevel">
        <xsl:attribute name="documentposition">
         <xsl:value-of select="position()" />
        </xsl:attribute>
        <xsl:attribute name="splitpriority">
         <xsl:value-of select="$VarSplitPriority" />
        </xsl:attribute>
       </xsl:if>
      </wwbehaviors:Table>
    
      <xsl:apply-templates select="$ParamTable/wwdoc:*" mode="wwmode:behavior">
       <xsl:with-param name="ParamWIFFile" select="$ParamWIFFile" />
       <xsl:with-param name="ParamTopLevel" select="false()" />
      </xsl:apply-templates>
  5. Convert away!

Now, ePublisher will allow popup content to span across table cells. Can be misused, but handy if that's really what you want.

---

Michael writes:

HelpCenter/Tips/Popups with Table Cells (last edited 2010-02-06 04:58:17 by BenAllums)