Re: Substantial comments on the DM Mapping

* Richard Cyganiak <richard@cyganiak.de> [2011-08-08 15:00+0100]
> Ivan, Eric,
> 
> On 8 Aug 2011, at 12:21, Ivan Herman wrote:
> > - Section 2. The text currently says:
> > 
> > "...RDF graph that is called the direct graph. This graph is composed of relative IRIs that may be resolved against a base IRI"
> > 
> > which seems to suggest that the RDF graph will have relative IRI-s in their nodes. I do not think that is correct: an RDF graph always uses absolute IRI-s. The usage of the base IRI is part of the generation process and/or the specific serialization of the graph, and not part of the final graph...
> 
> Yes, an RDF graph MUST contain only absolute IRIs.
> 
> The phrasing with relative IRIs is partially my fault, I suggested it early in the lifetime of this document, based on the observation that all IRIs in the direct graph share the same prefix. I thought phrasing it with relative IRIs would simplify the logic and the examples. This was probably a mistake.
> 
> A better way of conceptualising this:
> 
> “The input into the direct mapping is:
> 1. a database
> 2. a base IRI”
> 
> “All IRIs in the direct graph are obtained by concatenating to the base IRI.”
> 
> “The XYZ IRI is a concatenation of:
> 1. the base IRI,
> 2. a slash character “/”,
> 3. …”

How about if we just change may to MUST in
  "This graph is composed of relative IRIs that may be resolved against a base IRI"
?
Specifying our own recipe seems like a recipe for trouble.
3986 gives us a resolution recipe implemented in every browser and web library:
http://tools.ietf.org/html/rfc3986#section-5.2
and tells us how to find the base:
http://tools.ietf.org/html/rfc3986#section-5.1

> The examples should be written as Turtle that uses the @base directive, like:
> 
>     @base <http://data.example.com/>.
>     <table1/id=1> <table1/name> "Bob".

A quick survey indicates that all complete examples have a base:
  @base <http://foo.example/DB/>

> Here's what R2RML has to say about the base IRI:
> 
> >> The base IRI MUST be a valid IRI. It SHOULD end in a slash (“/”) character.

Note that step 2 above would produce <http://foo.example/DB//People/ID=7> which no browser would ever request.

> >> Note: Resolution of relative IRIs in R2RML uses simple string concatenation instead of the more complex algorithm defined in RFC 3986. This ensures that the original database value can be reconstructed from the generated IRI.
> 
> I think that the exact same mechanism would make sense for the DM.

I agree that these should be the same, but believe we should rely on existing specs and libraries by using conventional relative URI resolution.

> Best,
> Richard

-- 
-ericP

Received on Monday, 8 August 2011 14:56:47 UTC