- From: Alessandro Triglia <sandro@mclink.it>
- Date: Tue, 1 Aug 2006 18:14:09 -0400
- To: <mark.birbeck@x-port.net>, <www-forms@w3.org>
Hi Mark, This sounds like a great idea. I was thinking more in "static" terms, but deferred loading is more interesting than static aggregation and covers even more use cases. Did you say you are going to implement this? Thanks! Alessandro > -----Original Message----- > From: www-forms-request@w3.org > [mailto:www-forms-request@w3.org] On Behalf Of Mark Birbeck > Sent: Tuesday, August 01, 2006 17:59 > To: www-forms@w3.org > Subject: Re: Reusing a form in another form > > > Hi Alessandro, > > > Is there a recommended technique for reusing small forms as > components of a > > larger form? > > Well that's a coincidence! We have just recently implemented exactly > this feature, in a few different ways. > > The easiest is to use XInclude in the source document, but this means > you need to pre-process the document. We've been doing that for one of > our projects, but recently added XInclude support to the client > software too. > > However, the main use-case for this project was that of 'deferred > loading'; we wanted to load sub-forms as the user moved around the > form, for example loading different cases as the user toggled a > switch. The idea is that even over slow network connections the user > will experience a quick initial load of the form. (The alternative is > to hop from form to form, but we don't want to do that for obvious > reasons.) > > This last technique is fairly easy to implement, provided that the > XForms processor can dynamically add controls after the form has been > loaded. Also, there's nothing in the XForms spec to prevent xf:model > from appearing anywhere in the document too (which some people might > have trouble with philosophically!), which has allowed us to create > complete sub-forms that we can re-use in many situations. > > To allow the author to indicate where to get the 'sub-form' from, > where to put it once it has been loaded, and when to do all of this, > we currently use xf:load with the addition of the "embed" XLink value > and a @target attribute. > > This is, of course, non-standard, and we're still experimenting, but > the main point is that it's an incredibly powerful feature, and > somehow or other it should be supported. > > Regards, > > Mark > > > On 01/08/06, Alessandro Triglia <sandro@mclink.it> wrote: > > > > Hi > > > > > > For example, I could have a "credit card information" form > which could occur > > as a component of many (larger) forms. > > > > Of course, I could cut-and-paste the relevant instance fragment, > > cut-and-paste the relevant model elements (binds etc.), and > cut-and-paste > > the form controls (e.g., a single group or switch control). > But I would > > hope there is a better way of building a larger form by > aggregating smaller > > forms. > > > > Alessandro > > > > > > > > > > > > > -- > Mark Birbeck > CEO > x-port.net Ltd. > > e: Mark.Birbeck@x-port.net > t: +44 (0) 20 7689 9232 > w: http://www.formsPlayer.com/ > b: http://internet-apps.blogspot.com/ > > Download our XForms processor from > http://www.formsPlayer.com/ > >
Received on Tuesday, 1 August 2006 22:15:54 UTC