Hi, I am looking for a way to pass the data from a form builder form to a XSLT stylesheet. I see you can set source controls within the service request values section in the actions editor. What i was looking to do is send the entire form as an input to a form runner application that will run the transform and return the result that form builder will display inside of a text output control. Has anyone else attempted to do this or is there a better way to accomplish the same thing? Thanks, Jim -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Jim,
I don't quite understand the scenario you describe here. When would the data be passed to the XSLT stylesheet? Would that be done when the form is submitted by a then end-user who fills out the form? What would happen with the result again? Alex |
Alex:
Here is the overall scenario: Using a Form Builder defined form and Form Runner on the server side (standard Orbeon architecture) a user enters data in a form and populates the form instance. This instance conforms to XSD-1. We need to use the instance data to create an alternative XML document that conforms to XSD-2, which is the required XSD for sharing the data, but is too complex for the form instance. We will store the two versions of the data in two eXist collections (data_XSD-1, data_XSD-2). We have considered two approaches (with slightly different user presentations but same end result): 1) Use the form to build the instance; when the form "save" action is invoked submit/save data_XSD-1.xml; retrieve and pass data_XSD-1.xml as data to a FR XSLT process and generate data_XSD-2.xml; save data_XSD-2.xml. (Note: this requires knowing the eXist generated UUID for data_XSD-1.xml - do not know how get this value from the FR persistence API.) 2) Use the form to build the instance; when the form "transform" action is invoked pass data_XSD-1.xml as data to a FR XSLT process; generate data_XSD-2.xml and return it to the form for inspection in a multiline text control; when the form "save" action is invoked save data_XSD-1.xml and data_XSD-2.xml to their respective collections. (Note: it is not obvious from the documentation how to pass the entire instance as a parameter to the service. Individual control values can be passed by setting the Service Request values. Do we need to create a multiline text control that contains the entire instance and then use that as the single value being passed to the service?). We would like to know how to perform both #1 and #2, and guidance or pointers to specific exemples/documents would be most appreciated. Thanks in advance.
|
Administrator
|
Jim,
Let me see if I got this right: Are you saying that when an end-user saves the form, Form Runner write an XML in your-app/your-test/data/some-uuid/data.xml, but you would also like to run you XSLT and have along data.xml another file data-2.xml (which is data.xml transformed by your stylesheet)? Right now in Form Builder, when you define an HTTP Service, you can give the "prototype" of a document that will be POSTed to the service. Then you can have actions that set the content of nodes in your prototype document with values of controls before submitting it to your service. So with the Form Builder HTTP Service UI, you can't submit the whole instance to a service. But you could easily write (Advanced / Edit Source) your own <xforms:submission> that does that. Alex |
Free forum by Nabble | Edit this page |