This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: wrap text


You are using a very old release of Saxon, and your first step should be to
upgrade to something more recent. The recommended version is now Saxon 6.5

You should also delete the line
<xsl:value-of select="$rest"/>
from your template. Apart from being incorrect, this stops tail recursion
working (though tail recursion probably wasn't implemented in the release
you are using anyway...)

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of ajay sinha
> Sent: 17 December 2001 19:44
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] wrap text
>
>
> for node text I am using following template to incert <br/> tag
> <xsl:template name="textwrapbb">
> 	<xsl:param name="Text"/>
> <xsl:value-of select="substring(Text, 1, 30)"/>
> <br></br>
>   <xsl:variable name="rest" select="substring($Text, 31)" />
>   <xsl:if test="string-length($rest) &gt; 30">
>     <xsl:call-template name="textwrap">
>       <xsl:with-param name="Text" select="$rest" />
>     </xsl:call-template>
>   </xsl:if>
> 	<xsl:value-of select="$rest"/>
> </xsl:template>
> </xsl:stylesheet>
>
> My Env. is saxon and java
> and it gives following error
>
> java.lang.StackOverflowError
> t com.icl.saxon.ContentImpl.appendValue(ContentImpl.java:57)
> t com.icl.saxon.ParentNodeImpl.getValue(ParentNodeImpl.java:83)
> t com.icl.saxon.expr.NodeSetIntent.asString(NodeSetIntent.java:57)
> t com.icl.saxon.functions.Substring.eval(Substring.java:29)
> can any one tell me how to use recursive template with saxon parser
>
> or how to do word wrap template .
> Thanks
> ajrapa
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]