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]

Re: value for href


[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


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