[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL question for email link

Subject: XSL question for email link
From: Jeff Self <jocknerd@xxxxxxx>
Date: Sun, 07 Jul 2002 17:44:52 -0400
email link in xsl
I'm having difficulty getting XSL to produce a html page with a mailto link..
I want to produce an html page that lists member names but as a mailto link (while displaying their member names).


Here's what I've got so far:
members.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<MEMBERS>
   <MEMBERINFO>
       <NAME>
           <FIRST>Joe</FIRST>
           <LAST>Smith</LAST>
       </NAME>
       <EMAIL>jsmith@xxxxxxxxxxxxx</EMAIL>
   </MEMBERINFO>
</MEMBERS>

members.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version "1.0" xmlns:xsl="http:www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head><title>Member List</title></head>
<body>
<table>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>


<xsl:template match="MEMBERINFO">
   <tr>
       <td><xsl:apply-templates select="NAME"/></td>
   </tr>
</xsl:template>

<xsl:template match="NAME">
   <xsl:text disable-output-escaping="yes">&lt;a href="mailto:";</xsl:text>
   <xsl:value-of select="child::EMAIL"/>
   <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
   <xsl:value-of select="FIRST"/>
   <xsl:text> </xsl:text>
   <xsl:value-of select="LAST"/>
   <xsl:text disable-output-escaping="yes">&lt;/a&gt;</xsl:text>
</xsl:template>

</xsl:stylesheet>

When I transform the xml document to html, it displays the member name and provides a mailto link but it leaves the mailto link blank. Am I going about this all wrong? If so whats the solution?



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.