W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2011

Re: The RDF 1.1 Literal Quiz

From: Ivan Herman <ivan@w3.org>
Date: Thu, 19 May 2011 17:36:01 +0200
Cc: public-rdf-wg@w3.org
Message-Id: <B0C65545-052C-460E-BDE3-E5B3D1276EDF@w3.org>
To: antoine.zimmermann@insa-lyon.fr

On May 19, 2011, at 17:12 , Antoine Zimmermann wrote:

> Ivan,
> 
> 
> Remember that we assume we are in 2013 with RDF 1.1 standardised, so what's apply to RDF 1.0 may not be true anymore. Please bear this in mind when answering the questions.
> 
> 
> Le 19/05/2011 17:01, Ivan Herman a écrit :
>> 
>> On May 19, 2011, at 16:51 , Antoine Zimmermann wrote:
>> 
>>> I have some more questions:
>>> 
>>> 
>>> 
>>> Q25. Is this a single triple?
>>> 
>>>    <joe>  <nbChildren>  "2"^^xs:decimal .
>>>    <joe>  <nbChildren>  "+2.000"^^xs:decimal .
>>> 
>> 
>> That is D-entailment. Ie, with D-E yes, otherwise no
> 
> Entailment does not remove triples, whether it is simple, D-, RDFS, OWL, or whatever. Either there are two triples in RDF1.1 (irrespective of the entailment regime) or there is one (irrespective of the entailment regime).
> 
> D-entailment would simply allow you to say that these two triples are equivalent (which is true already in RDF1.0).

Aha. Correct

> 
>>> Q26. Is this a single triple?
>>> 
>>>    <joe>  <nbChildren>  "2"^^xs:byte .
>>>    <joe>  <nbChildren>  "2"^^xs:positiveInteger .
>> 
>> No by default. RDF Semantics does not (automatically) include subclassing in the RDF sense for the datatype classes whose lexical spaces are subsets. Implementations may add that.
> 
> Please answer not according to the RDF 2004 spec but to what would be your view or desire of what should be the RDF 2012 spec.
> 

Well, we have not discussed that. But yes, I would consider adding to the semantics for datatypes whereby if the lexical spaces of two datatypes are subsets, then the corresponding datatypes would have a subclass relationship as part of the axiomatic triples.


>> 
>>> 
>>> Q27. Does the following query give<joe>  as an answer, when asked against the previous graphs?
>>> 
>>>    SELECT ?person WHERE { ?person<nbChildren>  2 }
>> 
>> Isn't 2 a shortcut for "2"^^xs:decimal?
> 
> If I remember correctly, 2 is "2"^^xs:integer. If you want xs:decimal, you must write { ?person <nbChildren> 2.0 } or something with a dot.

Yep, I messed that up. If my wish is fulfilled then a sparql + D-entailment would yield yes. Otherwise no.

I.


