// See http://www.w3.org/2005/rules/wiki/BLD#XML_Serialization_Syntax_for_RIF-BLD

Document
  (
//     Prefix(ppl  "http://example.com/people#")
//     Prefix(cpt  "http://example.com/concepts#")
//     Prefix(dc   "http://purl.org/dc/terms/")
//     Prefix(rif  "http://www.w3.org/2007/rif#")
//     Prefix(func "http://www.w3.org/2007/rif-builtin-function#")
//     Prefix(pred "http://www.w3.org/2007/rif-builtin-predicate#")
//     Prefix(xs   "http://www.w3.org/2001/XMLSchema#")
  
//   (* "http://sample.org"^^rif:iri pd[dc:publisher -> "http://www.w3.org/"^^rif:iri
//                                      dc:date -> "2008-04-04"^^xs:date] *)

  Group
  (
//     Forall ?item ?deliverydate ?scheduledate ?diffduration ?diffdays
//     (
//       cpt:reject(ppl:John ?item) :-
//         And
//         (
// 	  cpt:perishable(?item)
//           cpt:delivered(?item ?deliverydate ppl:John)
//           cpt:scheduled(?item ?scheduledate)
//           ?diffduration = External(func:subtract_dateTimes(?deliverydate ?scheduledate))
//           ?diffdays = External(func:days_from_duration(?diffduration))
//           External(pred:numeric_greater_than(?diffdays 10))
// 	)
//      )
 
    Forall ?item
    (
      cpt:reject(ppl:Fred ?item) :- cpt:unsolicited(?item)
    )
  )
)

