Re: Line breaks at a special char

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

Received on Tuesday, 19 August 2008 10:14:13 UTC