A XSLT transformation will be applied to the XML specification in order to create a XHTML form which will be inserted in the page.
That form can be filled and will generate XML respecting the structure of the starting specification.
More technical information can be found in the explanation text.
Here are the steps to follow :
In a second time, the values entered in the form generate the XML respecting that specification.
When facing XML specification the first problem I encountered is trying to reuse an existing standard. Reading (and understanding) a XML specification is very painfull, especially if it is written using XSD. RelaxNG does not solve that problem, but at least reduces the complexity of the schemas, and it also reduces a bit their verbosity.
So one first thing I wanted to do was to see a schema in the form of a form :-). That way I see the values which will be entered in that XML as input fields, with the markups around it. In a second time, I will also be able to generate an example of a XML which respects that specification.
If the input XML specification is a XSD schema, it will be converted into RelaxNG with a XSLT tranformation better described in XSD to RelaxNG section of that web site. Then the RelaxNG schema will be transformed into a XHTML form by another XSLT named RNGtoHTMLform.xsl. You will also find the correspondance table between the RelaxNG markups and what it creates in the form.
One important thing to understand about that form generation is that each input field of that form is marked with an attribute "name" which contains the XPath expression which points on that value in the XML.
The generated XML can be validated with a call to the server which will use a classic XML API.
All those developments are released under Cecill licence.
The project Forms Generator is available on a svn, contact me for more information. In the future, a project might be created on sourceforge.