XML/XSLT

Anjali

Usenet Archive
Joined
Nov 30, 2004
Messages
6
Reaction score
0
Hi,

I am new to XML/XSLT. I want to read XML value and put it in the textbox in XSLT. How do I do that.

Eg:
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
<td><input type="text" name="test"
value=<xsl:value-of select="country"/>/></td>
</tr>

I am able to display title, artist inside <td> but I need to display country in a textbox so User can edit it.

How do I do this.

Thanks in advance

Sridevi
 

Morris M. Keesan

Usenet Archive
Joined
Oct 26, 2004
Messages
14
Reaction score
0
<td><input type="text" name="test"
value=<xsl:value-of select="country"/>/></td>

<td><input type="text" name="test" value="{country}"/></td>

or if that doesn't work, or if you prefer verbosity,

<td>
<input type="text" name="test">
<xsl:attribute name="value">
<xsl:value-of select="country"/>
</xsl:attribute>
</input>
</td>
 

Anjali

Usenet Archive
Joined
Nov 30, 2004
Messages
6
Reaction score
0
Thanks Morris, it worked

Thanks
Sridevi

Morris M. Keesan said:
<td><input type="text" name="test" value="{country}"/></td>

or if that doesn't work, or if you prefer verbosity,

<td>
<input type="text" name="test">
<xsl:attribute name="value">
<xsl:value-of select="country"/>
</xsl:attribute>
</input>
</td>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top