W3C home > Mailing lists > Public > www-forms@w3.org > September 2003

RE: New to XForms - having difficulty

From: Mark Birbeck <Mark.Birbeck@x-port.net>
Date: Tue, 23 Sep 2003 18:40:49 +0100
Message-ID: <E3ED00A7C285EE408679DE2A26D1C7810148F75B@S007.x-port.net>
To: "'Allen.P.Holtz'" <allen.p.holtz@nasa.gov>, www-forms@w3.org

Hi Allen,

> First, in the model I am defining the submission.  It looks something
> like this:
>
> <xform:submission action="request" id="submit1" method="post"/>

This will submit your instance data to a URL that is based on the current
document, and ends with "request".

> Initially, it appeared that the action attribute was defining a file on
> the web server that would be executed upon submission by the user.
> After I read the specs I'm not so sure that's the case anymore.

I'm not sure where the confusion has come from. If you go to:

    <http://www.w3.org/TR/xforms/slice3.html#structure-model-submission>

you'll see that the spec says:


    action
      Required destination URI for submitting instance data.


Whether the URI referred to is a "file on the web server that would be
executed" depends on what you are trying to do - but it is definitely a
reference to a location.

> Later on in my document I have the following:
>
>  <xform:submit>
>      <xform:label>Submit Scenario</xform:label>
>   </xform:submit>

The submit element needs to know what submission it is firing:

    <http://www.w3.org/TR/xforms/slice8.html#ui-submit>

so this won't work. To refer to the previous submit element, you need:

   <xform:submit submission="submit1">
       <xform:label>Submit Scenario</xform:label>
    </xform:submit>

> What kind of file is this request file that is listed in the action
> attribute?

It's a URI ... so it could be anything! All that it means is that your
instance data will be 'transferred' to the URL in @action. Whether it's a
CGI script, a Java applet, an ASP script or whatever, is up to how you
specify it, and what the particular XForms processor you are using supports.
As described in the spec, it could even be an email or a local file. (Note
that HTML forms are no different here - they also send data to a URL,
without caring what is at that URL).

> All I want to do is get the XML data into a file for now.

If you're sending to a server, then it is still up to the server whether it
will create a file from your data or not. If you want to create a file
locally then you can do that. The following sample shows how to do this, as
well as submitting to a server:

    <http://www.formsplayer.com/community/samples/OffLine/index.html>

Regards,

Mark

Mark Birbeck
Co-author Professional XML and
Professional XML Meta Data,
both by Wrox Press

Download our XForms processor for IE6
from http://www.formsPlayer.com/

Managing Director
x-port.net Ltd.
4 Pear Tree Court
London
EC1R 0DS

E: Mark.Birbeck@x-port.net
W: www.x-port.net
T: +44 (20) 7689 9232
Received on Tuesday, 23 September 2003 13:42:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:56 GMT