I'm trying to get clear on how a pipeline called on an page-flow
"action" element relates to (1) the instance form content for that page and (2) the instance for content for the result page. So, given: Page 1 form instance of (assume that the content of "selection" is the result of user action and an xforms "setvalue" element): <instance> <selection>XMLEditor</selection> </instance> An action that is called: <action when="/instance/action = 'next'" action="/ToolEvalApp/searchEvaluation2/search.xpl"> <result page="page2" transform="oxf:xslt"> <search1 xsl:version="2.0" xmlns=""> <xsl:copy-of select="doc('input:action')/" /> </search1> </result> </action> (Yes, I know I haven't specified what "search.xpl" has in it, but I can't get anything in it to work so imagine something simple, like some xslt transformation that takes "XMLEditor" and rewrites it as, say, "xml editor".) My question is: what is informing what here? Is the pipeline "search.xpl" informed by the result of the xslt transformation in the <result> element? Or is it the other way round, so that the result of the pipeline informs the xslt transform in the <result> element? When page2 comes up, what will be available to it: the result of the pipeline or the result of the xslt transform in the <result> element? Thanks, Don -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Don,
> I'm trying to get clear on how a pipeline called on an page-flow > "action" element relates to (1) the instance form content for that page > and (2) the instance for content for the result page. So, given: > > Page 1 form instance of (assume that the content of "selection" is the > result of user action and an xforms "setvalue" element): > > <instance> > <selection>XMLEditor</selection> > </instance> > > An action that is called: > > <action when="/instance/action = 'next'" > action="/ToolEvalApp/searchEvaluation2/search.xpl"> > <result page="page2" transform="oxf:xslt"> > <search1 xsl:version="2.0" xmlns=""> > <xsl:copy-of select="doc('input:action')/" /> > </search1> > </result> > </action> > > (Yes, I know I haven't specified what "search.xpl" has in it, but I > can't get anything in it to work so imagine something simple, like some > xslt transformation that takes "XMLEditor" and rewrites it as, say, "xml > editor".) > > My question is: what is informing what here? Is the pipeline > "search.xpl" informed by the result of the xslt transformation in the > <result> element? Or is it the other way round, so that the result of > the pipeline informs the xslt transform in the <result> element? What happens, in order: o An XML submission occurs on the page. This can be an internal (within the PFC) or external (e.g. HTTP POST) submission, see: http://www.orbeon.com/ops/doc/reference-page-flow#xml-submission Either way, this results in an XML document being submitted to a particular path handled by the PFC. o Note that this XML submission, for historical reasons (XForms was tied to the PFC in 2.8 and earlier), is usually referred to as "instance" in PFC pipeline inputs. o <action> sections test their XPath expressions on the submitted XML document. The first matching action, if any, is selected. o The selected <action> section's "action" pipeline, if any, is run. Its "instance" input receives the submitted XML document. o If the action pipeline has a "data" output, that "data" output is fed to the <result> sections. o <result> sections test their XPath expressions on the document produced by the action pipeline on its "data" output. The first matching result, if any, is selected. o If the selected <result> section contains a transformation, that transformation is used to build an internal XML submission that will be sent to the resulting page, here "page2". So the bottom line: the result of the action pipeline may be used by the XSLT transform in the <result> element by using doc('input:action'), *not* the other way around. > When page2 comes up, what will be available to it: the result of the > pipeline or the result of the xslt transform in the <result> element? The result of the XSLT transform. Things are reasonably easy once you understand that the intent of the transform on the <result> element is just to allow doing the equivalent of an HTTP POST from within a page flow. This is what we call an "internal" submission. I hope this is now clearer ;-) -Erik -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Smith, Donald
Erik,
Yes, thanks. That helps. I'm now able to run a pipeline as I should be able to. Now, if you could clarify something else. It seems that sometimes in a pipeline the input to the pipeline must be named "instance" and sometimes not; likewise with outputs: sometimes it must be named "data" and sometimes not. Believe it or not, I have actually read and re-read the documentation many times, and I just can't get clear on when/why names for pipeline inputs and outputs are already designated, and when they may be user defined. Any light you can shed on this will be much appreciated. Thanks, Don -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Monday, April 10, 2006 8:26 PM To: [hidden email] Subject: Re: [ops-users] Understanding action pipeline and form content Don, > I'm trying to get clear on how a pipeline called on an page-flow > "action" element relates to (1) the instance form content for that page > and (2) the instance for content for the result page. So, given: > > Page 1 form instance of (assume that the content of "selection" is the > result of user action and an xforms "setvalue" element): > > <instance> > <selection>XMLEditor</selection> > </instance> > > An action that is called: > > <action when="/instance/action = 'next'" > action="/ToolEvalApp/searchEvaluation2/search.xpl"> > <result page="page2" transform="oxf:xslt"> > <search1 xsl:version="2.0" xmlns=""> > <xsl:copy-of select="doc('input:action')/" /> > </search1> > </result> > </action> > > (Yes, I know I haven't specified what "search.xpl" has in it, but I > can't get anything in it to work so imagine something simple, like some > xslt transformation that takes "XMLEditor" and rewrites it as, say, "xml > editor".) > > My question is: what is informing what here? Is the pipeline > "search.xpl" informed by the result of the xslt transformation in the > <result> element? Or is it the other way round, so that the result of > the pipeline informs the xslt transform in the <result> element? What happens, in order: o An XML submission occurs on the page. This can be an internal (within the PFC) or external (e.g. HTTP POST) submission, see: http://www.orbeon.com/ops/doc/reference-page-flow#xml-submission Either way, this results in an XML document being submitted to a particular path handled by the PFC. o Note that this XML submission, for historical reasons (XForms was tied to the PFC in 2.8 and earlier), is usually referred to as "instance" in PFC pipeline inputs. o <action> sections test their XPath expressions on the submitted XML document. The first matching action, if any, is selected. o The selected <action> section's "action" pipeline, if any, is run. Its "instance" input receives the submitted XML document. o If the action pipeline has a "data" output, that "data" output is fed to the <result> sections. o <result> sections test their XPath expressions on the document produced by the action pipeline on its "data" output. The first matching result, if any, is selected. o If the selected <result> section contains a transformation, that transformation is used to build an internal XML submission that will be sent to the resulting page, here "page2". So the bottom line: the result of the action pipeline may be used by the XSLT transform in the <result> element by using doc('input:action'), *not* the other way around. > When page2 comes up, what will be available to it: the result of the > pipeline or the result of the xslt transform in the <result> element? The result of the XSLT transform. Things are reasonably easy once you understand that the intent of the transform on the <result> element is just to allow doing the equivalent of an HTTP POST from within a page flow. This is what we call an "internal" submission. I hope this is now clearer ;-) -Erik -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Smith, Donald wrote:
> Now, if you could clarify something else. It seems that sometimes in > a pipeline the input to the pipeline must be named "instance" and > sometimes not; likewise with outputs: sometimes it must be named > "data" and sometimes not. > > Believe it or not, I have actually read and re-read the > documentation many times, and I just can't get clear on when/why > names for pipeline inputs and outputs are already designated, and > when they may be user defined. Any light you can shed on this will > be much appreciated. That's an easy one: o Pipelines _called by the PFC_ follow a naming convention for inputs and outputs. This is where you use "instance" and "data". "instance" is used for the submitted XML document, and "data" is used to pass data between action, model, view, and epilogue pipelines. o Your own pipelines just have to follow your own convention. This is no different from functions or methods/interfaces in other programming languages: if your API requires me to provide a callback function, I better make sure that the function I provide takes and returns the paramters you are expecting. This is exactly how it works with the PFC: it expects a "view" pipeline, for example, to have an "instance" input, a "data" input, and a "data"output. Now if you write a pipeline, say save.xpl, and you call that pipeline from another pipeline, you are free to define the names of the inputs and outputs of that pipeline, as long as you use the same names when you call it. Anyway here the important part is to understand that the naming convention is strictly PFC-related. XPL the pipeline language does not itself know about any such convention. -Erik -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |