[xsl] a href problem with XSLT

Subject: [xsl] a href problem with XSLT
From: Erik Stunkat <erik@xxxxxxxxxx>
Date: Thu, 27 Jul 2006 14:16:59 +0200
Hello

I?m using Forrest DirectoryGenerator to browse through pdf files
in different folders.

For output I use the following xslt stylesheet and everything is fine, accept
the <a href /> argument.


Output looks like:

<li>
171-Regulatory_Interactions.pdf
<a href="N109C6">171-Regulatory_Interactions.pdf</a>
</li>
-
<li>
181-Leukemic_Inhibition.pdf
<a href="N109CB">181-Leukemic_Inhibition.pdf</a>
</li>


I want <a href="171-Regulatory_Interactions.pdf">171-Regulatory_Interactions.pdf</a>
instead of:
<a href="N109C6">171-Regulatory_Interactions.pdf</a>


N109C6 is the directory content generated by Forrest.




<xsl:template match="dir:directory|dir:file"> <li> <xsl:value-of select="@name"/> <xsl:if test="name(.)='dir:directory'"> <!-- creating subdirectories --> <ul><xsl:apply-templates/></ul> </xsl:if> <xsl:for-each select="@name">

<!-- here is something wrong -->

<a href="{generate-id(.)}">
<xsl:value-of select="."/>
</a>
</xsl:for-each>

</li>
</xsl:template>


<xsl:template match="/dir:directory"> <ul> <xsl:value-of select="@name"/> <!-- creating subdirectories -->

<xsl:apply-templates/>

</ul>
</xsl:template>


any ideas?


Erik Stunkat

Current Thread