RDF* semantics without RDF* graphs

This is a fleshing out of a proposal for RDF* sementics that was alluded to in
https://lists.w3.org/Archives/Public/public-rdf-star/2021Jan/0103.html

RDF* is defined using a mapping from RDF surface syntax to RDF graphs as follows:

Let rdf* be a new well-known namespace.

Define a mapping L on RDF literals and IRIs as follows:
For an RDF literal t with lexical form l, optional language tag t, and
datatype d, L(l) is the RDF literal with datatype xsd:string and lexical form
"l"^^<d> or "l"@t^^<d>, as appropriate.
For an IRI i, L(i) is the RDF literal with datatype xsd:string and lexical
form <i>.

Gather together several RDF* documents (e.g., in Turtle*) that are to be used 
to construct the RDF graph.

Recursively define a mapping from embedded triple occurences in the documents 
to blank nodes as follows.
The mapping of two embedded triples are the same if and only if
the nodes that result from mapping, for embedded triples, or parsing, otherwise,
their subjects, respectively predicates and objects, are the same.

Parse the documents into an RDF graph in the normal way, treating embedded 
triples just like IRIs, except when adding a triple that contains one or more 
embedded triples first replace the embedded triples by their mappings, b. Then 
determine the RDF nodes for the subject, s, predicate, p, and object, o, of 
the embedded triples, recursively handling any that are embedded triples 
themselves. Then add the following triples to the graph for each embedded triple:
   ( b, rdf:type, rdf:Statement )
   ( b, rdf:subject, s ) if s is not a malformed literal
   ( b, rdf*:subject, L(s) ) if s is not a blank node
   ( b, rdf:predicate, p ) if p is not a malformed literal
   ( b, rdf*:predicate, L(p) ) if p is not a blank node
   ( b, rdf:object, o ) if o is not a malformed literal
   ( b, rdf*:object, L(o) )  if o is not a blank node

The (simple, RDF, RDF*, etc.) semantics of RDF* is just the (simple, RDF, 
RDF*, etc., respectively) semantics of the resultant RDF graph.

Received on Friday, 12 February 2021 15:15:43 UTC