nunojob:~ dscape/08$ echo The Black Sheep

Posts tagged ‘xhtml’

Creating a User Interface for XML Schema using xForms

We use XSLT all the time to convert a XML document into another format. XML Schemas are XML documents and I think it would be interesting to create the user interface and model for that specific schema using xForms. This would drastically decrease development time and would allow a quick view on what that XML Schema is all about. In other words, this would do for xForms what JAXB does for Java.

Why xForms? xForms is W3C recommendation for creating user interfaces and it’s based on the MVC pattern. This is enough to convince me, I’m all for standards.

While researching I found some works on this subject [here, here] but they are mostly on conference proceedings and therefor I thought no one had really implemented a Generic Schema to xForms transformation engine. Before giving up I asked Vítor Rodrigues about this, as IBM is know for their XML Alphaworks. Guess what? Now I have the solution.

Here’s what you need create an xForm from a Schema:

  • Download Eclipse WTP
  • Open Eclipse and browse to Help > Software Updates > Find and Install
  • Click New Remote Site
  • Name: Emerging Technologies Toolkit (ETTK) Updates
  • Select it and click Finish
  • Now select Emerging Technologies Toolkit (ETTK) Updates > Emerging Technologies Toolkit – Technologies > Visual XForms Designer
  • Click next.
  • Accept the license, install the software and restart eclipse.

Now for the Visual XForms Designer I made a little screen-cast. Just click here to see it.


xForms Resources

We will post a xForms/METS/DB2 screen-cast in this website soon. To get you prepared for this I advice you to download this firefox plugin and read the following articles:

In case you are looking for good examples you can visit this wikibook or better yet… Open your console, and create a directory in your home folder. Enter the folder and write this:

svn checkout xforms-examples-read-only

These are some great samples from Google Code. Believe me I’m saving you time with this advice. You won’t need to spend hours on badly executed examples from companies that are supposed to be building xForms implementations. Outch!?