From W3C Wiki

SPARQL supports Extension Functions for performing customised filtering of query results. The specification notes that "SPARQL queries using extension functions are likely to have limited interoperability".

The interoperability issue can be addressed by compiling lists of commonly implemented/needed functions and attempt to achieve convergence between different SPARQL processors. In particular, implementations should attempt to reuse other implementation's extension function URIs.

This page is intended to act as a reference point for compiling pointers and documentation on existing implementations.

Use the sparql-dev mailing list for related discussion.

Existing Function Libraries

Place pointers to SPARQL processor function library documentation here.

Proposed Functions

Functions that might be useful, but aren't implemented yet!


  • Operands with XSD date and gYear as datatype; or is this already possible? AnswerMe

Coverage from XPath/XQuery Functions and Operators

XQuery 1.0 and XPath 2.0 Functions and Operators provides a lot of functions. Some of these operate on sequences, so don't exactly map to SPARQL, but many act on single values.

SPARQL itself mentions: `fn:boolean`, `fn:not`, `fn:compare`, `fn:matches`, as well as various `op:` ones.

Useful string ones are: `fn:string-length`, `fn:string-join`, `fn:substring`, `fn:starts-with`, `fn:contains`, `fn:ends-with`. (Strings are 1-based; the 3rd argument to substring is length.)

`fn:` is (note: earlier documents have this as .../# but that was corrected).