[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
keep-with-next
From: Machtelt Garrels ####@####.#### Date: 28 May 2005 16:53:57 -0000 Message-Id: <Pine.LNX.4.44.0505281650390.25304-100000@cobra.xalasys.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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? Thansk for any hints, Tille. - -- My Penguin, my freedom. http://tille.xalasys.com Books: http://writers.fultus.com/garrels -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCmKHNsIIUbMXbBA8RAnWBAJ9sMUur3rQprjaYCwVaZcAqClhEMQCgsZkg DU38o/8MznY91xLggSbuA8s= =b1Yg -----END PGP SIGNATURE----- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: keep-with-next
From: David Horton ####@####.#### Date: 5 Jun 2005 12:11:33 -0000 Message-Id: <42A2EBF2.1080305@speakeasy.net> 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? > > Thansk for any hints, > > Tille. Tille, 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? Dave | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: keep-with-next
From: Machtelt Garrels ####@####.#### Date: 6 Jun 2005 12:38:20 -0000 Message-Id: <Pine.LNX.4.44.0506061231220.7814-100000@cobra.xalasys.com> -----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. - -- My Penguin, my freedom. http://tille.xalasys.com Books: http://writers.fultus.com/garrels -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCpEQnsIIUbMXbBA8RAv9dAKCc2CIkbEnFn9GcvOG6ITkg8yjeSACeImmv n/TdW3pbsm4PzHm3acRL+8c= =BCtX -----END PGP SIGNATURE----- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |