Skip to content

Support for Triple Annotations #52

Closed
@niklasl

Description

@niklasl

If support for "bare" triple terms (#50) is added, it could be valuable to also support triple annotations, akin to the Turtle 1.2 annotation syntax.

While the old reification design is close to that (using rdf:ID on the predicate element), that only generates rdf:Statement tokens, and can only generate fragment identifiers unique to the element (which of course is appropriate for that token in the current document). While these tokens may conceptually be reifiers, that is only an indirect relation, and only for one specific annotation use case.

We could define the attribute rdf:annotation to annotate similarly:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://example.com/" 
         xml:base="http://example.com/"
         rdf:version="1.2">
  <rdf:Description rdf:about="/a">
    <name rdf:annotation="triple-1">Alice</name>
  </rdf:Description>
  <rdf:Description rdf:about="triple-1">
    <statedBy rdf:resource="/bob"/>
    <recorded rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2021-07-07</recorded>
  </rdf:Description>
</rdf:RDF>

That would be equivalent to:

prefix : <http://example.com/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>

:a :name "Alice" ~ :triple-1 .
:triple-1 :statedBy :bob ; :recorded "2021-07-07"^^xsd:date .

For reifiers named by blank nodes, rdf:annotationNodeID could be similarly defined. Changing the relevants part in RDF/XML:

   <!-- ... -->
    <name rdf:annotationNodeID="triple-1">Alice</name>
  </rdf:Description>
  <rdf:Description rdf:nodeID="triple-1">
   <!-- ... -->

would make it equivalent to:

:a :name "Alice" {| :statedBy :bob ; :recorded "2021-07-07"^^xsd:date |} .

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:enhancementChange to enhance the spec without affecting conformance (class 2) –see also spec:editorialspec:new-featureChange adding new functionality (class 4)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions