This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Populating textbox
- To: xsl-list at mulberrytech dot com
- Subject: Re: Populating textbox
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Fri, 19 May 2000 16:05:41 -0400
- Organization: Department of Engineering Science, The University of Auckland
- References: <D16D3E3BACDDD31196C700A0CC270FE206FBD5@magna1.internalmagnaspace.com>
- Reply-To: xsl-list at mulberrytech dot com
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