Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Fwd: Re: [lepido-dev] Auto Generating forms from XSD]

Sylvain Wallez wrote:
Max, I forwarded your message to lepido-dev, where the discussion happens.

(I've CC'd Max. Max if you are subscribd to the Lepido list let me know, I'll stop CC'ing you)

So, to the core... We have a thing which transforms XSD plus some extra information (everything you can't express in a schema without using xs:annotation, we call it "business logic") to a full form definition/binding. A template is written seperately with a few extra helpers (i.e. you don't have to write down repeaters and such, only layouts per element). Since we wanted a XML-centric xml editor in cforms, we reference the widgets with xpaths. I also wrote a flowscript function to navigate the widget tree in an xpath-like fashion (a bit hard since widget id's are autogenerated from xpaths), so event handlers are also within the xml context.

However, there are many things which can be improved (as always). Right now, its a bunch of big monster XSLs, but I would like it to become another way to define cforms, i.e. implement it in java as another builder heirarchy, or at least a proper transformer/generator to output cforms xml, which would make things much easier.

I'm working on this kind of thing at the moment as well. My current starting point is your original XSL posted on the Cocoon wiki. However, if you have something better now, would you consider sharing that?

I don't have loads of time at present, but what time I do have is going into this. Maybe I can help realise some of your objectives.

If you are willing to share the code, I'm not sure where you would like to house it. My intention is to build a set of wizards within Lepido to faclitate the creation of a CRUD application. I suspect most of my focus would be on that work, rather than the XSLs, but you never know what gets uncovered durin this kind of work.

And it doesn't cater at all to CRUD. CRUD is storage dependent, though... so it's not really in the scope of cforms.

Yes, I agree. I see that as being the "split" between your XSLs and my Lepido wizards.

It would be cool though to dynamically generate flowscript(crud) and forms from mysql tables, possibly even beans? (for JDO), and get a bit of the edge back from ruby on rails ;) should be rather easy with a custom "scaffold" generator, to put it into RoR terms.

My initial focus is XSD decriptions (we have a whole bunch of them needing CRUD applications). However, I would hope that the wizards could be extended to do the same from other data definitions, such as SQL or even beans.

Would be nice to make it "right" though... I'm such a perfectionist... ;)

I'd like to try and help get it "right", it's a question of if we can collaborate and where to host that (Lepido, Cocoon, other?). The wizards will be here in Lepido but the XSL?

Ross


Back to the top