Release 2.8.0: Support for quoted triples (RDF-star and SPARQL-star)

Tuesday, July 4, 2023


On this page

    This minor release focuses on a single but significant new feature: support for quoted triples.

    🪆 Quoted triples support

    Recently, the RDF-star community group has produced extensions to RDF and SPARQL: RDF-star and SPARQL-star. These extensions allow statements to be made about other statements, which previously only used to be possible using inconvenient workarounds such as RDF reification and named graphs. The RDF-star W3C working group is now working on preparing new versions of the RDF and SPARQL recommendations, which are scheduled to be finalized in the second half of 2024.

    Concretely, this functionality allows triples to be quoted in subject and object positions of other triples. For example, the statement "Alice says that Violets are Blue" could be expressed in Turtle as follows:

    @prefix : <http://example.org/foo#> .
    :Alice :says << :Violets :haveColor :Blue >> .
    

    Furthermore, this could be queried in SPARQL as follows:

    PREFIX : <http://example.org/foo#>
    SELECT ?person ?color WHERE {
      ?person :says << :Violets :haveColor ?color >> .
    }
    

    This Comunica update adds support to this new functionality, following the RDF-star community group report. Concretely, most RDF parsers and serializers, all SPARQL result parsers and serializers, and the SPARQL query parser and processing have been updated to handle quoted triples. Furthermore, for storing quoted triples in-memory, we recommend the optimized rdf-stores package, which is also being used internally for handling quoted triples.

    This functionality is fully backwards-compatible, meaning that existing applications that do not make use of quoted triples will experience no differences. Furthermore, breaking changes in our RDF-star support may occur if the RDF-star W3C working group decides to deviate from the RDF-star community group report.

    Full changelog

    As always, if you want to learn more about all changes, check out the full changelog.