RE: Newbie Question

Subject: RE: Newbie Question
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Thu, 12 Aug 1999 15:21:24 +0100
Use the xsl:attribute call in your style sheet and then treat it like a
normal <A href=...> tag.
 
<TD><A>
    <xsl:attribute name="href">mailto:<xsl:value-of
select="email"/></xsl:attribute>
    Mail us!
</A></TD>
 
or if you want the email address to be printed on the screen as well:
 
<TD><A>
    <xsl:attribute name="href">mailto:<xsl:value-of
select="email"/></xsl:attribute>
    :<xsl:value-of select="email"/>
</A></TD>
 
Rgs,
 
Ben Robb
cScape

-----Original Message-----
From: Darren Hammond [ mailto:dhammond@xxxxxxxxx <mailto:dhammond@xxxxxxxxx>
]
Sent: Thursday, August 12, 1999 2:55 PM
To: XSL-List@xxxxxxxxxxxxxxxx
Subject: Newbie Question



This is a style sheet definition that I am using. On the line that reads 
"<TD><xsl:value-of select="email"/></TD>"
I would like to make the value a Mailto reference. How do I do this?
Thanks.
 
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
  <xsl:template match="/">
    <HTML>
      <BODY>
 <CENTER>
        <TABLE BORDER="2">
          <TR>
            <TD>NAME</TD>
            <TD>CO-OP</TD>
            <TD>PHONE</TD>
            <TD>EMAIL</TD>
            <TD>FTP</TD>
            <TD>FAX</TD>
          </TR>
          <xsl:for-each select="clients/order">
            <TR>
              <TD><xsl:value-of select="name"/></TD>
              <TD><xsl:value-of select="coop"/></TD>
              <TD><xsl:value-of select="phone"/></TD>
              <TD><xsl:value-of select="email"/></TD>
              <TD><xsl:value-of select="ftp"/></TD>
              <TD><xsl:value-of select="fax"/></TD>
            </TR>
          </xsl:for-each>
        </TABLE></CENTER>
      </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread