Menu

#5 [FRAMEWORK] Bug treeview.xsl / leaf template / attributes

open
None
5
2004-07-22
2004-07-22
No

Bug in the treeview.xsl file :
passing more than one argument to a leaf in the tree
resulted in a bug :

problem was in the & in the "leaf" template :
should be AFTER xsl:for-each and not before (otherwise
only the first attribute will be correct)

Bug solved :

<xsl:template match="leaf|LEAF">
<table cellpadding='0' cellspacing='0' border='0'>
<tr>
<td width='17'>
<img src='../images/o.gif'
height='1' width='17' border='0' />
</td>
<td width='1' class='treeline'><img
src='../images/o.gif' height='1' width="1"
border='0'/></td>
<td align='bottom' valign='left'>
<img src='../images/o.gif'
border='0' class='treeline' align='absbottom' WIDTH='9'
HEIGHT='1'/>
<a>
<xsl:attribute
name="href">

&lt;xsl:value-of select="@url"/&gt;&lt;xsl:if test="@\*

[name()!='icon' and name()!='name' and name()!='url'
and name()!='target']"><xsl:for-each select="@*[name()!
='icon' and name()!='name' and name()!='url' and name()!
='target']">&amp;<xsl:value-of select="name
()"/>=<xsl:value-of select="."/></xsl:for-each></xsl:if>
</xsl:attribute>
<xsl:attribute
name="target">

&lt;xsl:value-of select="@target"/&gt;
            &lt;/xsl:attribute&gt;
            &lt;img

class='treeicon'>

&lt;xsl:attribute name="src"&gt;&lt;xsl:value-of

select="@icon"/></xsl:attribute>
</img>
<font
class='treefont' ><xsl:value-of select="@name"/></font>
</a>
<br/>
</td>
</tr>
</table>
</xsl:template>

Discussion


Log in to post a comment.

MongoDB Logo MongoDB