You might find some ideas or a solution in

main\webapp\skins\common\xslt\html\pathutils.xsl

> <!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
> <xsl:template name="normalize">

--
Ferdinand Soethe