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]

Re: Populating textbox


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

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