Generate a form from an XSD Schema

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Generate a form from an XSD Schema

hokkos
Hi,
is it possible to generate automatically a form from an XSD schema ?
I see there is an Add Schema in an option of the form builder tool but it seems only limited to simple type validation with some inputs.

If there is no such functionality, is there a way to load an xform to be executed by the form runner ? Because the xform engine seems less aesthetic.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

Erik Bruchez
Administrator
Simple answer: no and no.

Longer answer:

1. That would be nice, and in fact we have hoped to have this for a long time, but it hasn't materialized yet.

2. This would be possible if you can manage to convert your plain XForms to something compatible with what Form Runner expects, including: instance names, sections, grids, etc. In short something that looks like this template:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/forms/orbeon/builder/form/template.xml

or the sample form definitions here:

https://github.com/orbeon/orbeon-forms/tree/master/data/orbeon/fr/orbeon

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

hokkos
Have you ever looked the Alfresco Schema2XForms tool ?
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

Erik Bruchez
Administrator
I have to say that we haven't. Does anybody have experience with it?

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

Eric van der Vlist
Le vendredi 07 mars 2014 à 11:12 -0800, Erik Bruchez a écrit :
> I have to say that we haven't. Does anybody have experience with it?

There is a number of projects that does so, see for instance
http://sourceforge.net/projects/wsdl2xforms/ which has been used on a
large scale with Orbeon Forms in Estonia.

The criticism we can do to this approach is that designing a schema
isn't the same thing as designing a form: fields must often be presented
in a different order than they appear in the schema (or be omitted) and
you may also want to implement several different forms for a single
schema.

For these reasons you may prefer to generate forms from higher level
models than schemas.

Concerning Form Runner, the structure of the form makes it quite easy to
generate forms.

We have presented a project that does this kind of things at Balisage
last year, see
http://balisage.net/Proceedings/vol11/html/Cotton01/BalisageVol11-Cotton01.html

Hope this helps,

Eric

> -Erik
>
> --
> View this message in context: http://discuss.orbeon.com/Generate-a-form-from-an-XSD-Schema-tp4658077p4658091.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

Ethan Gruber
In reply to this post by hokkos
I plan to play around with schematron or a combination of schematron and an RDF ontology to generate a form. Someone mentioned it on the list a few years ago, but I don't know if it moved forward. If I'm moderately successful implementing schematron, I'll report back.

I think Eric's point is valid: if you could dynamically generate a form from XSD, would that form be user-friendly? I think you have to carefully balance usability with automation.

Ethan

On Friday, March 7, 2014 12:00:25 PM UTC-5, Arnaud M wrote:
Have you ever looked the Alfresco  Schema2XForms
<<a href="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fsvn.alfresco.com%2Frepos%2Falfresco-open-mirror%2Falfresco%2FHEAD%2Froot%2Fprojects%2Fweb-client%2Fsource%2Fjava%2Forg%2Falfresco%2Fweb%2Fforms%2Fxforms%2FSchema2XForms.java\46sa\75D\46sntz\0751\46usg\75AFQjCNFi_q1M9JF8sD33KqiDQZY2rDboGg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fsvn.alfresco.com%2Frepos%2Falfresco-open-mirror%2Falfresco%2FHEAD%2Froot%2Fprojects%2Fweb-client%2Fsource%2Fjava%2Forg%2Falfresco%2Fweb%2Fforms%2Fxforms%2FSchema2XForms.java\46sa\75D\46sntz\0751\46usg\75AFQjCNFi_q1M9JF8sD33KqiDQZY2rDboGg';return true;">https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java>
tool ?

--
View this message in context: <a href="http://discuss.orbeon.com/Generate-a-form-from-an-XSD-Schema-tp4658077p4658088.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FGenerate-a-form-from-an-XSD-Schema-tp4658077p4658088.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHS--h2fTeoxuHvFVy1LVDObpiggg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FGenerate-a-form-from-an-XSD-Schema-tp4658077p4658088.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHS--h2fTeoxuHvFVy1LVDObpiggg';return true;">http://discuss.orbeon.com/Generate-a-form-from-an-XSD-Schema-tp4658077p4658088.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Generate a form from an XSD Schema

Erik Bruchez
Administrator
I don't think the form would be user-friendly at all. But that in itself doesn't invalidate the idea: the form generated can be a starting point. This makes sense especially with Form Builder.

-Erik