Hi Alex,
Le vendredi 21 janvier 2005 � 01:06 -0800, Alessandro Vernet a �crit :
> --- Eric van der Vlist <[EMAIL PROTECTED]> wrote:
>
> > In page-flow.xml:
> >
> > <page id="apiculteur" path-info="/apiculteurs/apiculteur/([^/]*)/"
> > matcher="oxf:perl5-matcher"
> > xforms="xforms-model.xml" model="apiculteur.xpl"
> > view="apiculteur-view.xsl">
> > <param ref="/form/document-id"/>
> > </page>
> > ...
> > <page id="nouveau" path-info="/apiculteurs/nouveau"
> > xforms="xforms-model.xml"
> > view="xforms-view.xsl">
> > <action
> > when="/form/action = 'save' and
> > not(/form/document//[EMAIL PROTECTED]:valid = 'false' and
> > not(ancestor-or-self::[EMAIL PROTECTED]:relevant = 'false'])]) "
> > action="save-new-document.xpl">
> > <result page="apiculteur"/>
> > </action>
> > [...]
>
> Eric, inside the above <result page="apiculteur"/> you should use XUpdate
> to set /form/document-id on the target XForms instance. Then as
> /form/document-id comes from the URL in the target page, and the XForms
> instance is otherwise empty, the PFC will generate a nice URL
> /apiculteurs/apiculteur/your-doc-id/.
I can try that, but I had understood that the new instance was the
output of the action, that's why I had added this:
<p:processor name="oxf:identity">
<p:input name="data" >
<form>
<document-id>foo</document-id>
<action/>
</form>
</p:input>
<p:output name="data" ref="data"/>
</p:processor>
in the action, considering that since I want to replace the whole
instance by nothing else but
<form>
<document-id>foo</document-id>
<action/>
</form>
that would be easier like that than using XUpdate.
Isn't it the case?
Or, maybe I have chosen the wrong output (data) and should have used the
instance output instead (if it's available in an action, I haven't
tested yet)?
I think that what I do not figure out yet is the PFC flow when you add
actions (and results).
The diagrams in
http://www.orbeon.com/ois/doc/reference-controller#combinations are very
helpful when there is no action involved and I think that it would be
nice if you could show at which point actions and results are plugged
and which input and outputs are available for action pipelines!
Thanks,
Eric
--
Have you ever thought about unit testing XSLT templates?
http://xsltunit.org
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user