I need to obtain the filename from a URL, the URL is dynamic and the amount of slashes can be different amounts. Im using xslt 1.0 so looking for something that will take:
http://DevSite/sites/name/Lists/note/Attachments/3/image.jpg
and give me:
image.jpg
IS this possible in XSLT 1.0?
if you are using xslt 2.0, you can use subsequence() and create a function:
Declare your function in xsl:stylesheet root:
Create the function:
Call the function:
You can use recursion:
Output:
image.jpg