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) :-
        And(perishable(?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.

-Adrian

-- 
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:49 GMT