Title: RE: Retrieve value problem

i tried with the way u show me but it doesn't display the Jonh Smith in the input field!!??!!
my snippet is :

<input type="text" name="name">
        <xsl:attribute name="value">
                <xsl:value-of select="name_value"/>  {nothing display!!!)
        </xsl:attribute>
</input>
<xsl:value-of select="name_value"/>     {here - display John Smith!!! - just the line below the input tag!!!!

what happens???



-----Original Message-----
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Sent: 17 December 2002 09:55
To: [EMAIL PROTECTED]
Subject: Re: Retrieve value problem


Hello Gia Dinh,

it's an XSL problem, so maybe the Mulberry XSL list is a more
appropriate forum for such questions:
http://www.mulberrytech.com/xsl/xsl-list/.

I can only guess what your problem is, because you show to less code.
value="{name_value}" is ok in general. If <xsl:value-of
select="name_value"/> works on another place, it shell be a matching
problem. I guess you don't use both code snippets in the same template
or for-each loop.
To use <xsl:value-of select="name_value"/> in attributes you can write
it in the following way:

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

But this is only a long form of the Attribtue Value Template you already
use. And if the one does not work, the other one shell also not work.

For more help, you need to show more of your code.

Regards,

Joerg

Hong Gia Dinh wrote:
> Hi all
>
> I got the problem like this:
>
> i have a xsp file having the element : <name_value>John Smith</name_value>
> and a xsl file having a form with the input something like this?
>
> <form . . .>
>         <input type="text" name="name" value="xxx">
>
> now i want to put the value of the element <name_value> into the value
> of the input!!
> how???
>
> i tried value="{name_value}"
> but it doesn't display anything in the form!
>
> i use <xsl:value-of select="name_value"/> in the outside of the input i
> can print out Jonh Smith
>
> but i cant put the tag <xsl:value-of select="name_value"/> into the
> value="<.>" due to '<' and '>' problem! so do you know how to deal with
> this??
>
> Thanks very mmuch in your help
> GD


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to