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

Re: Populating textbox

Subject: Re: Populating textbox
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Fri, 19 May 2000 16:05:41 -0400
input value populating other values
Colleen O'Rourke wrote:
> 
> <FORM>
>    <GEN_INFO>
>      <FIRST_NAME/>
>   </GEN_INFO>
> </FORM>

Do you mean that the actual name you want to print is the element name?
I suspect you have something more like <FIRST_NAME>Colleen</FIRST_NAME>.

>
> <input type="text" size="18" value="xsl:value-of select={FIRST_NAME}"/>

So close! Any attribute (I think) on a non-XSL element is an attribute
value template which means you can use curly brackets to get things
evaluated. Try

<input type="text" size="18" value="{FIRST_NAME}"/>

The other option is to use <xsl:attribute> like this

<input type="text" size="18">
  <xsl:attribute name="value">
    <xsl:value-of select="FIRST_NAME" />
  </xsl:attribute>
</input>

If you actually meant to print the name of the element contained in
GEN_INFO, you'd have to do something like this

<input ... value="{*[1]/name()}" />

-- 
Warren Hedley


 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.