This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSL question for email link


Jeff Self wrote:
> <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>
>
> [...]
>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]