aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpkid/Makefile2
-rw-r--r--rpkid/publication-protocol-samples.xml22
-rw-r--r--rpkid/publication-schema.rnc6
-rw-r--r--rpkid/publication-schema.rng28
-rw-r--r--rpkid/rpki/relaxng.py28
5 files changed, 75 insertions, 11 deletions
diff --git a/rpkid/Makefile b/rpkid/Makefile
index 6dc10f8e..f4c83091 100644
--- a/rpkid/Makefile
+++ b/rpkid/Makefile
@@ -47,7 +47,7 @@ install:
dont-run-trang:
touch *.rng
-relaxng: left-right-protocol-samples/.stamp left-right-schema.rng up-down-schema.rng publication-protocol-samples/.stamp
+relaxng: left-right-protocol-samples/.stamp left-right-schema.rng up-down-schema.rng publication-protocol-samples/.stamp publication-schema.rng
xmllint --noout --relaxng left-right-schema.rng left-right-protocol-samples/*.xml
xmllint --noout --relaxng up-down-schema.rng up-down-protocol-samples/*.xml
xmllint --noout --relaxng publication-schema.rng publication-protocol-samples/*.xml
diff --git a/rpkid/publication-protocol-samples.xml b/rpkid/publication-protocol-samples.xml
index b1d5afa9..f04ebaf2 100644
--- a/rpkid/publication-protocol-samples.xml
+++ b/rpkid/publication-protocol-samples.xml
@@ -147,7 +147,27 @@
<!-- === -->
<msg version="1" type="reply" xmlns="http://www.hactrn.net/uris/rpki/publication-spec/">
- <report_error error_code="your_hair_is_on_fire">bag_of_data</report_error>
+ <report_error error_code="your_hair_is_on_fire">text string</report_error>
+ </msg>
+
+ <msg version="1" type="reply" xmlns="http://www.hactrn.net/uris/rpki/publication-spec/">
+ <report_error error_code="your_hair_is_on_fire"><bag_of_data foo="bar"/></report_error>
+ </msg>
+
+ <msg version="1" type="reply" xmlns="http://www.hactrn.net/uris/rpki/publication-spec/">
+ <report_error error_code="your_hair_is_on_fire">
+ <fee>
+ <fie>
+ <foe>
+ fum
+ </foe>
+ </fie>
+ </fee>
+ </report_error>
+ </msg>
+
+ <msg version="1" type="reply" xmlns="http://www.hactrn.net/uris/rpki/publication-spec/">
+ <report_error error_code="your_hair_is_on_fire"/>
</msg>
</completely_gratuitous_wrapper_element_to_let_me_run_this_through_xmllint>
diff --git a/rpkid/publication-schema.rnc b/rpkid/publication-schema.rnc
index e2dee26f..96a74475 100644
--- a/rpkid/publication-schema.rnc
+++ b/rpkid/publication-schema.rnc
@@ -92,10 +92,14 @@ roa_reply |= element roa { attribute action { "withdraw" }, tag?, client_id?, ur
error = xsd:token { maxLength="1024" }
+#any = element * { (attribute * { text } | text | any*)* }
+
+any = element * { attribute * { text }*, ( text | any* ) }
+
report_error_reply = element report_error {
tag?,
attribute error_code { error },
- xsd:string { maxLength="512000" }?
+ ( text | any* )?
}
# Local Variables:
diff --git a/rpkid/publication-schema.rng b/rpkid/publication-schema.rng
index 93f2315c..a49e75ae 100644
--- a/rpkid/publication-schema.rng
+++ b/rpkid/publication-schema.rng
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- $Id: publication-schema.rnc 1808 2008-05-22 04:55:02Z sra $
+ $Id: publication-schema.rnc 1810 2008-05-22 14:46:48Z sra $
RelaxNG Schema for RPKI publication protocol.
@@ -590,6 +590,23 @@
<param name="maxLength">1024</param>
</data>
</define>
+ <!-- any = element * { (attribute * { text } | text | any*)* } -->
+ <define name="any">
+ <element>
+ <anyName/>
+ <zeroOrMore>
+ <attribute>
+ <anyName/>
+ </attribute>
+ </zeroOrMore>
+ <choice>
+ <text/>
+ <zeroOrMore>
+ <ref name="any"/>
+ </zeroOrMore>
+ </choice>
+ </element>
+ </define>
<define name="report_error_reply">
<element name="report_error">
<optional>
@@ -599,9 +616,12 @@
<ref name="error"/>
</attribute>
<optional>
- <data type="string">
- <param name="maxLength">512000</param>
- </data>
+ <choice>
+ <text/>
+ <zeroOrMore>
+ <ref name="any"/>
+ </zeroOrMore>
+ </choice>
</optional>
</element>
</define>
diff --git a/rpkid/rpki/relaxng.py b/rpkid/rpki/relaxng.py
index cc93facf..866cdba1 100644
--- a/rpkid/rpki/relaxng.py
+++ b/rpkid/rpki/relaxng.py
@@ -1215,7 +1215,7 @@ up_down = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" encodi
## Parsed RelaxNG publication schema
publication = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" encoding="UTF-8"?>
<!--
- $Id: publication-schema.rnc 1808 2008-05-22 04:55:02Z sra $
+ $Id: publication-schema.rnc 1810 2008-05-22 14:46:48Z sra $
RelaxNG Schema for RPKI publication protocol.
@@ -1805,6 +1805,23 @@ publication = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" en
<param name="maxLength">1024</param>
</data>
</define>
+ <!-- any = element * { (attribute * { text } | text | any*)* } -->
+ <define name="any">
+ <element>
+ <anyName/>
+ <zeroOrMore>
+ <attribute>
+ <anyName/>
+ </attribute>
+ </zeroOrMore>
+ <choice>
+ <text/>
+ <zeroOrMore>
+ <ref name="any"/>
+ </zeroOrMore>
+ </choice>
+ </element>
+ </define>
<define name="report_error_reply">
<element name="report_error">
<optional>
@@ -1814,9 +1831,12 @@ publication = lxml.etree.RelaxNG(lxml.etree.fromstring('''<?xml version="1.0" en
<ref name="error"/>
</attribute>
<optional>
- <data type="string">
- <param name="maxLength">512000</param>
- </data>
+ <choice>
+ <text/>
+ <zeroOrMore>
+ <ref name="any"/>
+ </zeroOrMore>
+ </choice>
</optional>
</element>
</define>