cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "caleb racey" <Caleb.Ra...@newcastle.ac.uk>
Subject RE: orphans and widows within XSL-FO and Cocoon
Date Wed, 11 Dec 2002 11:35:17 GMT
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:Eddy.DeClercq@aiv.kuleuven.ac.be]
> Sent: 11 December 2002 11:25
> To: cocoon-users@xml.apache.org
> 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>&nbsp;</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>&nbsp;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.&nbsp;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>&nbsp;(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>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Thanks in advance</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Eddy De Clercq</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&lt;?xml version="1.0"?&gt;</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&lt;xsl:stylesheet
version="1.0"<BR>&nbsp;
> xmlns:xsl="<A
>
href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/T
ra
> nsform</A>"<BR>&nbsp;
> xmlns:fo="<A
>
href="http://www.w3.org/1999/XSL/Format">http://www.w3.org/1999/XSL/Form
at
> </A>"&gt;</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&nbsp; &lt;xsl:template
> match="/"&gt;<BR>&nbsp;&nbsp; &lt;fo:root xmlns:fo="<A
>
href="http://www.w3.org/1999/XSL/Format">http://www.w3.org/1999/XSL/Form
at
> </A>"&gt;<BR>&nbsp;&nbsp;
> <BR>&nbsp;&nbsp;&nbsp; &lt;fo:layout-master-
> set&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:simple-page-master
> master-
>
name="page"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp
> ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> page-height="297mm"
>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bs
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> page-
>
width="210mm"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nb
> sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> margin-top="10mm"
>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bs
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> margin-bottom="20mm"
>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bs
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> margin-left="25mm"
>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bs
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> margin-right="25mm"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:region-before
> extent="30mm"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:region-body
> margin-top="30mm"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:region-after extent="15mm"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:simple-page-master&gt;</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:page-sequence-master
> master-name="all"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;fo:repeatable-page-master-alternatives&gt;<BR>&nbsp;
> &lt;fo:conditional-page-master-reference master-name="page"
> page-position="first"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:repeatable-page-master-
> alternatives&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:page-sequence-master&gt;<BR>&nbsp;&nbsp;&nbsp;
> &lt;/fo:layout-master-set&gt;</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;fo:page-sequence
> master-name="all"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;fo:static-
> content
> flow-name="xsl-region-after"&gt;<BR>&nbsp;&lt;fo:block
text-align="center"
> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> font-size="10pt" <BR>&nbsp;&nbsp;&nbsp; font-family="serif"
> <BR>&nbsp;&nbsp;&nbsp; line-height="14pt"&gt;page
>
&lt;fo:page-number/&gt;&lt;/fo:block&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;
> &lt;/fo:static-content&gt; </FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;fo:flow
> flow-name="xsl-region-
> body"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;xsl:apply-templates/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> &lt;/fo:flow&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/fo:page-
> sequence&gt;<BR>&nbsp;&nbsp;
> &lt;/fo:root&gt;<BR>&nbsp; &lt;/xsl:template&gt;</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>&nbsp; &lt;xsl:template
> match="title"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;fo:block font-size="36pt"
> space-before.optimum="24pt"
> text-align="center"&gt;&lt;xsl:apply-
> templates/&gt;&lt;/fo:block&gt;<BR>&nbsp;
> &lt;/xsl:template&gt;<BR>&nbsp; &lt;xsl:template keep-with-next="true"
> match="paratitle"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;fo:block
font-size="16pt"
> space-before.optimum="12pt"
> text-align="left"&gt;&lt;xsl:apply-
> templates/&gt;&lt;/fo:block&gt;<BR>&nbsp;
> &lt;/xsl:template&gt;<BR>&nbsp; &lt;xsl:template
> match="para"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;fo:block font-size="12pt"
> space-before.optimum="12pt"
> text-align="left"&gt;&lt;xsl:apply-
> templates/&gt;&lt;/fo:block&gt;<BR>&nbsp;
>
&lt;/xsl:template&gt;<BR>&lt;/xsl:stylesheet&gt;<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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message