- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Fri, 6 Jan 2006 18:51:44 -0000
- 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: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" > <head> <title>Lazy Authoring</title> <xf:submission action="http://example.org/search.asp" method="get" /> </head> <body> <xf:input ref="fn"> <xf:label>First Name:</xf:label> </xf:input> <xf:input ref="sn"> <xf:label>Surname:</xf:label> </xf:input> <xf:output value="concat(fn, ' ', sn)"> <xf:label>Your full name is:</xf:label> </xf:output> </body> </html> Unfortunately you can't do this, and instead you have to wrap the submission in a model: . . . <title>Lazy Authoring</title> <xf:model> <xf:submission action="http://example.org/search.asp" method="get" /> </xf:model> . . . 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 Mark Birbeck CEO 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 http://www.formsPlayer.com/
Received on Friday, 6 January 2006 18:52:10 UTC