On Mon, 20 Oct 2003 09:59:19 -0500, jcplerm wrote:
> Is there a way of having a Woody form being populated through the binding
> framework in a way that the form involves just a subtree of the original
> XML doc?
>
> For instance, given the following complete XML doc:
>
> <root>
> <elem id="100">
> <name>name100</name>
> <address>address100</address>
> </elem>
> <elem id="101">
> <name>name101</name>
> <address>address101</address>
> </elem>
> <elem id="102">
> <name>name102</name>
> <address>address102</address>
> </elem>
> </root>
>
> I would like a form to edit the just the subtree located by
> "/root/[EMAIL PROTECTED]'101']".
>
> Can the binding definition file somehow be parametrized, or can something
> along these lines be done?
It is possible to parametrize the binding file by filtering it through a
JXTemplateGenerator for example. Here is an outline of the solution :
In your sitemap, pass a form binding uri with value="cocoon:/bind_with"
The matcher for bind_with generates:
<map:generate type="jx" src="form_bind.jx">
<map:parameter name="parentpath"
value="[EMAIL PROTECTED]"/>
and in your form_bind.jx repeater, you will have :
parent-path="${parameters.getParameter('parentpath')}"
-Kamal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]