The Relax NG homepage lists the Sun RELAX NG Converter which apparently is able to convert an XSD file to a relaxng one - but the link is dead and a blog entry about secondary sources seems to be outdated as well.
I am not interested in a web-based converter.
Btw, the XML schema I want to convert uses inheritance.
Kohsuke Kawaguchi's Relax NG converter (aka the Sun Relax NG Converter) is currently available at http://java.net/projects/msv and http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.java.dev.msv%22 (thanks to KK for the information).
The old Sun RELAX NG Converter is nowadays bundled with the (Sun) 'Multi-Schema Validator' - msv. With that term you can search in your distributions package repository.
For example Fedora (e.g. 17) includes it.
# yum install msv-rngconv msv-manual
$ rngconv my.xsd > my.rng
Test the result:
$ xmllint --relaxng my.rng --noout some.xml
Conversion to compact syntax:
$ trang -I rng -O rnc my.rng my.rnc
(trang is also available via the main Fedora package repository)
The other way (perhaps after adding stuff to the compact syntax file):
$ trang -I rnc -O rng my.rnc my.rng
Msv seems to be quite powerful - I tested it with a fairly sized xsd file that uses inheritance, extensive patterns and includes another xsd 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