|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: function for getting filename
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






