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