Re: rr:constant with literal or datatype

Richard

I was indeed going to create a merge request, were I to prepare additional test cases.

You mention GitHub. Is there a git repository with tests? Currently I use tests from the mercurial repository https://dvcs.w3.org/hg/rdb2rdf-tests/.

Tom

November 16 2014 9:16 PM, "Richard Cyganiak" <richard@cyganiak.de> wrote: 
> Eric, what would happen if Tomasz simply added the tests and put his version of the test suite up
> on GitHub? It would be convenient, as people could submit pull requests against it, with additional
> tests. But I'm worried about W3C copyright.
> 
> Richard
> 
>> On 16 Nov 2014, at 13:45, Eric Prud'hommeaux <eric@w3.org> wrote:
>> 
>> * tomasz.pluskiewicz@gmail.com <tomasz.pluskiewicz@gmail.com> [2014-11-16 14:31+0000] 
>>> Thank you Richard
>>> 
>>> I have come to that conculsion after reading the specs carefully indeed.
>>> 
>>> Do you think such tests could be added to the suite? There a number of cases I can think of:
>>> 
>>> 1. Properly use the constant value as-is with dataype or language
>>> 2. Fail if a constant-valued has rr:datatype
>>> 3. Fail if a constant-valued has rr:language
>> 
>> Hi Tom, it sounds like you'd be the best one to write them. We can
>> either add them to the errata or figure out some sort of way to
>> communicate that there are other tests that weren't approved by the
>> WG. (In principle, I could just add them to the test suite, but that
>> seems to bypass an important social process.)
>> 
>>> Thanks,
>>> Tom
>>> 
>>> November 13 2014 7:10 PM, "Richard Cyganiak" <richard@cyganiak.de> wrote: 
>>>> Tomasz,
>>>> 
>>>>> On 7 Nov 2014, at 17:57, tomasz.pluskiewicz@gmail.com wrote:
>>>>> 
>>>>> Hi
>>>>> 
>>>>> I haven't found such example and I'm not sure what should happen if the R2RML mapping
> contained
>>> a
>>>>> constant with language tag or datatype. For example
>>>>> 
>>>>> [ rr:constant "someObject"^^<http://example.org/some#datatype> ]
>>>> 
>>>> There’s indeed no test case for this. So you’ll have to check the text of the spec.
>>>> 
>>>>> Should the datatype be ignored or used as if it was specified using rr:datatype?
>>>> 
>>>> As per R2RML §11.2:
>>>> 
>>>> [[
>>>> The generated RDF term of a term map for a given logical table row is determined as follows:
>>>> • If the term map is a constant-valued term map, then the generated RDF term is the term map's
>>>> constant value.
>>>> ]]
>>>> http://www.w3.org/TR/r2rml/#generated-rdf-term
>>>> 
>>>> And:
>>>> 
>>>> [[
>>>> The constant value of a constant-valued term map is the RDF term that is the value of its
>>>> rr:constant property.
>>>> ]]
>>>> http://www.w3.org/TR/r2rml/#dfn-constant-value
>>>> 
>>>> So, yes, the value of rr:constant is used exactly as is, including datatype if present.
>>>> 
>>>>> And more interestingly what should happen for the mapping below? Answering the first question
>>>> 
>>>> will 
>>>>> suggest the answer.
>>>>> 
>>>>> [
>>>>> rr:constant "someObject"^^<http://example.org/some#datatype> ;
>>>>> rr:datatype <http://example.org/some#datatype>
>>>>> ]
>>>> 
>>>> [[
>>>> A term map that is not a datatypeable term map MUST NOT have an rr:datatype property.
>>>> ]]
>>>> http://www.w3.org/TR/r2rml/#dfn-specified-datatype
>>>> 
>>>> Following the definitions, you will find that constant-valued term maps (those with
> rr:constant)
>>> do
>>>> not have a term type, and therefore can’t have a term type of rr:Literal, and therefore are not
>>>> datatypeable.
>>>> 
>>>> Best,
>>>> Richard
>>>> 
>>>>> It looks like such cases aren't included in the test suite [1].
>>>>> 
>>>>> Kind regards,
>>>>> Tom
>>>>> 
>>>>> [1] http://www.w3.org/2001/sw/rdb2rdf/test-cases
>> 
>> --
>> -ericP
>> 
>> office: +1.617.599.3509
>> mobile: +33.6.80.80.35.59
>> 
>> (eric@w3.org)
>> Feel free to forward this message to any list for any purpose other than
>> email address distribution.
>> 
>> There are subtle nuances encoded in font variation and clever layout
>> which can only be seen by printing this message on high-clay paper.

Received on Monday, 17 November 2014 08:17:38 UTC