Skip to main content

RELAX NG Compact to RELAX NG conversion library

https://github.com/jombr/rnc2rng/actions/workflows/ci.yml/badge.svg?branch=main https://coveralls.io/repos/jombr/rnc2rng/badge.svg?branch=main&service=github

Converts RELAX NG schemata in Compact syntax (rnc) to the equivalent schema in the XML-based default RELAX NG syntax. Dependencies:

  • Python 3 (CI tests 3.11, 3.12, 3.13, 3.14, 3.15)

  • rply

Older Python versions are not currently tested.

Feedback welcome on GitHub.

History

rnc2rng was originally written by David Mertz in 2003 and published as part of a collection of files around RELAX NG on his site into the Public Domain. Hartmut Goebel published it as a package on PyPI to make it easier to access. It was mirrored on GitHub by Dustin J. Mitchell in 2010 after he fixed some bugs. Timmy Zhu forked his repository and contributed further enhancements. Dirkjan Ochtman later made further updates and took over maintainership on PyPI from Hartmut Goebel. I began contributing in 2024, and Dirkjan later asked if I was interested in taking over maintainership. I received PyPI maintainership on November 17, 2026.

I intend to keep the project up to date by testing supported Python versions, modernizing the code, and implementing remaining parts of the RELAX NG standard. I’ll also try to be responsive to issues and pull requests.

How to install

The usual should work:

$ sudo pip install .

Getting started

$ python -m rnc2rng test.rnc > test.rng

Running tests

From the repository root, run the test suite with Python’s standard library:

$ python -m unittest

Alternatively, install pytest and run:

$ python -m pip install pytest
$ python -m pytest

License

All of the code is released under MIT License.

Metadata

Release files for rnc2rng 2.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rnc2rng 2.9.0
File Size Uploaded Provenance Actions
rnc2rng-2.9.0.tar.gz 31.7 kB Without provenance Details for rnc2rng-2.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rnc2rng 2.9.0
File Interpreter ABI Platform Actions
rnc2rng-2.9.0-py3-none-any.whl Python 3 none any Details for rnc2rng-2.9.0-py3-none-any.whl

Total release size: 48.4 kB

Release files / rnc2rng-2.9.0.tar.gz

Download URL rnc2rng-2.9.0.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
47084b10e2452b4b6a3573faadf5fe33dd482c3510fa6441aa4fa68c0d5be722
BLAKE2b-256 checksum
How to use checksums
43e47626fab41cdde4fbda34d1a822f83b980dc8078fd75de4877a50f7ef46ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / rnc2rng-2.9.0-py3-none-any.whl

Download URL rnc2rng-2.9.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3028799782d863e3cbc76d3c009c1a4dbe2e398b127222adc9e3fcd6e731ac82
BLAKE2b-256 checksum
How to use checksums
eeebef5b257e88709bbb664bb3ab55bfbdcaa5957540973a396e5aa9b22444e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for rnc2rng 2.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page