aboutsummaryrefslogtreecommitdiff
path: root/myrpki
diff options
context:
space:
mode:
Diffstat (limited to 'myrpki')
-rw-r--r--myrpki/myirbe.py9
-rw-r--r--myrpki/schema.py2
-rw-r--r--myrpki/schema.rng2
3 files changed, 11 insertions, 2 deletions
diff --git a/myrpki/myirbe.py b/myrpki/myirbe.py
index 6ab06a12..b7533046 100644
--- a/myrpki/myirbe.py
+++ b/myrpki/myirbe.py
@@ -516,6 +516,15 @@ for xmlfile in xmlfiles:
assert e is not None
e.text = bsc_req.get_Base64()
+ # Something weird going on here with lxml linked against recent
+ # versions of libxml2. Looks like modifying the tree above somehow
+ # produces validation errors, but it works fine if we convert it to
+ # a string and parse it again. I'm not seeing any problems with any
+ # of the other code that uses lxml to do validation, just this one
+ # place. Weird. Kludge around it for now.
+
+ tree = lxml.etree.fromstring(lxml.etree.tostring(tree))
+
try:
schema.myrpki.assertValid(tree)
except lxml.etree.DocumentInvalid:
diff --git a/myrpki/schema.py b/myrpki/schema.py
index 5208ed87..c371b45b 100644
--- a/myrpki/schema.py
+++ b/myrpki/schema.py
@@ -1,7 +1,7 @@
import lxml.etree
myrpki = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" encoding="UTF-8"?>
<!--
- $Id: schema.rnc 2722 2009-08-31 22:24:48Z sra $
+ $Id: schema.rnc 2839 2009-10-27 18:53:00Z sra $
RelaxNG Schema for MyRPKI XML messages
diff --git a/myrpki/schema.rng b/myrpki/schema.rng
index c4328d3a..6f37e37a 100644
--- a/myrpki/schema.rng
+++ b/myrpki/schema.rng
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- $Id: schema.rnc 2722 2009-08-31 22:24:48Z sra $
+ $Id: schema.rnc 2839 2009-10-27 18:53:00Z sra $
RelaxNG Schema for MyRPKI XML messages