Actually, I didn't see Andrew's & Michael's response on original message (those
messages got moved to particular folder in mailbox). My fault! Sorry about
redundant response!
Mandar Jagtap
----- Original Message -----
From: Mukul Gandhi <gandhi(_dot_)mukul(_at_)gmail(_dot_)com>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Cc:
Sent: Wednesday, 2 November 2011 9:27 AM
Subject: Re: [xsl] Getting text from string
you're using the same mechanism what Andrew, used but perhaps in
significantly expensive ways (the complexity of your XSLT fragment is
unnecessary high -- logical as well as computational).
I would go for Andrew's solution.
On Tue, Nov 1, 2011 at 11:21 PM, Mandar Jagtap
<mandar(_dot_)jagtap(_at_)yahoo(_dot_)co(_dot_)in> wrote:
Try using tokenize() function. You can try something like this:
<xsl:for-each select="tokenize($path, '/')">
<xsl:if test="position() = last()">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
This should return you "filename" as per your example string.
Hope this helps!
Mandar Jagtap
--
Regards,
Mukul Gandhi
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--