Subject: Re: [xsl] limit a string to a certain word count From: Kamal Bhatt <kbhatt@xxxxxxxxx> Date: Wed, 14 Mar 2007 11:19:41 +1100 |
You mean, truncate it to a certain number of words?Depends if your 1.0 parser supports str:tokenize (a EXSLT function). If it does, then it not a "fair bit harder" but it will be "a wee bit harder" :)
In XSLT 2.0, that's
tokenize($in, '\W')[position() = 1 to $n]
where $in is your input string and $n is the number of words.
It's a fair bit harder in XSLT 1.0 (most things are).
-- Kamal Bhatt
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] limit a string to a certa, Michael Kay | Thread | Re: [xsl] limit a string to a certa, Matthew Pease |
Re: [xsl] limit a string to a certa, Matthew Pease | Date | Re: [xsl] XML Menu Structures, Stan, Rashmi Rubdi |
Month |