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.
- A namespace for MySQL function identifiers (used by ARC)
- RDF::Query supports several extension functions: jena:sha1sum, jena:now, jena:langeq, jena:listMember (with deprecated namespace) and ldodds:Distance (from XMLArmyKnife)
- GeoSparQL extensions for Triple Stores with a Sesame SAIL API
- ARQ Function Library
- XMLArmyKnife Geographical functions
- Sesame SPARQL XPath Function library
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.)
http://www.w3.org/2005/xpath-functions# (note: earlier documents have this as .../# but that was corrected).