trang is a convertion-tool for schema-files. It can create RNG / XSD/ DTD from a XML-data-file, and it can convert from Relax NG or DTD to XML Schema.
Download: http://code.google.com/p/jing-trang/
For full manual see http://www.thaiopensource.com/relaxng/trang-manual.html
After 5 years there's an update available! version 20081028
Usage
The WYSIWYG-editor Bitflux is validing the input using the Relax NG definition.
Example to convert news.xsd to news.rng - that's not possible
Example to create news.rng from samples/news.xml
# path for lenya 1.2 cd pubs/PUBLICATION/LANGUAGE/config/doctypes/ # path for lenya 2.0 cd MODULENAME/resources/ trang -I xml -O rng samples/news.xml schemas/news.rng
Full syntax
trang [-I rng|rnc|dtd|xml] [-O rng|rnc|dtd|xsd] [-i input-param] [-o output-param] inputFileOrUri ... outputFile
Installation
Ubuntu Linux: download the zip from the authors website, because the trang-version what is in the Ubuntu-repository does not work (tested from 7.10 to 8.04LTS)
Discussion
I tested trang for Lenya 1.2 - works properly. --DanielBruessler
Question: Wouldn't it be cool to put trang into the tools/bin/ - folder of a lenya-bin-package?