cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: Silly Questions NO1: what does woodybinding do?
Date Fri, 30 Apr 2004 06:57:07 GMT


lechael wrote:

>>the source/target appointment (where xml is loaded and saved) is not
>>part of the binding, the binding works on the DOM-tree, other parts of
>>the app need to load/save that from/to actual files.
> 
> 
> Then which "DOM-tree" it works on? the form definition's? or future data
> files?
> 

it works on the DOMtree handed by loadDocument(documentURI).


have you checked the js- script I mentioned?
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/flow/form_model_gui.js?rev=1.3&view=auto

     var documentURI = cocoon.parameters["documentURI"];

     // parse the document to a DOM-tree
     var document = loadDocument(documentURI);



this means the documentURI is provided by the call from the sitemap:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/sitemap.xmap?rev=1.7&view=auto

   <map:match pattern="form_model_gui.flow">
     <map:call function="handleForm">
       ...
       <map:parameter
         name="documentURI"
         value="forms/form_model_gui_data.xml"/>

as you can see in the script the makeTargetURI function will save to the 
[originalDucmentURI]-result.xml version of the original.

HTH,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message