Hi All, 
 
I was using fop version 2.05 and the issue that forced me to upgrade to 0.93 
was the "Keep-together" property. 
 
But having switched to 0.93, I am not only not free of the "keep-together" 
error, I am facing other problems: 
 
1. Images - The images appear bigger. I am new to XML/XSL:FO and I am striving 
to find how to solve the image issue. Needless to say, I am nowhere close to 
resolving it. 
2. I keep hitting the WARNING: The contents of row 1 are taller than they 
should be (there is a block-progression-dimension or height constraint on the 
indicated row). Due to its contents the row grows to 14400 millipoints, but the 
row shouldn't get any taller than MinOptMax[min=opt=max=14000] millipoints. 
(fo:table-row, location: 385/2553) error. I have no idea how to resolve this. 
3. Jul 16, 2007 10:46:14 AM 
org.apache.fop.layoutmgr.table.TableContentLayoutManager 
createElementsForRowGroup - Any idea what kind of solution this requires? 
4. The "Keep-together property" seems to work with admonitions, but again, not 
with images. Can anyone tell me if this HAS or HAS NOT been fixed with fop.093? 
This page break at the wrong places happens either if I use the customization 
layer I created or the docbook.xsl stylesheet that is part of Serna's 
distribution.
5. Another major issue is: When I use the default docbook.xsl which is part of 
Serna's stylesheet distribution, the Fop1.extension for PDF bookmarks works 
well. When I use the customization layer, the bookmarks do not appear. There is 
obviosuly something wrong with this customization layer. 
6. The graphics are still not appearing in both cases for admonitions.

I am using xsltproc for converting my XML to .FO and have begun using 
docbook-xsl version 1.72.0. I am also using .gif images for admonitions and 
specifying that in the parameter.

Need Help!

Style Sheet below:

<?xml version='1.0'?>
<xsl:stylesheet  
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    version="1.0"> 
<xsl:import 
href="/home/dganapathy/Files/stylesheets/docbook-xsl-1.68.1/fo/docbook.xsl"/>
 <xsl:include href="mytitlepage.xsl"/>
<!-- This is a DocBook PDF customization layer. This customization layer is 
created by Dishaa Ganapathy, Technical Writer, Tangible Value LLC. -->

<!-- All stringparam values. -->
<xsl:param name="admon.graphics" select="1"/>
<xsl:param name="body.font.master" select="12"/>
<xsl:param name="admon.graphics.extension" select="'.gif'"/>
<xsl:param name="admon.graphics.path" select="'/home/dganapathy/images/'"/>
<xsl:param name="footer.font.size" select="10"/>
<xsl:param name="fop1.extensions" select="1"/>
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="footers.on.blank.pages" select="0"/>
<xsl:param name="default.units" select="'pt'"></xsl:param>
<xsl:param name="draft.mode" select="'no'"></xsl:param>
<xsl:param name="draft.watermark.image" 
select="'/home/dganapathy/images/draft.gif'"></xsl:param>
<xsl:param name="table.frame.border.color" select="'#7CC2E9'"></xsl:param>
<xsl:param name="table.cell.border.color" select="'#7CC2E9'"></xsl:param>
<xsl:param name="show.comments">1</xsl:param>
<xsl:param name="header.image.filename" value="TanVal.gif"/>
<xsl:param name="header.column.widths">1 1 2</xsl:param>
<!-- End of all stringparam values. -->

<!-- Removes the blank couple of pages after titlepage caused by FOP bug -->
<xsl:template name="book.titlepage.separator">
</xsl:template>
<!-- End of blank page deletion. -->

<!-- Chapter title customization. -->
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">  
  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
            xsl:use-attribute-sets="chapter.titlepage.recto.style" 
            margin-left="{$title.margin.left}" 
            font-weight="bold"
        font-size="20pt" 
            text-align="left"
            font-family="{$title.font.family}">
    <xsl:call-template name="component.title">
      <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
    </xsl:call-template>
  </fo:block>
</xsl:template>
<!-- End of Chapter title customization. -->

<!-- Note customization. -->
<xsl:attribute-set name="admonition.title.properties">
  <xsl:attribute name="font-size">12pt</xsl:attribute>
  <xsl:attribute name="font-weight">bold</xsl:attribute>
  <xsl:attribute name="color">#005F9F</xsl:attribute>
  <xsl:attribute name="hyphenate">false</xsl:attribute>
  <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:attribute-set>
<!-- End of Note customization. -->

