In 1.0 you need a recursive template to do this. The logic is
template name="last-part"
if contains($in, '/')
then call-template last-part (with-param $in = substring-after($in, '/'))
else $in
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Vaduvoiu Tiberiu [mailto:vaduvoiutibi(_at_)yahoo(_dot_)com]
Sent: 14 November 2007 07:56
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] get value from link from last slash
Hi, I have a little wierd problem. i have an xml where I have
a bunch of image links like:
root/statics/images/image.jpg
root/images2/image2.jpg
is there a way to extract the names of the images using xslt
1.0? I need to extract the names of the images...image.jpg,
image2.jp, etc. I thought about using substring but there are
more than a slash in the path. Basically I would need the
string from the last slash to the end. Sounds a little
complicated but is there a way around it? 10x
______________________________________________________________
______________________
Get easy, one-click access to your favorites.
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs
--~------------------------------------------------------------------
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>
--~--