This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:value-of inside an html tag
- From: "Conal Tuohy" <conalt at paradise dot net dot nz>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 3 Oct 2002 08:41:32 +1200
- Subject: RE: [xsl] xsl:value-of inside an html tag
- Reply-to: xsl-list at lists dot mulberrytech dot com
Attribute Value Templates are what you want:
<a href="{/page/results/prevnext/@prevresult"}>Previous</a>
Note the curly brackets { } which indicate the Attribute Value Template.
AVTs are a convenience method for you to insert the result of an expression
into an attribute value. Otherwise you would have to use the equivalent
long-hand approach:
<a><xsl:attribute name="href"><xsl:value-of
select="/page/results/prevnext/@prevresult"/></xsl:attribute>Previous</a>
Cheers!
Con
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Matt
> MacDougall
> Sent: Thursday, 3 October 2002 08:15
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] xsl:value-of inside an html tag
>
>
> Hi,
>
> I'm trying to build a dynamic link by having the href attribute set to
> <xsl:value-of select="/page/results/prevnext/@prevresult"/>
> ... so I would
> have something like <a href="<xsl:value-of
> select="/page/results/prevnext/@prevresult"/>">Previous</a>
> ... obviously
> that's not going to work though.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list