Subject: Re: [xsl] Re: Anyone have XSLT that generates XML showing a Windows folder structure?|
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 May 2020 16:23:54 -0000
I decided to go the route that John suggested, and use the EXPath File
module. John was right, it was fairly easy to implement the desired functionality using the EXPath File module. Below is what I created. It seems to work fine. If you see any potential problems in it, or ways to improve it, please let me know. /Roger
<xsl:param name="uri" as="xs:string"/>select="f:reverse-string(substring-after(f:reverse-string($uri), '/'))"/>
I think with pure XPath I tend to use tokenize($uri, '/')[last()] here to select the file name.
But the reverse-string(substring-after looks a bit too complicated to me with access to the tokenize function.