[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Getting text from string

Subject: Re: Getting text from string
From: Stefan Krause <stf@xxxxxxxx>
Date: Tue, 1 Nov 2011 20:53:43 +0100
Re:  Getting text from string
Take a look at xsb:fileName-and-fileExtention-from-url() from the XSLT-
SB library [1]. Basically it takes the tokenize()/last() approach, but
also performs some extra format checks.


Stefan


[1]
http://code.google.com/p/xslt-sb/source/browse/tags/xslt-sb/0.2/0.2.28/files.
xsl

Am 01.11.2011 um 18:18 schrieb Stan Mikita:

> Hi,
>
> I have a directory path value and i want to grab the text "filename"
> to the right of the last "/". I've tried using the below without any
> luck. Is there a reverse search where you can tell it to search from
> the right up to the first occurence of a "/"? Value can be many
> directories deep.
>
> path = "dir1/dir2/dir3/dir4/filename"
>
> xsl:variable name="dirPath" select="substring-before(@path,'/')"/
>
> xsl:variable name="dirPath" select="substring-after(@path,'/')"/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.