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]
Other format: [Raw text]

Re: Using XSL Variables in HTML Attributes


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@mulberrytech.com
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



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