Hi -
I'm looking for a solution for a form handling problem. I'm beginner to cocoon
and would appreciate
any hint.
I extract an xml fragment like the following from a relational database. The
structure is
not static.
<asset>
<id />
<title />
<description />
<keywords>
<keyword>
<id/>
<word/>
</keyword>
</keywords>
</asset>
I would like to present the user a html form with checkboxes for each element
in the structure. The generation of this form via xslt is easy and no problem.
To make the form elements (checkboxes) unique, I use
<xsl:number level="multiple"...
to name the checkbox fields.
The problematic part for me is the form submission. I would like to get an xml
struct
like...
<asset read="true">
<id read="false" />
<title read="true" />
<description read="true" />
<keywords read="true">
<keyword read="true">
<id read="false"/>
<word read="true" />
</keyword>
</keywords>
</asset>
with the attribute values set according to the checkboxes. I would like to
write this
XML fragment as a blob back to the database.
How could this be accomplished with cocoon in a generic way - the
structure/elements
are dynamic and may change.
Writing an action with a DOM tree of the structure seems not very effective to
me.
Writing a custom transformer which fills in the form values to the source
structure
seems to be one solution, but how could I store the complete XML fragment in
the database
when using a SAXTransformer.
Is there a more elegant solution?
Tanks - regards -
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]