<xsl:template match="programlisting">
  <fo:block xsl:use-attribute-sets="normal.para.spacing"
    font-weight="bold"    
    color="#005F9F"    
    border-top-width="1.0"
    border-top-style="solid"
    border-top-color="black"
    border-bottom-width="1.0"
    border-bottom-style="solid"
    border-bottom-color="black"
    padding-start="3pt" padding-end="3pt"
    padding-before="3pt" padding-after="3pt">
   <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<!-- Section title customization. -->
    <xsl:attribute-set name="section.title.level1.properties">
    <xsl:attribute name="font-size">18pt</xsl:attribute>
    <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
    <xsl:attribute name="text-align">left</xsl:attribute>
    </xsl:attribute-set>

<xsl:attribute-set name="section.title.level2.properties">
  <xsl:attribute name="font-size">14pt</xsl:attribute>
  <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
  <xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
<!-- End of Section title customization. -->

<!-- Figure title customization. -->
<xsl:attribute-set name="figure.properties" 
     use-attribute-sets="formal.object.properties"/>
<xsl:attribute-set name="formal.title.properties">
  <xsl:attribute name="font-size">10pt</xsl:attribute> 
  <xsl:attribute name="font-family">Helvetica</xsl:attribute>
  <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
  <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
  <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
  <xsl:attribute name="text-align">center</xsl:attribute>
  <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
<!-- End of Figure title customization. -->

<!-- Header Content customization. -->
  <xsl:template name="header.content">  
  <xsl:param name="pageclass" select="''"/>
  <xsl:param name="sequence" select="''"/>
  <xsl:param name="position" select="''"/>
  <xsl:param name="gentext-key" select="''"/>

  <xsl:variable name="candidate">
    <!-- sequence can be odd, even, first, blank -->
    <!-- position can be left, center, right -->
    <xsl:choose>

          <xsl:when test="$sequence = 'odd' and $position = 'right'">
    <fo:block>
        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
      </fo:block>
        </xsl:when>

        <xsl:when test="$sequence = 'odd' and $position = 'center'">
        <xsl:call-template name="draft.text"/>
        </xsl:when>

           <xsl:when test="$sequence = 'odd' and $position = 'left'">
    <xsl:text>Tyco</xsl:text>
        </xsl:when>

        <xsl:when test="$sequence = 'even' and $position = 'right'">
    <fo:block>
        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
      </fo:block>
        </xsl:when>

        <xsl:when test="$sequence = 'even' and $position = 'center'">
        <xsl:call-template name="draft.text"/>
        </xsl:when>

           <xsl:when test="$sequence = 'even' and $position = 'left'">
    <xsl:text>Tyco</xsl:text>
        </xsl:when>

        <xsl:when test="$sequence = 'first' and $position = 'left'">
        <xsl:text>Tyco</xsl:text>
        </xsl:when>

        <xsl:when test="$sequence = 'first' and $position = 'right'">
        <fo:block>
        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
      </fo:block>
        </xsl:when>

        <xsl:when test="$sequence = 'first' and $position = 'center'"> 
        <xsl:value-of select="ancestor-or-self::book/bookinfo/corpauthor"/>
        </xsl:when>

        <xsl:when test="$sequence = 'blank' and $position = 'left'">
        <fo:page-number/>
        </xsl:when>

        <xsl:when test="$sequence = 'blank' and $position = 'center'">
        <xsl:text>This page intentionally left blank</xsl:text>
        </xsl:when>

        <xsl:when test="$sequence = 'blank' and $position = 'right'">
        </xsl:when>

        </xsl:choose>
        </xsl:variable>

    <!-- Does runtime parameter turn off blank page headers? -->
    <xsl:choose>
      <xsl:when test="$sequence='blank' and $headers.on.blank.pages=0">
        <!-- no output -->
      </xsl:when>
    <!-- titlepages have no headers -->
      <xsl:when test="$pageclass = 'titlepage'">  
        <!-- no output -->
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy-of select="$candidate"/>
      </xsl:otherwise>
    </xsl:choose>

</xsl:template>
<!-- End of Header Content customization. -->

