xsl-list
[Top] [All Lists]

[xsl] Fo:table keeps-with-next

2007-09-07 04:58:30
I am trying to implement a keeps-with-next setting in a fo:table-row but have 
been unsuccessful in getting it to work. The CHAPTER heading should never be at 
the bottom of a page and that is what I am getting.

I'm using XMLSpy 2007 to write the xsl code and using Arbortext 5.2 M020 
release to transform the data.

Any help you could give me would be greatly appreciated.

Here is a sample of the code:

<fo:table-body>
<xsl:for-each select="//item[generate-id(.) = 
generate-id(key('chapters1',substring(mpcnum,1,2))[1])]">
<xsl:sort select="mpcnum"/>
<xsl:variable name="chapter" select="substring(mpcnum,1,2)"/>
<fo:table-row keep-with-next="5">
<fo:table-cell>
<fo:block/>
</fo:table-cell>
<fo:table-cell padding-left="20mm" padding-before="2mm" padding-after="2mm" 
number-columns-spanned="2">
<fo:block font="Arial" font-weight="bold" font-size="10pt">CHAPTER 
<xsl:value-of select="$chapter"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:for-each select="//item[substring(mpcnum,1,2) = $chapter]">
<xsl:sort select="mpcnum"/>
<xsl:if test="./mpcnum[not(.=preceding::mpcnum)]">
<fo:table-row font="Arial" font-size="10pt" text-transform="uppercase">
<xsl:choose>
<xsl:when test="@chg='n'">
<fo:table-cell border-right-style="solid" border-color="black" 
border-width="6pt">
<fo:block/>
</fo:table-cell>
<fo:table-cell padding-left="4mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./mpcnum"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./revdate"/>
</fo:block>
</fo:table-cell>
</xsl:when>
<xsl:when test="@chg='r'">
<fo:table-cell border-right-style="solid" border-color="black" 
border-width="6pt">
<fo:block/>
</fo:table-cell>
<fo:table-cell padding-left="4mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./mpcnum"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./revdate"/>
</fo:block>
</fo:table-cell>
</xsl:when>
<xsl:when test="@chg='d'">
<fo:table-cell border-right-style="solid" border-color="black" 
border-width="6pt">
<fo:block/>
</fo:table-cell>
<fo:table-cell padding-left="4mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./mpcnum"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-before="2mm" padding-after="2mm">
<fo:block font-style="italic" text-align="left">
<xsl:text>DELETE</xsl:text>
</fo:block>
</fo:table-cell>
</xsl:when>
<xsl:otherwise>
<fo:table-cell border-right-style="none">
<fo:block/>
</fo:table-cell>
<fo:table-cell padding-left="4mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./mpcnum"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-before="2mm" padding-after="2mm">
<fo:block text-align="left">
<xsl:value-of select="./revdate"/>
</fo:block>
</fo:table-cell>
</xsl:otherwise>
</xsl:choose>
</fo:table-row>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</fo:table-body>

Sarah R. Copley

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Fo:table keeps-with-next, Copley, Sarah <=