Re: [xsl] keep properties

Subject: Re: [xsl] keep properties
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Mon, 04 Feb 2002 12:50:37 +0100
"Carmelo Montanez" <carmelo@xxxxxxxx> wrote:
> I am writing a number of tests for the XSL FO and I am having a hard time
> coming up with a scenario (at least a relevant scenario), where the
> "keep-with-next", "keep-with-previous" and "keep-together" properties be
> used.
> (witching a line context)

I suppose you meant using keeps within a line context?

One possibility is an inline graphic which should be kept attached
to the word before, for example "some product(new!)". It would look
odd if "product" was at the and of a line and the "(new!)" graphic
wrapped to the beginning of the next, therefore i'd try
  <fo:inline>product</fo:inline>
  <fo:inline keep-with-previous="always">
    <fo:external-graphic src="new.gif"/>
  </fo:inline>
It would be interesting to hear whether this works in some processors
(FOP doesn't support this) or even whether it is the best way to do
this.

A keep-together could be used to have phrases kept together within a
line, or titles to their names, or units to the measurement numbers.
This could probably also be achieved with non-breaking spaces,
unfortunately FOP seems to format &#160; always with a full space
width, which sometimes leads to annoying holes.

HTH
J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread