Question

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.

Was it helpful?

Solution

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).

OTHER TIPS

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.

Install on Fedora

# yum install msv-rngconv msv-manual

Usage on Fedora

$ 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.

Have you tried Trang? (I don't know how it deals with inheritance)

See also xsd to rnc (or rng) conversion (unix command line) for a general discussion on converting XSD to RELAXNG. It looks like the Sun RELAX NG Converter goes under the name rngconv, and still hides out in certain places: http://rpm.pbone.net/index.php3?stat=3&search=msv-rngconv&srodzaj=3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top