This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSL question for email link
- From: "Ivan Pedruzzi" <ivan at exln dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sun, 7 Jul 2002 18:49:38 -0400
- Subject: RE: [xsl] XSL question for email link
- Reply-to: xsl-list at lists dot mulberrytech dot com
I believe you need to move the context one level up given Jeff's XML
<xsl:template match="NAME">
<a href="mailto:{../EMAIL}">
<xsl:value-of select="concat(FIRST,' ',LAST)"/>
</a>
</xsl:template>
Ivan
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Mike Brown
> Sent: Sunday, July 07, 2002 6:16 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] XSL question for email link
>
>
> Jeff Self wrote:
> > <xsl:template match="NAME">
> > <xsl:text disable-output-escaping="yes"><a
> href="mailto:"</xsl:text>
> > <xsl:value-of select="child::EMAIL"/>
> > <xsl:text disable-output-escaping="yes">></xsl:text>
> > <xsl:value-of select="FIRST"/>
> > <xsl:text> </xsl:text>
> > <xsl:value-of select="LAST"/>
> > <xsl:text disable-output-escaping="yes"></a></xsl:text>
> > </xsl:template>
> >
> > [...]
> >
> > Am I going about this all wrong?
>
> Yes. You almost never, ever need to use disable-output-escaping.
>
> > If so whats the solution?
>
> <xsl:tempate match="NAME">
> <a href="mailto:{EMAIL}">
> <xsl:value-of select="concat(FIRST,' ',LAST)"/>
> </a>
> </xsl:template>
>
> - Mike
> ______________________________________________________________
> ______________
> mike j. brown | xml/xslt: http://skew.org/xml/
> denver/boulder, colorado, usa | resume:
> http://skew.org/~mike/resume/
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list