On 6/4/06, Nestor Urquiza <[EMAIL PROTECTED]> wrote:
I need to be able to include xml chunks from several entity xml files
into a a master one that is supposed to be shown to users.

Those users should be able to edit the final xml file but when doing
so they should be actually updating the chunks.

This is two issues:
1. Create form displaying data from several XML files.
2. Save data from the submit of that form to several XML files.

I am just trying to reuse any work already done about this problem. I
can use XInclude to get the books chunks into the libraries and
bookstores files. I can use XSLT to present a pretty form to the user
and then whenever the user hits submit for a change I can use XUpdate
if I maintain somewhere the XInclude rules just to know what to update
but too much custom code for something that maybe is already
integrated in Lenya.

It sounds like you have solved #1.  map:aggregate, xinclude, and
cinclude all merge data from several XML files.  I prefer
map:aggregate except when it is not possible, then switching to
CInclude.  (CInclude is Cocoon's improvement of XInclude.)  If you
have that working, do not change it.

For #2:
- Lenya/Cocoon can save data to several files.  Generate XML that
includes the data, and list of targets, and the XML of the targets.
Transform to the format for the "write-source"
SourceWritingTransformer.  Either update entire files, or use
source:replace to make individual updates.  Then call the
SourceWritingTransformer.

The official documentation is at:
http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html

You can look at Lenya's xslt/authoring/edit/addSourceTags.xsl.  Do not
use it because it adds tags to write the data to only one file, but it
demonstrates how to create input for the SourceWritingTransformer.

- Flow can write many files (and do almost anything else) using
JavaScript programming.  The process is get the data changes, pick a
target file, load it, change it, save it, and repeat for next target.
Use it only if something is not possible with just transformation and
SourceWriting.

solprovider

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

Reply via email to