This is excellent.
NB: I would use a fixed width font for this kind of exercise, eg:
font-family="Courier"
otherwise there is several cm variation over 30 12pt char between average & em 
spacing. Unlikely, but ...

Regards,
Roland.

> -----Original Message-----
> From: Mathy V Arumugam [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 13 June 2002 9:33 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Control of long words inside a table cell
> 
> 
> You could also use this template to split a line at a certain 
> position.
> 
> <xsl:template name="text_wrapper">
>       <xsl:param name="Text"/>
>     <xsl:choose>
>         <xsl:when test="string-length($Text)">
>           <xsl:value-of select="substring($Text,1,30)"/>
>            <!-- <xsl:text>&#xa;</xsl:text>   br/ -->
>           <xsl:call-template name="wrapper_helper">
>             <xsl:with-param name="Text" select="substring($Text,31)"/>
>           </xsl:call-template>
>         </xsl:when>
>         <xsl:otherwise>
> 
>           <!-- no more string! -->
>         </xsl:otherwise>
>      </xsl:choose>
>    </xsl:template>
> 
>     <!--this will also display 30 chars of the string, and 
> pass the rest back to
> 
>     text_wrapper -->
>     <xsl:template name="wrapper_helper">
>     <xsl:param name="Text"/>
>       <xsl:value-of select="substring($Text,1,30)"/>
>       <!-- <br/> -->
>       <xsl:call-template name="text_wrapper">
>         <xsl:with-param name="Text" select="substring($Text,31)"/>
>       </xsl:call-template>
>     </xsl:template>
> 
> 
> 
> Mathy
> 
> Roland Neilands wrote:
> 
> > >> Use <fo:table-cell wrap-option="wrap">
> > > Thanks for the response; I tried this option but I did not
> > > see a difference;
> > > the text continues to over-flow the table cell width.
> >
> > I saw this when testing too. Any whitespace would cause the 
> cell contents to
> > wrap though. You could search the examples and/or archive 
> for solutions
> > involving either hyphenation or inserting zero length 
> whitespace at set
> > points.
> >
> > Regards,
> > Roland
> 

Reply via email to