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

Using XSL Variables in HTML Attributes

Subject: Using XSL Variables in HTML Attributes
From: "Jesse M. Heines" <heines@xxxxxxxxxx>
Date: Wed, 12 Jun 2002 13:57:27 -0400
using variables in html
I have some values stored in XSL variables:

   <xsl:variable name="courseNo" select="@crsno" />
   <xsl:variable name="courseTitle"
select="//course[@number=$courseNo]/title" />

I can create a dropdown list of course numbers with HTML option tags by
putting the following code inside an appropriate looping structure:

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

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>

I have tried various ways to get <xsl:value-of select="$courseTitle" />
inside the quotes for the option value parameter, but nothing I tried
works.  I also tried using the XPath string function in a number of ways
to no avail.

I would appreciate suggestions anyone can make on how to accomplish our
goal.

Thank you,
Jesse

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jesse M. Heines, Ed.D.

Associate Professor
Dept. of Computer Science
University of Massachusetts Lowell
Lowell, MA  01854-2881



 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.