Re: rdf* to xml or rdf/xml

> On 25. May 2021, at 18:15, Joy lix <joylix4112@outlook.com> wrote:
> 
> Hi, Thomas,  Thank you for your detailed reply.
> I'm a beginner in semantic technology, so I don't know much about RDF.
> But I've got a rough idea of what you mean, It can be expressed in a manner similar to the following:
> x:( :John :meet :Sara ) :venue :HydePark ;
> x  :date "2021-05-04" .            // here x is rdf:ID or named variable

Hmm, this is not RDF/XML at all and not a format that I immediatly recognize.

> Let's assume that this assertion of x is true, all I need to do now is record this data in a text file (RDF* is preferred),
> then save it to a graph database.
>   I used Neo4j before, but Neo4j does not support hyperGraph, So it can only save edge properties as numbers or characters, it cannot point an edge property to another node.
> << :John :meet :Sara >> :date "2021-05-04" .        // this can be imported into neo4j
> << :John :meet :Sara >> :venue :HydePark .          // this does’nt work
> Maybe AnzoGraph or GraphDB will support hypergraphs.
> So the thing that still puzzles me is, how do I store hypergraph data in a data format like XML (Because there is some other data that needs to be expressed and exchanged, it is more convenient to use XML or RDF /XML formats).

RDF/XML is a very special kind of XML, not what your usual XML toolchain would particularily be happy about. It is a useful interchange format if all your RDF tools support it natively. It is however quite involved and cumbersome when hand editing and considered a legacy format by many. It has often been replaced by Turtle or JSON-LD. However there are places where RDF/XML is still used precisely because of its syntactic sugar for reification in the form of the rdf:ID attribute. That syntax feature is quite unique among RDF syntaxes. That’s why I mentioned it. I’m afraid that if you need syntactic sugar for reification you’ll either have to deal with the idiosyncracies of RDF/XML or the still partial support of the still unfinished RDF-star effort in the RDF ecosystem. 

I think checking out those graph stores that you mention above, maybe also Stardog, seems like a promising approach. You’ll probbaly find something that suits your needs well enough somewhere between RDF databases that support RDF-star and Property Graph databases that support RDF. It’s still relatively uncharted territory….

Cheers,
Thomas

> Thank you for your reply and suggestions.
>  
> Regards,
> Joylix
>  
>  
> 
> 
>  
>  
> 发件人: thomas lörtsch
> 发送时间: 2021年5月25日 23:00
> 收件人: Joy lix
> 抄送: public-rdf-star@w3.org
> 主题: Re: rdf* to xml or rdf/xml
>  
> > On 25. May 2021, at 14:49, Joy lix <joylix4112@outlook.com> wrote:
> > 
> > Hi, all, How can the following RDF* be expressed as XML or RDF/XML:
> >  
> > @prefix :    <http://www.example.org/> .
> > :HydePark :located  :London .
> > << :John :meet :Sara >> :venue :HydePark ;
> >    >  
> > Thanks.
> >  
> > Joylix
> 
> 
> The rdf:ID attribute [0] comes to mind as a very concise syntactic shortcut for reification. There are however a few subteties to keep in mind:
> 
> - RDF-star embedded triples represent the triple itself (as an abstract object that is the same wherever it occurs) whereas RDF standard reification and the rdf:ID attribute address a specific occurrence (although the RDF specification provides no way to point to a specific occurrence, the rdf:ID attribute could be interpreted as being pretty explicit about this)
> 
> - like with the standarad reification quadlet an RDF-star embedded triple in the pointy brackets syntax << … >> is not asserted which provides the opportunity to annotate statements without actually stating and thereby endorsing them. The rdf:ID attribute can only piggyback on asserted statements.
> 
> - as it is syntactic sugar to RDF standard reification the rdf:ID attribute operates in the interpreted space, like all of RDF. The proposed semantics of RDF-star however constrains embedded triples to their syntactic value - so co-denotations and entailments in asserted triples aren’t automatically reflected in their embedded counterparts.
> 
> - you can’t use the rdf:ID attribute on data that you don’t have write access to (if it isn’t provided already). That requires a more verbose solution like RDF standard reification or RDF-star embedded triples.
> 
> 
> Hope this helps,
> Thomas
> 
> 
> 
> [0] https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-reifying

Received on Tuesday, 25 May 2021 21:21:29 UTC