Doug Tidwell from IBMs developer works had a very in depth (and very good) session about FOP at apacheCon (the developerworks toot-o-matic uses it).
He said he couldn't get keep-with-next to work (something about blind tables I think). Anyhow he said developerworks would be publishing a very in depth tutorial on FOP in december so keep you eyes open on http://www-106.ibm.com/developerworks/. I can send you the pdf of his presentation if you want (all 228 pages)....anybody know what the copyright issues are (can't find anything on the disk)? Caleb Racey Webteam University Computer Service University of Newcastle tel 0191 222 5916 > -----Original Message----- > From: Eddy De Clercq [mailto:[EMAIL PROTECTED]] > Sent: 11 December 2002 11:25 > To: [EMAIL PROTECTED] > Subject: orphans and widows within XSL-FO and Cocoon > > Hi, > > I have 2 questions: > 1. I'm testing Cocoon for creating PDF with XSL-FO in order to investigate > the orphan and widow control and till now I can't manage to achieve this. > I'm using http://www.w3.org/TR/1998/WD-xsl-19980818 as a reference and > I've just adapted the existing simple-page2fo.xsl (see below). I've tried > both keep-with-next and widows and orphans, but none of these seem to > work. > I'm fairly new to XSL-FO so it could be that I'm doing something wrong. > Can you help me out pls? > 2. I've also tried http://www.antennahouse.com/XSLsample/fo/sample- > keepwith-next_1.fo (which is linked from > http://xml.apache.org/cocoon/link/xsl.html) and this seems not to work > either. Which versions of XSL-FO can Cocoon handle and where is a good > reference for it. > > Thanks in advance > > Eddy De Clercq > > <?xml version="1.0"?> > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > > <xsl:template match="/"> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> > > <fo:layout-master-set> > <fo:simple-page-master master-name="page" > page-height="297mm" > page-width="210mm" > margin-top="10mm" > margin-bottom="20mm" > margin-left="25mm" > margin-right="25mm"> > <fo:region-before extent="30mm"/> > <fo:region-body margin-top="30mm"/> > <fo:region-after extent="15mm"/> > </fo:simple-page-master> > > <fo:page-sequence-master master-name="all"> > <fo:repeatable-page-master-alternatives> > <fo:conditional-page-master-reference master-name="page" page- > position="first"/> > </fo:repeatable-page-master-alternatives> > </fo:page-sequence-master> > </fo:layout-master-set> > > <fo:page-sequence master-name="all"> > <fo:static-content flow-name="xsl-region-after"> > <fo:block text-align="center" > font-size="10pt" > font-family="serif" > line-height="14pt">page <fo:page-number/></fo:block> > </fo:static-content> > > <fo:flow flow-name="xsl-region-body"> > <xsl:apply-templates/> > </fo:flow> > </fo:page-sequence> > </fo:root> > </xsl:template> > > <xsl:template match="title"> > <fo:block font-size="36pt" space-before.optimum="24pt" text- > align="center"><xsl:apply-templates/></fo:block> > </xsl:template> > <xsl:template keep-with-next="true" match="paratitle"> > <fo:block font-size="16pt" space-before.optimum="12pt" text- > align="left"><xsl:apply-templates/></fo:block> > </xsl:template> > <xsl:template match="para"> > <fo:block font-size="12pt" space-before.optimum="12pt" text- > align="left"><xsl:apply-templates/></fo:block> > </xsl:template> > </xsl:stylesheet> > > ------extPart_000_003E_01C2A110.4811A5E0 > Content-Type: text/html; > charsetso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> > <META content="MSHTML 6.00.2800.1126" name=GENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=#ffffff> > <DIV><FONT face=Arial size=2>Hi,</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>I have 2 questions:</FONT></DIV> > <DIV><FONT face=Arial size=2>1. I'm testing Cocoon for creating PDF with > XSL-FO > in order to investigate the orphan and widow control and till now I can't > manage > to achieve this.</FONT></DIV> > <DIV><FONT face=Arial size=2>I'm using <A > href="http://www.w3.org/TR/1998/WD-xsl- > 19980818">http://www.w3.org/TR/1998/WD-xsl-19980818</A> as > a reference and I've just adapted the existing simple-page2fo.xsl (see > below). > I've tried both keep-with-next and widows and orphans, but none of these > seem to > work.</FONT></DIV> > <DIV><FONT face=Arial size=2>I'm fairly new to XSL-FO so it could be that > I'm > doing something wrong. Can you help me out pls?</FONT></DIV> > <DIV><FONT face=Arial size=2>2. I've also tried <A > href="http://www.antennahouse.com/XSLsample/fo/sample-keepwith- > next_1.fo">http://www.antennahouse.com/XSLsample/fo/sample-keepwith- > next_1.fo</A> (which > is linked from <A > href="http://xml.apache.org/cocoon/link/xsl.html">http://xml.apache.org/ co > coon/link/xsl.html</A>) > and this seems not to work either. Which versions of XSL-FO can Cocoon > handle > and where is a good reference for it.</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Thanks in advance</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Eddy De Clercq</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2><?xml version="1.0"?></FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2><xsl:stylesheet version="1.0"<BR> > xmlns:xsl="<A > href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/T ra > nsform</A>"<BR> > xmlns:fo="<A > href="http://www.w3.org/1999/XSL/Format">http://www.w3.org/1999/XSL/Form at > </A>"></FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2> <xsl:template > match="/"><BR> <fo:root xmlns:fo="<A > href="http://www.w3.org/1999/XSL/Format">http://www.w3.org/1999/XSL/Form at > </A>"><BR> > <BR> <fo:layout-master- > set><BR> > <fo:simple-page-master > master- > name="page"<BR> &nb sp > ; > page-height="297mm" > <BR> &n bs > p; > page- > width="210mm"<BR> & nb > sp; > margin-top="10mm" > <BR> &n bs > p; > margin-bottom="20mm" > <BR> &n bs > p; > margin-left="25mm" > <BR> &n bs > p; > margin-right="25mm"><BR> > <fo:region-before > extent="30mm"/><BR> > <fo:region-body > margin-top="30mm"/><BR> > <fo:region-after extent="15mm"/><BR> > </fo:simple-page-master></FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2> > <fo:page-sequence-master > master-name="all"><BR> > <fo:repeatable-page-master-alternatives><BR> > <fo:conditional-page-master-reference master-name="page" > page-position="first"/><BR> > </fo:repeatable-page-master- > alternatives><BR> > </fo:page-sequence-master><BR> > </fo:layout-master-set></FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2> <fo:page-sequence > master-name="all"><BR> <fo:static- > content > flow-name="xsl-region-after"><BR> <fo:block text-align="center" > <BR> > font-size="10pt" <BR> font-family="serif" > <BR> line-height="14pt">page > <fo:page-number/></fo:block><BR> &nbs p; > </fo:static-content> </FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2> <fo:flow > flow-name="xsl-region- > body"><BR> > <xsl:apply-templates/><BR> > </fo:flow><BR> </fo:page- > sequence><BR> > </fo:root><BR> </xsl:template></FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2> <xsl:template > match="title"><BR> <fo:block font-size="36pt" > space-before.optimum="24pt" > text-align="center"><xsl:apply- > templates/></fo:block><BR> > </xsl:template><BR> <xsl:template keep-with-next="true" > match="paratitle"><BR> <fo:block font-size="16pt" > space-before.optimum="12pt" > text-align="left"><xsl:apply- > templates/></fo:block><BR> > </xsl:template><BR> <xsl:template > match="para"><BR> <fo:block font-size="12pt" > space-before.optimum="12pt" > text-align="left"><xsl:apply- > templates/></fo:block><BR> > </xsl:template><BR></xsl:stylesheet><BR></FONT></DIV></BODY> </ > HTML> > > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>