#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    1
    Rep Power
    0

    how to make an active email link with XSLT


    Hi
    XML with XSLT to HTML

    I am trying to make an email link active. Like this:

    <a href="mailto:me@home.com">me@home.com</a>

    Markup in the XML file:
    <bookauthor email="me@home.com">

    This doesn't work.
    XSLT file:
    <xsl:template match="/bookstore/book/bookauthor">
    <xsl:for-each select="@email">
    <xsl:variable name="email">
    <xsl:value-of select="."/>
    </xsl:variable>
    <a href="mailto:<xsl:value-of select="$email" />"><xsl:value-of select="$email" /></a>
    </xsl:for-each>
    </xsl:template>

    I get <a mailto:$email>me@home.com</a>

    Help!
    Thankz for any assistance!
    Beth
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Belarus
    Posts
    30
    Rep Power
    13
    hi bethpcuser
    I think you should write like this

    <a href="mailto:<xsl:value-of select="{$email} " />"><xsl:value-of select="$email" /></a>

IMN logo majestic logo threadwatch logo seochat tools logo