|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL and inserting values in HTML
Henrik Andersson wrote: > I now wonder how I can build > a link that looks like this. > > agenda.asp?action=del;amp&id=2 > > where the number 2 is coming from the XML. > > I have tried the following but it don?´t work. > <a href="agenda.asp?action=del;amp&id= <xsl:value-of select="ID" /> > >click</a> Right -- you can't put markup inside an attribute value. What you're after is the <xsl:attribute> element, which lets you construct attribute "content" (i.e. value) using arbitrary content otherwise available to the stylesheet. In your case, you'd do something like: <a><xsl:attribute name="href">agenda.asp?action=del;amp&id=<xsl:value-of select="ID" /></xsl:attribute>click</a> (If you're using the MSXML processor, Sept. '00 release, be careful not to allow any newlines into the attribute value when you do this. There's a known bug which will probably be taken care of in the next release.) ================================================================ John E. Simpson | "When I'm not in my right mind, my http://www.flixml.org | left mind gets pretty crowded." XML Q&A: www.xml.com | (Steven Wright) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








