aboutsummaryrefslogtreecommitdiff
path: root/schemas/relaxng
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-06-30 15:48:47 +0000
committerRob Austein <sra@hactrn.net>2014-06-30 15:48:47 +0000
commit8cd68f586a8a6e42a62bc9ca6de0d5942fb7b45b (patch)
tree31b4059cbf87453bdbd0cdfb2e27bc9799a9d706 /schemas/relaxng
parentab361985a229d0324a8e4f840aa4518e2bdff48f (diff)
Proposed RRDP simplifications after email discussion. Still subject
to change, checking in to simplify discussion. svn path=/branches/tk705/; revision=5877
Diffstat (limited to 'schemas/relaxng')
-rw-r--r--schemas/relaxng/rrdp.rnc109
1 files changed, 32 insertions, 77 deletions
diff --git a/schemas/relaxng/rrdp.rnc b/schemas/relaxng/rrdp.rnc
index 44b94034..4fdc493b 100644
--- a/schemas/relaxng/rrdp.rnc
+++ b/schemas/relaxng/rrdp.rnc
@@ -18,97 +18,52 @@
default namespace = "http://www.ripe.net/rpki/rrdp"
-# I find the use of "version" for both the protocol version and the database version
-# unncessarily confusing, so I'd prefer "serial" for the latter. For the moment,
-# I'm keeping the attribute names as in Tim's document and just using "serial" for
-# the data type.
-#
-# The xsd:string types here are me being lazy in the initial version.
-# We should also think about length limits for all of these types.
-
-version = xsd:positiveInteger { maxInclusive="1" }
+version = xsd:positiveInteger { maxInclusive="1" }
serial = xsd:nonNegativeInteger
uri = xsd:anyURI
-uuid = xsd:string
-sha256 = xsd:string
+uuid = xsd:string { pattern = "[\-0-9a-fA-F]+" }
+hash = xsd:string { pattern = "[0-9a-fA-F]+" }
base64 = xsd:base64Binary
-index = xsd:positiveInteger
# Notification file: lists current snapshots and deltas
-#
-# We want to get rid of the multiple segment thing from Tim's original
-# specification. I think this means that the multiple
-# <snapshot-segment/> elements collapse down to a single snapshot, the
-# attributes of which probably float up to the <snapshot/> element.
-# Or maybe we just require exactly one snapshot-segment element; it's
-# a bit verbose, but leaves an easy way to change our minds later,
-# and it's XML so who's going to notice one more element?
-#
-# Specify as in the -01 draft for the moment, simplify later.
-start |= element msg {
- attribute version { version },
- attribute type { "notification" },
- element notification {
- attribute session_id { uuid },
- attribute current_version { serial },
- element snapshot {
- attribute version { serial },
- element snapshot-segment {
- attribute uri { uri },
- attribute hash { sha256 }
- }+
- },
- element deltas {
- element delta-segment {
- attribute from { serial },
- attribute to { serial },
- attribute uri { uri },
- attribute hash { sha256 }
- }+
- }?
- }
+start |= element notification {
+ attribute version { version },
+ attribute session_id { uuid },
+ attribute serial { serial },
+ element snapshot {
+ attribute uri { uri },
+ attribute hash { hash }
+ },
+ element delta {
+ attribute from { serial },
+ attribute to { serial },
+ attribute uri { uri },
+ attribute hash { hash }
+ }+
}
-# If we're getting rid of multiple snapshot segments, I think the
-# index attributes go away.
-#
-# -01 is a bit vague on <publish/> and <withdraw/> elements:
-# Zero-or-more? One-or-more? Does "exact copy" include using the
-# publication protocol's XML namespace instead of RRDP's? Tag
-# attribute allowed? Wing it for now.
-
# Snapshot segment: think DNS AXFR.
-start |= element msg {
- attribute version { version },
- attribute type { "snapshot" },
- element snapshot {
- attribute session_id { uuid },
- attribute repository_version { serial },
- attribute index { index },
- element publish { attribute uri { uri }, base64 }*
- }
+start |= element snapshot {
+ attribute version { version },
+ attribute session_id { uuid },
+ attribute serial { serial },
+ element publish { attribute uri { uri }, base64 }*
}
# Delta segment: think DNS IXFR.
-# -01 doesn't say whether <delta/> is zero-or-more or one-or-more.
-
-start |= element msg {
- attribute version { version },
- attribute type { "deltas" },
- element deltas {
- attribute session_id { uuid },
- attribute from { serial },
- attribute to { serial },
- attribute index { index },
- element delta {
- attribute version { serial },
- ( element publish { attribute uri { uri }, base64 } |
- element withdraw { attribute uri { uri } } )*
- }*
- }
+start |= element deltas {
+ attribute version { version },
+ attribute session_id { uuid },
+ attribute from { serial },
+ attribute to { serial },
+ element delta {
+ attribute serial { serial },
+ ( element publish { attribute uri { uri }, base64 } |
+ element withdraw { attribute uri { uri } } )+
+ }+
}
# Local Variables: