- From: Richard Cyganiak <richard@cyganiak.de>
- Date: Wed, 23 Nov 2011 16:03:27 +0000
- To: David McNeil <dmcneil@revelytix.com>
- Cc: RDB2RDF WG <public-rdb2rdf-wg@w3.org>
On 23 Nov 2011, at 15:40, David McNeil wrote: >>> Looking at it from the other direction if the mapping author wants to produce the canonical RDF literal form of a SQL integer as an xsd:string or a plain literal without a language tag... how do they do that? >> >> rr:template "{columnname}" > > This will produce a plain literal without a language tag, correct? Yes. Actually it requires rr:termType rr:Literal too, otherwise it would try to generate an IRI as that is the default for template-valued term maps. > (so this seems to be the plain literal mechanism that I have been asking for the last couple of days) Yes. I have to admit that I forgot that this was possible, and realized it again just yesterday. (It's fun to discover such neat hidden features in R2RML.) There is a Note in 7.6 that still claims it's impossible and suggests using an R2RML view instead. I'm changing this: [[ One cannot explicitly state that a plain literal without language tag should be generated. They are the default for string columns. To generate one from a non-string column, a template-valued term map with a template such as "{MY_COLUMN}" and a term type of rr:Literal can be used. ]] > Also, if the author says: > > rr:template "{columnname}" > -and- > rr:datatype xsd:string > > Then it will produce a canonical RDF string value of type xsd:string, right? Yes. Again, rr:termType rr:Literal is necessary too, otherwise it would be an error. (The spec should possibly be changed here to infer that rr:Literal is implicitly desired if rr:datatype is present. Same for rr:language. Currently, it “decides” the default rr:termType “before” considering the presence of rr:datatye or rr:language. This would be a change in normative behaviour though.) (The parts that handle the mapping of literals was a bit … rushed … to get it done for the LC date. I'm glad we're sorting these things out now.) Best, Richard
Received on Wednesday, 23 November 2011 16:04:07 UTC