Re: xsl:fo - keeps and breaks problem..
some nodes have nested foo's inside them...
Have you tried putting in your one template rule the following test:
<xsl:if test="not(parent::foo)"> <xsl:attribute name="keep-together">always</xsl:attribute> </xsl:if>
The above will only put the keep-together= on the "top level" foo elements, and will give an error if any one of them exceeds a page. Remember to not put this attribute on the literal result element within which you have the test, or if it is a child it will end up using that copy of the attribute node.
I wonder if you could probably get fancy and do the following:
<xsl:attribute name="keep-together"> <xsl:value-of select="count(ancestor-or-self::foo)"/> </xsl:attribute>
This will make your top level foo's keep together with a strength of 1, then if one doesn't fit on a page it flows normally on the page but its children retain their strength of 2 and they, in turn, stay together on a page unless one of them should be too long and not be able to fit, after which their children will have a strength of 3 to keep together.
I hope this helps.
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-10-1 Practical Formatting Using XSL-FO Next public training: 2002-09-13,18,19,30,10-03,12-08, - 2003-03-04,07
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format