Hello Cocooners,
I have a simple problem filling the values of my form fields.
As it seems to be rather common and oft occuring problem i hope somebody knows a
solution.
I have a form described in XML file test.xml (used with Stylebook
Stylesheets) :
---
<form name="testform">
Text:<text name="city" size="20"/>
</form>
---
I also have an Cocoon Action "GetCityAction" which sets the parameter
"city" in the sitemap.
I want the user to see the current value of the field "city" in browser, so
the content of test.xml must be changed to
---
<form name="testform">
Text:<text name="city" size="20" value="cologne"/>
</form>
---
before passing it to Stylebook stylessheets transformer.
Is there some elegant way to do it?
I know that could be achieved by writing a stylesheets like
----
<xsl:param name="city"/>
<xsl:template match="text">
<xsl:if test="@name='city'">
<text name="city" size="@size" value="$city" />
</xsl:if>
....
</xsl:template>
----
and sitemap like:
<map:act type="GetCityAction">
<map:generate src="test.xml">
<map:transform src="stylesheets/apache.xsl">
<map:parameter name="city" value="{city}" />
</map:transform>
...
</map:act>
---------
but i don't want to change my stylesheets every time i add a new
variable to the form.
--
Andrei Svirida, Projekte & Entwicklung
MIDRAY GmbH - a debitel company
Phone: +49.221.8884 435
Fax: +49.221.8884 455
http://www.midray.com/
---------------------------------------------------------------------
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]>