This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: value for href
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] value for href
- From: "Thomas B. Passin" <tpassin at mitretek dot org>
- Date: Thu, 18 Oct 2001 17:04:03 -0400
- References: <a05100303b7f4e66ce9bd@[10.141.70.106]>
- Reply-To: xsl-list at lists dot mulberrytech dot com
[Scott Hofmann]
> I put the below line of code into an .XSL file and it complains that
> the value of attribute "href" must not contain the '<' character.
>
> <td bgcolor="lightsteelblue"><b>URL</b>: <a href="<xsl:value-of
> select='SiteURL'/>"><xsl:value-of select='SiteURL'/></a></td>
>
> So how could i format this line so the value for <xsl:value-of
> select='SiteURL '/> gets inserted into the <a href> area?
>
The simplest way among several possiblities is
<a href="{SiteURL}">...</a>
This is called an "attribute value template". Your way is illegal in XML.
Cheers,
Tom P
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list