[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: Example of how to use fox:widow-content-limit and fox:orphan-content-limit
Seems simple enough. I copied fox:widow-content-limit into the DocBook calsTable template:
<xsl:template name="calsTable">
<xsl:variable name="keep.together">
<xsl:call-template name="pi.dbfo_keep-together"/>
</xsl:variable>
<xsl:for-each select="tgroup">
<fo:table fox:widow-content-limit="3 * 1.2em" xsl:use-attribute-sets="table.table.properties">
<xsl:if test="$keep.together != ''">
<xsl:attribute name="keep-together.within-column">
<xsl:value-of select="$keep.together"/>
</xsl:attribute>
</xsl:if>
<xsl:call-template name="table.frame"/>
<xsl:if test="following-sibling::tgroup">
<xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
<xsl:attribute name="border-bottom-style">none</xsl:attribute>
<xsl:attribute name="padding-bottom">0pt</xsl:attribute>
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
<xsl:attribute name="space-after">0pt</xsl:attribute>
<xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
<xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
</xsl:if>
<xsl:if test="preceding-sibling::tgroup">
<xsl:attribute name="border-top-width">0pt</xsl:attribute>
<xsl:attribute name="border-top-style">none</xsl:attribute>
<xsl:attribute name="padding-top">0pt</xsl:attribute>
<xsl:attribute name="margin-top">0pt</xsl:attribute>
<xsl:attribute name="space-before">0pt</xsl:attribute>
<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="."/>
</fo:table>
</xsl:for-each>
</xsl:template>
However, when I build now I get the following exception. Anyone know what I'm doing wrong?
Regards,
Jeff Powanda
SEVERE: Exception
java.lang.ClassCastException: org.apache.fop.layoutmgr.SpaceElement
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
---------
java.lang.ClassCastException: org.apache.fop.layoutmgr.SpaceElement
at org.apache.fop.layoutmgr.ElementListUtils.removeLegalBreaksFromEnd(ElementListUtils.java:152)
at org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:130)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.list.ListItemLayoutManager.getNextKnuthElements(ListItemLayoutManager.java:229)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:119)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:168)
at org.apache.fop.layoutmgr.table.TableContentLayoutManager.createElementsForRowGroup(TableContentLayoutManager.java:480)
at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:243)
at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:183)
at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:229)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:106)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:272)
at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:554)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:264)
at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301)
at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:157)
at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:385)
at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Thursday, October 25, 2007 12:28 AM
To: fop-users@xmlgraphics.apache.org
Cc: docbook-apps@lists.oasis-open.org
Subject: Re: Example of how to use fox:widow-content-limit and fox:orphan-content-limit
There are a few examples in our test suite:
Documentation:
http://xmlgraphics.apache.org/fop/0.94/extensions.html#widow-orphan-content-limit
Please note that normal widow/orphan processing is done using normal
XSL-FO properties. The two extension properties here are for special
cases in tables and lists only! If the documentation is not clear enough,
please tell us what we can do to improve it.
Jeremias Maerki
On 24.10.2007 20:18:26 Jeff Powanda wrote:
> Can someone tell me how to use fox:widow-content-limit and
> fox:orphan-content-limit? I'd like to control widows/orphans in DocBook
> tables, but I'm not sure how to use these FOP extensions in a DocBook
> template. I'm sending this to both the FOP and DocBook lists.
>
>
>
> Thanks,
>
> Jeff Powanda
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]