I want to create GUI components from XSD files. The generated GUIs should be used for concrete xml instances of the corresponding schema with databinding to "interesting" elements or attributes content. I have considered these solutions:
jaxfront. (commercial tool). This does not generate source code. This is important for me because I want communication between the generated GUIs and other components of the GUI.
Use xsd2emf and try to generate an editor from that. The generated model is to complex, as well as the generated editor and it is buggy.
Do it myself e.g. generate an xml from the xsd, load xml as dom, select the interessting parts and generate data binding using one method described at http://www.vogella.de/eclipse.html.
Has anyone another idea or already successfully solved that problem? I would prefer a free open source solution which generates a SWT GUI.
To create it, select New -> Examples... to launch the wizard. Follow the instructions described in the wizard, then click Finish to create the example project. Once created, under the PublicationCatalogue folder, locate the Catalogue. xsd file and double click the file to open it in the XML Schema Editor.
Have you looked at the Sapphire framework at eclipse?
With it you have to create a model based on a few simple java interface files with some annotations that would model your XSD. Then once you have the model defined, you create the SWT GUI with a single xml file (sdef file) that wires various property editors to your model. The property editors can be simple widgets like label, text, lists, combo boxes but also it can be complex editors like a GEF-based diagram editor. So basically if you have a few interfaces that describe your model, then can have a graphical editor for editing nodes in that model with less than 100 lines of XML.
See lines 22 to 121 of this sample file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With