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
as="xs:string">
<xsl:function name="f:remove-last-slash-filename-from-URI"
<xsl:param name="uri" as="xs:string"/>select="f:reverse-string(substring-after(f:reverse-string($uri), '/'))"/>
<xsl:value-of
</xsl:function>
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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Anyone have XSLT that gen, Costello, Roger L. c | Thread | Re: [xsl] Re: Anyone have XSLT that, Liam R. E. Quin liam |
[xsl] Re: Anyone have XSLT that gen, Costello, Roger L. c | Date | Re: [xsl] Anyone have XSLT that gen, G. Ken Holman g.ken. |
Month |