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]

Re: Cutting strings short.


"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

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