Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toolkits or Applications That Build UI From Xsd

I need to build a user interface to edit and create xml documents that conform to a given xsd schema. What I'd like to do is, as far as possible, generate my user interface based upon that xsd schema. The xsd schema can (and will) change over time and so the solution needs to be somewhat flexible.

The user interface needs to be a web UI and, ideally, one built with ASP.NET MVC.

I suspect that this is a tall order and not one that can be fully addressed by a toolkit or library, but I'm interested to know if anyone else has gone down this path and succeeded (or failed) and whether they used particular libraries, toolkits or approaches that helped. I've started to look at T4 templates as an approach, and feel that this will get me a lot of the way, but don't want to commit to this if there are easier approaches.

like image 858
Martin Peck Avatar asked Nov 06 '09 01:11

Martin Peck


2 Answers

I've built an engine that does something very similar to what you are describing but instead of using XSD, the schema was defined in JSON Schema and the interface rendered in the browser using the Ext JS framework.

It is pretty intense JavaScript but the benefits have been enormous for us in terms of time saved during development and maintenance.

I don't know if there is a tool that does exactly what you require, but the easiest path is to find a flexible, solid GUI framework (such as Ext JS, YUI, Dojo, etc) and map each type in your XSD to a 'widget type' in the GUI framework. You will have to basically keep 'pre-configurations' for each of those types and apply them as you parse the XSD. At a conceptual level, it's actually quite simple.

JavaScript turned out to be a fantastic language for such a task because of its dynamicity.

like image 71
neonski Avatar answered Sep 25 '22 23:09

neonski


Do you mean something like this? This is an approach that I used in one of my projects to convert my xml's via an xsd to xhtml. It was quite flexible for my project.

like image 25
Swati Avatar answered Sep 26 '22 23:09

Swati