This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Dillemma when creating an XSL template ... how do I do this?
- To: <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Dillemma when creating an XSL template ... how do I do this?
- From: "JoshMEagle" <josh dot miller at eagletgi dot com>
- Date: Tue, 13 Feb 2001 16:45:18 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
In the code snippet below, the <email> and <url> elements are inside the
<contact> element, and I want to display these as HTML links, any ideas how
I can accomplish this? The way it is below doesn't work.
<xsl:template match="contact">
<p>
<xsl:value-of select="name"/><br/>
<xsl:value-of select="address"/>
<xsl:value-of select="city"/>, <xsl:value-of select="state"/>
<xsl:value-of select="zip"/><br/>
ph.<xsl:value-of select="phone"/><br/>
fax.<xsl:value-of select="fax"/><br/>
<xsl:template match="email">
<a>
<xsl:attribute name="href"><xsl:value-of select="."
/></xsl:attribute>
<xsl:text><xsl:value-of select="." /></xsl:text>
</a>
</xsl:template>
<xsl:template match="url">
<a>
<xsl:attribute name="href"><xsl:value-of select="."
/></xsl:attribute>
<xsl:text><xsl:value-of select="." /></xsl:text>
</a>
</xsl:template>
</p>
</xsl:template>
Joshua Miller
Web Development
Eagle Technologies Group, Inc.
Business Solutions for the Next Generation
www.eagletgi.com
josh.miller@eagletgi.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list