Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for Triple Annotations #52

Open
niklasl opened this issue Jan 31, 2025 · 0 comments
Open

Support for Triple Annotations #52

niklasl opened this issue Jan 31, 2025 · 0 comments

Comments

@niklasl
Copy link

niklasl commented Jan 31, 2025

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 |} .
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant