This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Cutting strings short.
- To: xsl-list at mulberrytech dot com, "M.T. de Brauw" <mark at debrauw dot net>
- Subject: Re: Cutting strings short.
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Tue, 27 Jun 2000 12:00:56 -0400
- Organization: Department of Engineering Science, The University of Auckland
- References: <002901bfe045$e40596c0$9f00643e@bla.wxs.nl>
- Reply-To: xsl-list at mulberrytech dot com
"M.T. de Brauw" wrote:
>
> I would like to output a list of messagetitles and 2 lines of the actual
> message using XSL. Is it possible, using XSL, to cut off a string after say
> 75 characters?
See the substring() function in XPath
http://www.w3.org/TR/xpath#function-substring
You want something like
<xsl:value-of select="substring(text, 1, 75)" />
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list