Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] function for getting filename [Thread Next] Re: [xsl] function for getting filenameTo: Date: 9/1/2006 12:12:00 PM > So a further tokenization is necessary to remove query parameters and > fragment identifier. this is true in general (as well as the observation that there may be no file at all) but I've found editing base-uri like this to be very useful in xslt2 stylesheets where it would be very hard to do the xslt1-thing of passing in the filename as a parameter as the stylesheet is iterating over a collection() so you don't really have any external control over which input documents are being processed. Although I do know in those cases that the uri will be file: without any # or / part. I'd probably do replace(base-uri(/),'.*/','') to remove the path component rather than tokenize and last() but it probably doesn't make much difference really. You could add |[\?#].* to the regex to also remove query and fragment identifiers if they were a possibility. David | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