> 
>> 
>>> 
>>> 
>>> 
>>> Regards,
>>> AZ.
>>> 
>>> Le 19/05/2011 16:40, Alex Hall a écrit :
>>>> On Wed, May 18, 2011 at 2:22 PM, Richard Cyganiak<richard@cyganiak.de>wrote:
>>>> 
>>>>> The RDF 1.1 Literal Quiz
>>>>> ------------------------
>>>>> 
>>>>> Let's pretend we live in the future and RDF 1.1 has just been published,
>>>>> including this working group's attempt to clean up string literals.
>>>>> 
>>>>> Now here's a quiz with some RDF trivia questions.
>>>>> 
>>>>> What are the answers that you'd like to see? Please keep them short --
>>>>> along the lines of “Yes”, “No”, “Don't care”, “Don't prefer but ok”, “Oh yes
>>>>> please please please”, “WTF!?!?”, “Formal objection!”
>>>>> 
>>>>> (I tried to phrase the questions in terms of user-visible behaviour and not
>>>>> spec-internal mechanisms. I hope we can get some non-controversial test
>>>>> cases out of this, and pinpoint where we disagree on desired behaviour. If
>>>>> you provide responses, then feel free to add additional questions.)
>>>>> 
>>>>> 
>>>>> 
>>>>> Q1. Does this RDF graph (written in Turtle) have one triple?
>>>>> 
>>>>>  <a>   <b>   1 .
>>>>>  <a>   <b>   "1"^^xsd:integer .
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q2. Does this RDF graph (written in Turtle) have one triple?
>>>>> 
>>>>>  <a>   <c>   "foo" .
>>>>>  <a>   <c>   "foo"^^xsd:string .
>>>>> 
>>>> 
>>>> Yes - I thought the whole point of this exercise was to enforce that by
>>>> settling on a single representation for that in the abstract syntax.
>>>> 
>>>> 
>>>>> 
>>>>> Q3. Is this be a valid Turtle file?
>>>>> 
>>>>>  <a>   <b>   "foo"^^rdf:PlainLiteral .
>>>>> 
>>>> 
>>>> Valid Turtle, invalid RDF.
>>>> 
>>>> 
>>>>> 
>>>>> Q4. Is a parser allowed to unify "foo" and "foo"^^xsd:string into a single
>>>>> form while parsing?
>>>>> 
>>>> 
>>>> Yes, and hopefully required to.
>>>> 
>>>> 
>>>>> 
>>>>> Q5. Is this a valid N-Triples file?
>>>>> 
>>>>>  <a>   <b>   "foo" .
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q6. Is this a valid N-Triples file?
>>>>> 
>>>>>  <a>   <b>   "foo"^^rdf:PlainLiteral .
>>>>> 
>>>> 
>>>> Valid N-Triples, invalid RDF.
>>>> 
>>>> 
>>>>> 
>>>>> Q7. Is this a valid N-Triples file?
>>>>> 
>>>>>  <a>   <b>   "foo"@en .
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q8. Is this a valid N-Triples file?
>>>>> 
>>>>>  <a>   <b>   "foo"^^xsd:string .
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q9. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo") == xsd:string
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q10. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo") == error
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> 
>>>>> 
>>>>> Q11. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo") == rdf:PlainLiteral
>>>>> 
>>>> 
>>>> I hope not.
>>>> 
>>>> 
>>>>> 
>>>>> Q12. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo"@en) == xsd:string
>>>>> 
>>>> 
>>>> Probably not.
>>>> 
>>>> 
>>>>> 
>>>>> Q13. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo"@en) == error
>>>>> 
>>>> 
>>>> Don't care.
>>>> 
>>>> 
>>>>> 
>>>>> Q14. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo"@en) == rdf:PlainLiteral
>>>>> 
>>>> 
>>>> Don't care.
>>>> 
>>>> 
>>>>> 
>>>>> Q15. Is this true in SPARQL?
>>>>> 
>>>>>  datatype("foo"@en) == rdflang:en
>>>>> 
>>>> 
>>>> Don't care.
>>>> 
>>>> 
>>>>> 
>>>>> Q16. Does the literal in this RDF/XML fragment have a language tag?
>>>>> 
>>>>>  <rdf:Description rdf:about="a" xml:lang="en">
>>>>>   <rdf:b>foo</rdf:b>
>>>>>  </rdf:Description>
>>>>> 
>>>> 
>>>> Don't care.
>>>> 
>>>> 
>>>>> 
>>>>> Q17. Does the literal in this RDF/XML fragment have a language tag?
>>>>> 
>>>>>  <rdf:Description rdf:about="a" xml:lang="en">
>>>>>   <rdf:b rdf:datatype="&xsd;string">foo</rdf:b>
>>>>>  </rdf:Description>
>>>>> 
>>>> 
>>>> Don't care.
>>>> 
>>>> 
>>>>> 
>>>>> For each of the following pairs of statements, if the statement on the left
>>>>> is true, then is the statement on the right true as well in a system that
>>>>> supports datatype inference (specifically, {xsd:string}-Entailment)?
>>>>> 
>>>>> Q18. {<a>   <b>   "foo" . } =>   {<a>   <b>   "foo"^^xsd:string . }
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q19. {<a>   <b>   "foo"^^xsd:string . } =>   {<a>   <b>   "foo" . }
>>>>> 
>>>> 
>>>> Yes.
>>>> 
>>>> 
>>>>> 
>>>>> Q20. {<a>   <b>   "foo" . } =>   {<a>   <b>   "foo"@en . }
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> 
>>>>> 
>>>>> Q21. {<a>   <b>   "foo"@en . } =>   {<a>   <b>   "foo" . }
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> 
>>>>> 
>>>>> Q22. {<a>   <b>   "foo"@en . } =>   {<a>   <b>   "foo"@en-GB . }
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> 
>>>>> 
>>>>> Q23. {<a>   <b>   "foo"@en-GB . } =>   {<a>   <b>   "foo"@en . }
>>>>> 
>>>> 
>>>> No.
>>>> 
>>>> 
>>>>> 
>>>>> Q24. {<a>   <b>   "foo"@fr . } =>   {<a>   <b>   "foo"@en . }
>>>>> 
>>>> 
>>>> 
>>>> No.
>>>> 
>>>> -Alex
>>>> 
>>> 
>>> 
>>> --
>>> Antoine Zimmermann
>>> Researcher at:
>>> Laboratoire d'InfoRmatique en Image et Systèmes d'information
>>> Database Group
>>> 7 Avenue Jean Capelle
>>> 69621 Villeurbanne Cedex
>>> France
>>> Tel: +33(0)4 72 43 61 74 - Fax: +33(0)4 72 43 87 13
>>> Lecturer at:
>>> Institut National des Sciences Appliquées de Lyon
>>> 20 Avenue Albert Einstein
>>> 69621 Villeurbanne Cedex
>>> France
>>> antoine.zimmermann@insa-lyon.fr
>>> http://zimmer.aprilfoolsreview.com/
>>> 
>> 
>> 
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> PGP Key: http://www.ivan-herman.net/pgpkey.html
>> FOAF: http://www.ivan-herman.net/foaf.rdf
>> 
>> 
>> 
>> 
>> 
> 
> 
> -- 
> Antoine Zimmermann
> Researcher at:
> Laboratoire d'InfoRmatique en Image et Systèmes d'information
> Database Group
> 7 Avenue Jean Capelle
> 69621 Villeurbanne Cedex
> France
> Tel: +33(0)4 72 43 61 74 - Fax: +33(0)4 72 43 87 13
> Lecturer at:
> Institut National des Sciences Appliquées de Lyon
> 20 Avenue Albert Einstein
> 69621 Villeurbanne Cedex
> France
> antoine.zimmermann@insa-lyon.fr
> http://zimmer.aprilfoolsreview.com/
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf
Received on Thursday, 19 May 2011 15:34:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:42 GMT