Merge two strings in xslt



I have been trying to figure out the right way to approach this problem but didn't had any success yet. The problem is I have two variables- one contains the server+site root path and the second contains the path to a file like-



<xsl:variable name="a">/user/folder/academics/aps/includes</xsl:variable>
<xsl:variable name="b">/aps/includes/something/test.html</xsl:variable>


What I'm trying to do here is apply a function to both these strings so that the end result will look like-



/user/folder/academics/aps/includes/something/test.html


What I have tried so far is tokenize() the string and then compare each item but the problem with that is if let's say folder name "academics" repeat twice, it stops at the first one. I'm sure there is a better way to approach this problem. Any suggestion is highly appreciated.


No comments:

Post a Comment