W3C home > Mailing lists > Public > www-xsl-fo@w3.org > February 2008

Re: Custom line-break requirement

From: Jeremias Maerki <dev@jeremias-maerki.ch>
Date: Thu, 21 Feb 2008 10:10:56 +0100
To: www-xsl-fo@w3.org
Message-Id: <20080221100909.7099.DEV@jeremias-maerki.ch>

You can replace all occurences of <space> with <nbspace> but leave all
occurences of <comma><space> as is.

<nbspace> = non-breaking space = &#x00A0;

HTH

On 21.02.2008 09:49:01 JohnVirgo wrote:
> 
> 
> I've got an interesting problem that I've been struggling to find an answer
> to.
> 
> I need to produce some text in the form of an address block, which only line
> breaks on ',' characters not on ' ' characters.
> 
> I.e. Currently I get:
> 1234 Thingy drive, New York, New
> York, Some county, AC 0DE
> 
> Where I want address elements to stay together:
> 1234 Thingy drive, New York,
> New York, Some county,
> AC 0DE
> 
> I've tried several techniques to no avail:
> keep-together attribute doesn't seem to have a way to override the logic to
> do this.
> Inserted a white printable char for each space, still gets treated as a
> place to break.
> Can't reliably calculate line width of manual breaking with a variable width
> font by char count.
> 
> Any ideas?
> 
> Thanks, JV
> -- 
> View this message in context: http://www.nabble.com/Custom-line-break-requirement-tp15606844p15606844.html
> Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
> 




Jeremias Maerki
Received on Thursday, 21 February 2008 09:10:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 21 February 2008 09:10:09 GMT