[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL and inserting values in HTML

Subject: Re: XSL and inserting values in HTML
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Thu, 26 Oct 2000 14:28:49 -0700
xsl inserting values
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.