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

Re: Using XSL Variables in HTML Attributes

Subject: Re: Using XSL Variables in HTML Attributes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 12 Jun 2002 15:23:49 -0400
jesse piez
Jesse,

At 01:57 PM 6/12/2002, you wrote:
I want to use the course titles as the value parameters of the HTML
option tag, but the following doesn't work:

   <option value="$courseTitle">
      <xsl:value-of select="$courseNo" />
   </option>

For this you want to use a handy construction known as "attribute value templates".


Try <option value="{$courseTitle}">...

The brackets in a literal result attribute (also allowed in a few other places) say to the processor "evaluate this and stick the result in". Otherwise '$courseTitle' is taken to be a string like any other (as you no doubt discovered).

Enjoy,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.