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 > 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 > "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. On 6 April 2017 at 16:06, Laura Morales <[email protected]> wrote: > If I've read the W3 standards correctly, labels for graphs must be IRIs. > Jena also seems to enforce this behaviour, as it throws an exception if I > use a literal. My question is, why is this enforced at all? Why can't I > name my graphs with literals, for example "graph-1" or "graph-2"? > And related to this question, is there anything wrong (in any way) if I'm > going to name my graphs <graph-1>, <graph-2>, etc. (basically the same > name, but with IRI notation instead of literals)? > -- Conal Tuohy http://conaltuohy.com/ @conal_tuohy +61-466-324297
