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

Re: Line breaks at a special char

From: BrutalDeluxe <niklas@nockebytryckeri.se>
Date: Tue, 19 Aug 2008 03:21:41 -0700 (PDT)
Message-ID: <19047714.post@talk.nabble.com>
To: www-xsl-fo@w3.org


Ah, ok, a good start anyway :) Thanks! All I need now is a "space that is not
a space". If I replace all the spaces with this other "space" then the
problem is solved. Is there such?

 

Tony Graham-3 wrote:
> 
> 
> On Tue, Aug 19 2008 10:49:06 +0100, niklas@nockebytryckeri.se wrote:
>> I need to make a line break if the width exceeds a given value and for
>> that
>> I've added the max-width-attribute to a block. However, I need a little
>> more
>> control to this line break, I need to break at a special character. As an
>> example, look at this:
>>
>> I have a email and when it exceeds 40 mm, I want to break it at the @
>> like
>> this
>>
>> foo@
>> bar.com
>>
>> Is it possible to do with XSLT/XSL-FO or do I need to write an extension
>> (hope not). This is how I want to do
>>
>> <fo:block max-width="40mm" break-char="@"><xsl:value-of
>> select="//email"/></fo:block>
> 
> There is no 'break-char' property nor anything similar.
> 
> You could, however, try &#x200B, ZERO WIDTH SPACE, after the potential
> break characters so the line-breaking algorithm has more to work with.
> 
> Regards,
> 
> 
> Tony Graham                         Tony.Graham@MenteithConsulting.com
> Director                                  W3C XSL FO SG Invited Expert
> Menteith Consulting Ltd
> XML, XSL and XSLT consulting, programming and training
> Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
> Registered in Ireland - No. 428599   http://www.menteithconsulting.com
>   --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> xmlroff XSL Formatter                               http://xmlroff.org
> xslide Emacs mode                  http://www.menteith.com/wiki/xslide
> Unicode: A Primer                               urn:isbn:0-7645-4625-2
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Line-breaks-at-a-special-char-tp19046951p19047714.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Tuesday, 19 August 2008 10:22:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 August 2008 10:22:17 GMT