RE: Relation between XForms and schemas

Eric,

Where I work we produce schemas designed for b-to-b messaging. We have our own forms markup language that people use to build forms that bind directly to those structures. I have often thought that the mapping from the form to the end XML structures is too complex, and that it would be simpler to bind to a more form-like XML structure, and then transform that (i.e. do a two pass transform, rather than one pass). I have never had the opportunity to try this out though :-(

Past experience building forms over EDI messages has shown me that this approach can work very well. With EDI we had the advantage that we worked with a physical format and data structure so tuned to the purpose of messaging that it was clear very quickly that they were not appropriate for forms. We transformed the physical EDI to a more XML like format (this was before XML existed), and, while we were about it, we transformed the data structure to something more malleable. 

Unfortunately, in the world of ubiquitous XML it is no longer so obvious that information/data might require restructuring to more convenient for a particular context. It is, as you say, very tempting to try to use the same XML structures + schemas throughout a process. This is a shame, as transforming XML need not be an expensive operation.

The important thing is that meaning is not lost through transformation. When we transformed EDI messages (or anything else for that matter) we labelled each data item to make clear its meaning within the context of EDI. So EDI became a logical model, rather than a physical representation. Once we had done this, physical format wasn't so very important, beyond the operational requirements of whatever we were doing. 

However, we do now fully intend to publish both schemas and XForms models for our XML documents. This is not simply to allow people to build forms directly over our schemas, but because the XForms model provides us with a richer set of validity constraints than W3C XML Schema does on its own. We currently produce prose message implementation guidelines that set out all the  validation rules not expressed in our schemas, and intend these to be supplemented with XForms Models. We have found the XForms model to be very good at expressing those constraints that WSX cannot. We end up with a nice package of schema + extra rules.

We do also expect people to build forms over our XForms models. How easy that will be, only time will tell.    

To answer your direct question, I'm afraid I don't know about tools. However, we have certainly developed schemas at least partly from existing forms in the past, but this has always been done by hand, and indirectly, i.e. a form will be an input of a modelling process. 

All the best

Mark

The information in this email is sent in confidence for the addressee only and may be legally privileged.  Unauthorised recipients must preserve this confidentiality and should please advise the sender immediately of the error in transmission.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on its content is prohibited and may be unlawful.

Origo Services Ltd accepts no responsibility for any loss or damage resulting directly or indirectly from the use of this email or the contents. 

> -----Original Message-----
> From: www-forms-request@w3.org [mailto:www-forms-request@w3.org]On
> Behalf Of Eric van der Vlist
> Sent: 04 November 2003 10:33
> To: www-forms@w3.org
> Subject: Relation between XForms and schemas
> 
> 
> 
> Hi,
> 
> I am convinced that the decoupling between the form and the 
> schema is a
> good thing, however, when you start from scratch and need to produce
> both a schema and a form, it's tempting to derive them from a common
> source.
> 
> The dominant approach seems then to use the schema (eventually
> annotated) as a source and derive the form from that. It's 
> the approach
> take, for instance, by the Chiba project.
> 
> As noted [1] on this list, it is not necessary the best approach for
> large applications with complex forms.
> 
> [1] http://lists.w3.org/Archives/Public/www-forms/2003Feb/0014.html
> 
> I have no concrete experience on the subject yet, but I'd guess that
> when the form is complex, that its layout needs to be similar to
> existing documents and that the format of the resulting document is
> created from scratch, it's probably easier to use either the 
> form or an
> intermediate format as the source and to generate the schema.
> 
> Are there some experience and tools available using this approach?
> 
> Thanks,
> 
> Eric
> -- 
> Tired to type XML tags?
>                                                        
http://wikiml.org
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------

Received on Monday, 10 November 2003 03:34:47 UTC