xsl-list
[Top] [All Lists]

Re: [xsl] Split string into multiple sentences on word boundaries

2009-04-09 16:55:27
Bordeman, Chris schrieb am 09.04.2009 um 14:04:43 (-0500):
Hi all.

Hi, it's better to start a new thread instead of hijacking an
unrelated one.

I have a long string, need to break it up onto say 3 lines (may
vary), with a maximum of 10 characters on the first line, 50 on the
second, and 20 on the last line (all of which varies).

I can't just split at any character, I need to split between words.

Is there is a function already written somewhere that does something
like this?

Using Xslt 2.0 / Saxon.

See tokenize(), that should get you started.

Michael Ludwig

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--