W3C home > Mailing lists > Public > www-forms@w3.org > January 2006

RE: empty instance generates link exception?

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Fri, 6 Jan 2006 18:51:44 -0000
Message-ID: <905A89D3-7696-4585-BBC2-D820F68F7A23@s15.mail.x-port.net>
To: "'Aaron Reed'" <aaronr@us.ibm.com>
Cc: <www-forms@w3.org>

Hi Aaron,

> I thought that this shouldn't work because you have no model. 
>  I know that you can lazy author instance, but I didn't think 
> that you could lazy author the model along with it.  Can you 
> lazy author a model or did you just miss the model element 
> when you authored the example?

No, those examples are fully working examples (minus the formsPlayer
object/import tags, so as not to detract from the markup). There is no need
for an empty model element.

Which reminds me of something I thought of ages ago, which is that it would
be great if we allowed xf:submission outside of the model. This is because
the next step on from the example I gave before would be to send the data to
a server, ideally like this:

      <title>Lazy Authoring</title>
      <xf:input ref="fn">
        <xf:label>First Name:</xf:label>
      <xf:input ref="sn">
      <xf:output value="concat(fn, ' ', sn)">
        <xf:label>Your full name is:</xf:label>

Unfortunately you can't do this, and instead you have to wrap the submission
in a model:

      <title>Lazy Authoring</title>

It's not a lot of work, but I think it's a shame because at this point in a
new user's initiation into the world of XForms, there is no need to learn
about models; even if you were to only use the following XForms features:

  * the various input controls;
  * hints and help;
  * xf:submission;
  * xf:output with @value;
  * ... and of course, 'lazy authoring'

you would already be able to create forms that can do more than the vast
majority of current HTML forms, and you could do it with not a single line
of script.

(And if anyone is wondering how come the submission in this example works,
recall that the default for xf:submission/@ref is "/", and thanks to the
'first model, first instance' rule this will select the root node of the
instance that was automatically created by 'lazy authoring'.)

Best regards,


Mark Birbeck
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/

Download our XForms processor from
Received on Friday, 6 January 2006 18:52:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:16 UTC