<!-- Footer Content customization. -->
<xsl:template name="footer.content">  
  <xsl:param name="pageclass" select="''"/>
  <xsl:param name="sequence" select="''"/>
  <xsl:param name="position" select="''"/>
  <xsl:param name="gentext-key" select="''"/>

  <xsl:variable name="candidate2">
    <!-- sequence can be odd, even, first, blank -->
    <!-- position can be left, center, right -->
    <xsl:choose>

          <xsl:when test="$sequence = 'odd' and $position = 'center'">
        <xsl:text>Confidential</xsl:text>
    </xsl:when>

        <xsl:when test="$sequence = 'odd' and $position = 'center'">
        <xsl:call-template name="draft.text"/>
        </xsl:when>

        <xsl:when test="$sequence = 'odd' and $position = 'left'">
        <xsl:text>Tangible Value LLC</xsl:text>
        </xsl:when>

        <xsl:when test="$sequence = 'odd' and $position = 'right'">
        <fo:page-number/>
        </xsl:when>

         <xsl:when test="$sequence = 'even' and $position = 'left'">  
         <xsl:text>Report Pub Guide</xsl:text>
        </xsl:when>

    <xsl:when test="$sequence = 'even' and $position = 'center'">
    <xsl:text>Confidential</xsl:text>
        </xsl:when>

         <xsl:when test="$sequence = 'even' and $position = 'center'">
         <xsl:call-template name="draft.text"/>
         </xsl:when>

        <xsl:when test="$sequence = 'even' and $position = 'right'">
        <fo:page-number/>
        </xsl:when>

         <xsl:when test="$sequence = 'first' and $position = 'left'">
         <xsl:text>Tangible Value LLC</xsl:text>
         </xsl:when>

         <xsl:when test="$sequence = 'first' and $position = 'right'">
         <fo:page-number/> 
         </xsl:when>

         <xsl:when test="$sequence = 'first' and $position = 'center'">
         <xsl:text>Confidential</xsl:text> 
         </xsl:when>

         <xsl:when test="$sequence = 'blank' and $position = 'left'">
         <fo:page-number/>
         </xsl:when>

        <xsl:when test="$sequence = 'blank' and $position = 'center'">
        <xsl:text>This page intentionally left blank</xsl:text>
        </xsl:when>

      <xsl:when test="$sequence = 'blank' and $position = 'right'">
      </xsl:when>

    </xsl:choose>
  </xsl:variable>

   <!-- Does runtime parameter turn off blank page footers? -->
    <xsl:choose>
      <xsl:when test="$sequence='blank' and $footers.on.blank.pages=0">
        <!-- no output -->
      </xsl:when>
    <!-- titlepages have no footers -->
      <xsl:when test="$pageclass = 'titlepage'">  
        <!-- no output -->
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy-of select="$candidate2"/>
      </xsl:otherwise>
    </xsl:choose>
</xsl:template>
<!-- End of Footer Content customization. -->

<!-- Header Rule customization. -->

<xsl:template name="head.sep.rule">
  <xsl:if test="$header.rule != 0">
    <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
    <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
    <xsl:attribute name="border-bottom-color">#7CC2E9</xsl:attribute>
  </xsl:if>
</xsl:template>
<!-- End of Header Rule customization. -->

<!-- Footer Rule customization. -->
<xsl:template name="foot.sep.rule">
  <xsl:if test="$footer.rule != 0">
    <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
    <xsl:attribute name="border-top-style">solid</xsl:attribute>
    <xsl:attribute name="border-top-color">#7CC2E9</xsl:attribute>
  </xsl:if>
</xsl:template>
<!-- End of Footer Rule customization. -->

<xsl:attribute-set name="footnote.sep.leader.properties">
  <xsl:attribute name="color">#7CC2E9</xsl:attribute>
  <xsl:attribute name="leader-pattern">rule</xsl:attribute>
  <xsl:attribute name="leader-length">1in</xsl:attribute>
 <xsl:attribute name="padding-before">3pt</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="formal.object.properties">
  <xsl:attribute name="space-before.minimum">0</xsl:attribute>
  <xsl:attribute name="space-before.optimum">0</xsl:attribute>
  <xsl:attribute name="space-before.maximum">0</xsl:attribute>
  <xsl:attribute name="space-after.minimum">0</xsl:attribute>
  <xsl:attribute name="space-after.optimum">0</xsl:attribute>
  <xsl:attribute name="space-after.maximum">0</xsl:attribute>
  <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="informalfigure.properties" 
     use-attribute-sets="informal.object.properties"/>

<xsl:attribute-set name="informal.object.properties">
  <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
  <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
  <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
  <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
  <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
  <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="formal.object.properties">
   <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>

</xsl:stylesheet>

Thanks,
Dishaa
Princeton, NJ

       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Reply via email to