W3C home > Mailing lists > Public > public-rif-wg@w3.org > May 2008

RIF DTB comments

From: Adrian Paschke <Adrian.Paschke@gmx.de>
Date: Sun, 25 May 2008 19:29:43 +0200
Message-ID: <20080525172943.167040@gmx.net>
To: public-rif-wg@w3.org

Currently RIF DTB does not support all XPath/XQuery functions and operators. But we will need them.
For instance, the following rule

"If an item is perishable and it is delivered to John more than 10 days after the scheduled delivery date
then the item will be rejected by him."

can not adequately represent with the current built-ins of DTB, such as fn:day-from-dateTime. We need further built-in functions and operations such as op:subtract-dateTimes and  fn:days-from-duration

A representation in BLD using relations is e.g.

Forall ?item ?deliverydate ?scheduledate ?diffduration ?diffdays (
    reject(John ?item) :-
            delivered(?item ?deliverydate John)
            scheduled(?item ?scheduledate)
            ?diffdays = External( fn:days-from-duration(
                               External(op:subtract-dateTimes(?deliverydate,?scheduledate)) ))              
            External(op:numeric-greater-than(?diffdays 10)))

A representation in BLD using frames needs these external built-ins, too.


Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Received on Sunday, 25 May 2008 17:30:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:07:44 UTC