You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hong Gia Dinh <hg...@sdcgrp.com> on 2002/12/17 03:46:34 UTC
Retrieve value problem
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
Re: Retrieve value problem
Posted by Joerg Heinicke <jo...@gmx.de>.
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>