You can trigger the conversion from that web page using the demonstration block below. However if your schema is big, I recommend you to download XSDtoRNG.xsl and make the conversion locally with any standard XSLT API.
Follow the steps :
XSD is a complex language of XML specification and lots of its markups are, in my opinion, useless. RelaxNG has been created by specialists of XML technologies, at a moment when XML has became a lot more mature and a lot more used.
I think RelaxNG reduces the problem of complexity of XML specifications. And it also gives good habits which helps making better XML, like creating attributes nodes instead of surrounding any value by opening/closing markup.
That XSLT conversion may be less "exact" than a conversion performed by a Java API like Sun Multi-Schema Validator. But it will keep the original structure of your schema, which makes it simpler to correct visually, as it is often necessary. As a single XSLT file, it is also simple to use from any programming language.
XSD RelaxNG <schema> <grammar> <element> <element> (may be declared as a possible start, see below) <attribute> <attribute> <import>, <include>, <redefine> <include> <choice> <choice> <annotation> <documentation> <documentation> redundant with <annotation> <appinfo> children copied <union> <choice> <union memberTypes=""> <choice> then call the "type" template on each memberType <list> <list> <list itemType=""> <list> then call the "type" template on itemType <complexType name="">, <simpleType name="">, <group name="">, <attributeGroup name=""> <define> <*(default behaviour) ref=""> call the "type" template <sequence>, <complexContent>, <simpleType>, <complexType> useless <extension base=""> call the "type" template on base <any> <element> <anyName> <text> <anyAttribute> <attribute> <anyName> <text> <restriction> followed by <enumeration> <choice> <restriction base=""> call the "type" template on base <enumeration value=""> <choice> <value> <minInclusive>, <minExclusive>, <pattern>, ... <param name="minInclusive, ..."> <all> <interleave> <optional> @default on attribute <a:defaultValue> @default on element not supported in RelaxNG @use="optional" <optional> @maxOccurs="unbounded" @minOccurs="0" <zeroOrMore> @maxOccurs="unbounded" <oneOrMore> @minOccurs="0" <optional> @minOccurs="n" copies n times the template @type="anyType" <data type="string"> @type="xs:..." or @type="xsd:..." <data type=""> @type="...:type_name" <ref name="type_name"> @type="" <ref name="">
If the <xs:element> is directly under <xs:schema> then is is declared as a possible start
of the XML so the following RelaxNG is dumped :
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.