aboutsummaryrefslogtreecommitdiff
path: root/scripts/rpki/relaxng.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rpki/relaxng.py')
-rw-r--r--scripts/rpki/relaxng.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/rpki/relaxng.py b/scripts/rpki/relaxng.py
index a4a6c00d..072d7798 100644
--- a/scripts/rpki/relaxng.py
+++ b/scripts/rpki/relaxng.py
@@ -7,6 +7,13 @@ def relaxng(xml, rng):
Validate a chunk of xml against a RelaxNG schema.
"""
+ # We could use either xmllint or jing here, but xmllint is easier.
+ # How to invoke jing, just in case:
+ #
+ # java -jar /usr/local/share/java/classes/jing.jar schema.rng foo.xml
+ #
+ # If error messages from xmllint are incomprehensible, try jing too.
+
i, o = os.popen4(("xmllint", "--noout", "--relaxng", rng, "-"))
i.write(xml)
i.close()