docbook: keep-with-next


Previous by date: 6 Jun 2005 14:02:12 -0000 Re: keep-with-next, Machtelt Garrels
Next by date: 6 Jun 2005 14:02:12 -0000 Mailing List Archives, Saqib Ali
Previous in thread: 6 Jun 2005 14:02:12 -0000 Re: keep-with-next, Machtelt Garrels
Next in thread:

Subject: Re: keep-with-next
From: "David Horton" ####@####.####
Date: 6 Jun 2005 14:02:12 -0000
Message-Id: <W6595921297167491118066504@webmail2>

> -----Original Message-----
> From: Machtelt Garrels ####@####.####
> Sent: Monday, June 6, 2005 12:40 PM
> To: ####@####.####
> Subject: Re: keep-with-next
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sun, 5 Jun 2005, David Horton wrote:
> 
> > Machtelt Garrels wrote:
> > >
> > > Hello David or anybody else who knows about this,
> > >
> > > A while ago I was told to use this for keeping together Q&A when printing:
> > >
> > >   <xsl:template match="instructions">
> > >     <fo:block keep-with-next="always">Instructions</fo:block>
> > >     <fo:block><xsl:apply-templates/></fo:block>
> > >
> > >   </xsl:template>
> > >
> > >
> > > I'm really not a hero in this.  Where do I configure this?  And can it
> > > also work for keeping together lists?
> 
> 
> > The example above is useful if you are writing your own XSL style sheet
> > or wanting to modify and existing one.  But maybe this is not what you
> > are trying to do.  Is your original document is in DocBook XML and are
> > you using the DocBook XSL stylesheets to transform it?  If so, what are
> > you transforming it into?  Also, what tool are you using to do the
> > transformation?
> 
> Hello Dave,
> 
> I am writing in DocBook XML, and using xsltproc to convert to FO, then I
> use fop to convert to PDF.  I was trying to modify the lists.xsl that
> comes with the DocBook XSL stylesheets, with no result.  I've modified the
> stylesheets now to allow hard pagebreaks, but that is not at all handy, of
> course.  I've changed from qandaset to orderedlists because it is more
> handy for the numbering (multiple answers per question).  This is a sample
> source:
> 
> <article>
> <orderedlist>
> 	<listitem><para>Question 1</para>
> 		<orderedlist>
> 			<listitem><para>answer 1</para></listitem>
> 			<listitem><para>answer 2</para></listitem>
> 			<listitem><para>answer 3</para></listitem>
> 			<listitem><para>answer 4</para></listitem>
> 		</orderedlist>
> 	</listitem>
> 
>         <listitem><para>Question 2</para>
>                 <orderedlist>
>                         <listitem><para>answer 1</para></listitem>
>                         <listitem><para>answer 2</para></listitem>
>                         <listitem><para>answer 3</para></listitem>
>                         <listitem><para>answer 4</para></listitem>
>                 </orderedlist>
>         </listitem>
> 
> 
> </orderedlist>
> 
> What I want to obtain is that the questions are kept together with their
> answers automatically.  So no page breaks after a question, no pagebreaks
> in the middle of an answerlist.
> 
> Thanks for your time,
> 
> Tille.
> 

In my experience FOP has not implemented all of the page break controls
used by XSL-FO stylesheets.  Watch for errors and warnings when FOP runs.
I think there will be several similar to "property 'break-before' not
implemented yet".  That means that the DocBook XSL stylesheet has asked
for no page break, but FOP can't deal with it.  Let me know if you see
the errors.

Dave




Previous by date: 6 Jun 2005 14:02:12 -0000 Re: keep-with-next, Machtelt Garrels
Next by date: 6 Jun 2005 14:02:12 -0000 Mailing List Archives, Saqib Ali
Previous in thread: 6 Jun 2005 14:02:12 -0000 Re: keep-with-next, Machtelt Garrels
Next in thread:


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.