[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: word wrap

Subject: Re: Re: word wrap
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Mon, 24 Dec 2001 08:41:04 -0800
word wrap in xsl
you are probably getting the error because of:
<xsl:value-of select="substring(Text, 1, 30)"/>

This should be:
<xsl:value-of select="substring($Text, 1, 30)"/>




----- Original Message -----
From: "ajay sinha" <sinhajay@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, December 24, 2001 2:30 PM
Subject:  Re: word wrap


> As posted before following problem
> >  >
> >
> >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: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 .
> >  And you repplied that saxon 3.2 dosent support tail recursion.
>    So please can you tell me how  to check in a string any word larger
then
> 20 letter and if it exist break it in 20 letter peaces without using tail
> recursion.oterwise my template is becoming large as my string is larger
then
> 300 letters.
> Thanks'
> ajrapa
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread
  • Re: word wrap
    • ajay sinha - Mon, 24 Dec 2001 09:30:23 -0500 (EST)
      • Robert Koberg - Mon, 24 Dec 2001 09:43:19 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.