[xsl] Limit the length of transformed content from source text nodes

Subject: [xsl] Limit the length of transformed content from source text nodes
From: Blue Gecko <bluegecko@xxxxxxxxx>
Date: Mon, 24 Oct 2005 17:04:06 +0200
Hello folks

Is there a way to limit the length of transformed content from source text nodes via XSLT?

Here's an example:

<!-- source -->
<foo>
<item>This is the body of an article I'm striving to snip.</item>
</foo>

I need to simulate the shrinking mechanism commonly used in content summaries, where the bodies of available articles are snipped to their first words followed by ellipsis (...), like this:

<!-- result -->
<snippets>
<snippet>This is the body of [...]</snippet>
</snippets>

Many thanks

Current Thread