You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Balaji Loganathan <ba...@yahoo.com> on 2002/07/02 16:55:51 UTC
text wrapping - Mathy
Hi Mathy,
I read this thread
http://marc.theaimsgroup.com/?l=fop-user&m=101785696928812&w=2
can u please send me the wrapper_helper template so
that i can test and use it.
Thanks in advance.
http://www.sold.com.au - SOLD.com.au
- Find yourself a bargain!
Re: text wrapping - Mathy
Posted by Mathy V Arumugam <ma...@jpl.nasa.gov>.
Hi Balaji,
I am very sorry for not responding sooner. I was out of the office last week.
You don't need the wrapper_helper function. You can use the text_wrapper
function recursively... But, here is the wrapper_helper function you've asked.
Good Luck!
Mathy
<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)"/>
<!-- 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>
At 7/2/2002 07:55 AM, you wrote:
>Hi Mathy,
> I read this thread
>http://marc.theaimsgroup.com/?l=fop-user&m=101785696928812&w=2
> can u please send me the wrapper_helper template so
>that i can test and use it.
>Thanks in advance.
>
>
>
>http://www.sold.com.au - SOLD.com.au
>- Find yourself a bargain!