Consider the following xml:
<folder>
<name>folderA</name>
<contents>
<folder>
<name>folderB</name>
<contents>
<file>
<name>fileC</name>
<file>
</contents>
</folder>
</contents>
</folder>
which represents the simple file structure:
folderA/
L folderB/
L fileC
In XSL, I would like to be able to generate the path of the file in a file
template. Therefore it seems I would need to recursivly ascend the node tree to get the names of the folders this file is in.
How would you fill the ???
in next xsl template
<xsl:template match="file">
<a href="{???}"><xsl:value-of name="name" /></a>
</xsl:template>
to finally get:
<a href="folderA/folderB/fileC">fileC</a>