Hi Calvin,

XForms unfortunately requires setting the action in the model (in
xforms:submission). For now, to get a single form to submit to
different URLs, you have at least the following options:

1. Dynamically generate the model, for example from XSLT. There, you
   can set any action you want. Instead of using a static XML file
   with the XForms model, generate the model dynamically from a
   pipeline. For example, setup the following in a pipeline:

<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="#blah"/>
<p:input name="config">
<xsl:stylesheet version="1.0">
<xsl:template match="/">
<xforms:model schema="oxf:/form/forecast-id.rng">
<xforms:submission method="get" action="{/my/custom/action}"/>
<xforms:instance>
...


2. Post-process with XSLT the <form action=""> generated by the XForms
   Output processor.

We've been thinking about adding special attributes (in a special
namespace) to the xforms elements to address that kind of issues
better.

I hope this helps,

-Erik

Calvin Smith wrote:
> Thanks for the helpful reply to my former question. Using xforms:caption
> instead of xforms:label solved the problem I was having, and I have the
> logger configured properly now.
>
> I have another question that I am hoping somebody can help me with. I need
> to customize the output of the xforms processor so that the html form that
> is output will post to a different URL. I have not been able to find the
> transform that is responsible for translating the xform into an html form,
> so the current output is just a form with no action or method attribute. I
> didn't see anything about customizing the output of the xforms processor
> in the xforms documentation, but I assume that there must be
> a way to get the output form to post to a different URL -- perhaps
> something I could add to my stylesheet, or a transform that I could alter.
>
> thanks,
>
> calvin
>
> --
> Calvin Smith
> Graduate Student Researcher
> School of Information Management and Systems
> University of California, Berkeley
> http://www.sims.berkeley.edu/~calvins/



Reply via email to