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: Transforming into embedded HTML


jmabbate wrote:
>   <a href="mailto:<xsl:value-of select="email"/>"><xsl:value-of
> select="email"/></a>

Certain attribute values get to be "attribute value templates" (AVTs) per the
XSLT spec. Anything in them in curly braces is evaluated as an XPath
expression. Use this:

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

Alternatively,

<a>
  <xsl:attribute name="href">
    <xsl:value-of select="concat('mailto:',email)"/>
  </xsl:attribute>
</a>

or any of a half-dozen variations of same.

> I have looked in the XSL-List archives and XSL FAQ and couldn't
> find anything on this topic.

It is certainly in the FAQ at www.dpawson.co.uk -- under both 'Attributes' and
'Attribute Value Templates'.

   - 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]