CommentResponse:KD-1

Thank you for your comment about SPARQL's requirement from XQuery/XPath Functions and Operators.

SPARQL requires any implementation to provide a core set of datatypes and a core set of operations on those datatypes.

It also provide an extensibility mechanism [1] whereby an implementation can, within the spec, include additional operators and additional coverage by existing operators beyond the core set.

An implementation can add

op:subtract-dateTimes($arg1 as xs:dateTime, $arg2 as xs:dateTime)
as xs:dayTimeDuration

so while it is not a requirement of a minimally compliant SPARQL processor, implementations are free to add such operation.

There is a balance in the set of datatypes and operators, and the costs of implementations in supporting that set. The working group has chosen to define a subset of the full XQuery/XPath Functions and Operators as being required; many implementations already go beyond this core set.

The required set of datatypes and operators in SPARQL 1.1 for xsd:dateTime is the same as that in SPARQL 1.0. The working group feels this is the right balance and hope implementations will provide the additional specific operators that certain domains require.

Any additional functions can provided by an implementation and called directly by their URI:

op:subtract-dateTimes(?date1, ?date2)

We would be grateful if you would acknowledge that your comment has been answered by sending a reply to this mailing list.