For completeness: the core RDF recommendation

https://www.w3.org/TR/rdf11-concepts/#section-dataset

says "Each named graph is a pair consisting of an IRI or a blank node (the 
graph name), and an RDF graph." i.e. it is perfectly legal to name graphs with 
blank nodes. Obviously, that will have pretty strong effects on your ability to 
refer to named graphs from other contexts than the one in which you created 
them.

On the other hand, as the same recommendation says just a bit later: "SPARQL 
1.1 Query Language only allows RDF Graphs to be identified using an IRI." 

https://www.w3.org/TR/sparql11-query/#rdfDataset:

"An RDF Dataset comprises one graph, the default graph, which does not have a 
name, and zero or more named graphs, where each named graph is identified by an 
IRI."

In neither place is an absolute URI required. That comes in, as Conal Tuohy 
wrote, in the way you might use SPARQL Graph Store, but it's actually a bit 
subtle:

https://www.w3.org/TR/sparql11-http-rdf-update/#direct-graph-identification

---
A. Soroka
The University of Virginia Library

> On Apr 6, 2017, at 4:20 AM, Laura Morales <[email protected]> wrote:
> 
> Thank you for the great response.
> 
> ==================================================
> 
> Subject: Re: Named graphs
> Hi Laura
> 
> If you're asking "why did the W3 decide that graph names must be absolute
> IRIs?" then this is probably not the best forum to ask, but anyway ...
> 
> One reason is so that absolute IRIs can be used as part of the WWW; graph
> names may actually resolve to serializations of the graph content. This is
> what the SPARQL Graph Store Protocol calls "Direct Graph Identification". <
> https://www.w3.org/TR/sparql11-http-rdf-update/#direct-graph-identification>
> 
> There's also the useful possibility that RDF statements can refer to graphs
> by name, e.g. to store metadata about the provenance of graphs: <
> https://www.w3.org/TR/rdf11-datasets/#the-graph-name-denotes-the-named-graph-or-the-graph[https://www.w3.org/TR/rdf11-datasets/#the-graph-name-denotes-the-named-graph-or-the-graph]
>> 
> 
> In any case, that's the standard we have to live with, so you do need to
> use IRIs to name your graphs, and NB the SPARQL Graph Store Protocol also
> requires graph names to be absolute IRIs: <
> https://www.w3.org/TR/sparql11-http-rdf-update/#indirect-graph-identification[https://www.w3.org/TR/sparql11-http-rdf-update/#indirect-graph-identification]
>> 
> 
> "The query string IRI MUST be an absolute IRI and the server MUST respond
> with a 400 Bad Request if it is not. "
> 
> Not all implementations enforce this properly; I've seen some systems in
> which relative URIs are allowed, but this is not compliant and will cause
> interoperability problems.
> 
> However, your graph names don't have to be HTTP IRIs; you could use "data:"
> or "tag:" or any other URI scheme. So you could call your graphs
> <data:,graph-1> and <data:,graph-2> and still comply with the specification
> and keep Fuseki happy.

Reply via email to