Subject: RE: Creating "mailto" in a XML file (from another XML file using XSL)
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 5 Jun 2003 09:07:16 +0300
|
Hi,
> <td>
> <xsl:variable name="email" select="
> mysqldump/database/table/row[field[@name = 'assigned_to'] =
> field[@name =
> 'user_id'] ]"/>
> <xsl:for-each select="$email">
> <xsl:value-of select="$email"/>
> <a
> href="mailto:vipul.vij@xxxxxxxxxx">Vipul Vij</a>
> </xsl:for-each>
> </td>
this should be something like
<td>
<xsl:for-each select="/mysqldump/database/table[@name = 'phpbt_auth_user']/row[current()/field[@name = 'assigned_to'] = field[@name = 'user_id']]">
<a href="mailto:{field[@name = 'email']}">
<xsl:value-of select="concat(field[@name = 'first_name'], ' ', field[@name = 'last_name'])" />
</a>
</xsl:for-each>
</td>
Notice how the select pattern start from the root and uses current() function.
Cheers,
Jarno - RSA
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|