From ed6e675ccbe2a3e2c57dfb35e4c71684a25110b0 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 9 Jul 2014 05:39:54 +0000 Subject: Add withdrawal hashes to publication and rrdp. svn path=/branches/tk705/; revision=5888 --- schemas/relaxng/publication.rnc | 26 ++++++++++++------ schemas/relaxng/publication.rng | 59 +++++++++++++++++++++++++---------------- schemas/relaxng/rrdp.rnc | 14 ++++++++-- schemas/relaxng/rrdp.rng | 37 +++++++++++++++++--------- 4 files changed, 90 insertions(+), 46 deletions(-) (limited to 'schemas') diff --git a/schemas/relaxng/publication.rnc b/schemas/relaxng/publication.rnc index 3a519543..8c129546 100644 --- a/schemas/relaxng/publication.rnc +++ b/schemas/relaxng/publication.rnc @@ -44,10 +44,16 @@ version = "3" # Top level PDU is either a query or a reply. -start = element msg { - attribute version { version } , - ( ( attribute type { "query" }, query_elt* ) | - ( attribute type { "reply" }, reply_elt* ) ) +start |= element msg { + attribute version { version }, + attribute type { "query" }, + query_elt* +} + +start |= element msg { + attribute version { version }, + attribute type { "reply" }, + reply_elt* } # PDUs allowed in queries and replies. @@ -67,19 +73,23 @@ base64 = xsd:base64Binary uri = attribute uri { xsd:anyURI { maxLength="4096" } } +# Digest of objects being withdrawn + +hash = attribute hash { xsd:string { pattern = "[0-9a-fA-F]+" } } + # Error codes. error = xsd:token { maxLength="1024" } # element -publish_query |= element publish { tag?, uri, base64 } -publish_reply |= element publish { tag?, uri } +publish_query = element publish { tag?, uri, hash?, base64 } +publish_reply = element publish { tag?, uri } # element -withdraw_query |= element withdraw { tag?, uri } -withdraw_reply |= element withdraw { tag?, uri } +withdraw_query = element withdraw { tag?, uri, hash } +withdraw_reply = element withdraw { tag?, uri } # element diff --git a/schemas/relaxng/publication.rng b/schemas/relaxng/publication.rng index 2990ec97..fed494b2 100644 --- a/schemas/relaxng/publication.rng +++ b/schemas/relaxng/publication.rng @@ -43,29 +43,30 @@ 3 - + - - - - query - - - - - - - - reply - - - - - - + + query + + + + + + + + + + + + + reply + + + + @@ -102,6 +103,14 @@ + + + + + [0-9a-fA-F]+ + + + @@ -109,16 +118,19 @@ - + + + + - + @@ -127,15 +139,16 @@ - + + - + diff --git a/schemas/relaxng/rrdp.rnc b/schemas/relaxng/rrdp.rnc index 5b47c90b..2829605d 100644 --- a/schemas/relaxng/rrdp.rnc +++ b/schemas/relaxng/rrdp.rnc @@ -61,11 +61,21 @@ start |= element deltas { attribute to { serial }, element delta { attribute serial { serial }, - ( element publish { attribute uri { uri }, base64 } | - element withdraw { attribute uri { uri } } )+ + delta_element+ }+ } +delta_element |= element publish { + attribute uri { uri }, + attribute hash { hash }?, + base64 +} + +delta_element |= element withdraw { + attribute uri { uri }, + attribute hash { hash } +} + # Local Variables: # indent-tabs-mode: nil # comment-start: "# " diff --git a/schemas/relaxng/rrdp.rng b/schemas/relaxng/rrdp.rng index 197a15b3..27ba741d 100644 --- a/schemas/relaxng/rrdp.rng +++ b/schemas/relaxng/rrdp.rng @@ -124,24 +124,35 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +