This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Recursio and filepathstripping...
- To: Jukka dot T dot Lehtinen at nokia dot com
- Subject: [xsl] RE: Recursio and filepathstripping...
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Mon, 19 Feb 2001 05:26:08 -0800 (PST)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Jukka,
Remove the following:
> <xsl:variable name="sourcevariable" select="substring-before($source,
> '.')" /> <!-- file extension is cutted out -->
And with minor adjustments you'll get the intended results.
As it is now, you're trying to strip the text after the dot ***on every call*** to the template.
The second time (in case there's just one dot in the text) you do this $sourcevariable wil be set
to the empty string.
Hope this helped,
Cheers,
Dimitre Novatchev.
Jukka Lehtinen wrote:
I'm having filepath in one attribute (e.g.
source="result\test\tomorrow\now.txt" or source="test\file.gif") and I need
that "now" or "file" infrormation from that source attribute.
<xsl:template name="identifierrip">
<xsl:param name="source" />
<xsl:variable name="sourcevariable" select="substring-before($source,
'.')" /> <!-- file extension is cutted out -->
<xsl:choose>
........................
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list