Re: The RDF 1.1 Literal Quiz

Hmm.  Here are my answers, along with some editorial comments.

From: Richard Cyganiak <richard@cyganiak.de>
Subject: The RDF 1.1 Literal Quiz
Date: Wed, 18 May 2011 13:22:17 -0500

> 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 .

It did, so it does, and will always, for ever and ever.  Amen.

> Q2. Does this RDF graph (written in Turtle) have one triple?
> 
>  <a> <c> "foo" .
>  <a> <c> "foo"^^xsd:string .

A1: It didn't, so it doesn't, and will never, for ever and ever.  Amen.
A2: It did, so it does, and will always, for ever and ever.  Amen.

> Q3. Is this be a valid Turtle file?
> 
>  <a> <b> "foo"^^rdf:PlainLiteral .

It was, so it is, and will be, for ever and ever.  Amen.
 
> Q4. Is a parser allowed to unify "foo" and "foo"^^xsd:string into a
> single form while parsing?

Parsers don't perform unification.

> Q5. Is this a valid N-Triples file?
> 
>  <a> <b> "foo" .

It was, so it is, and will be, for ever and ever.  Amen.

> Q6. Is this a valid N-Triples file?
> 
>  <a> <b> "foo"^^rdf:PlainLiteral .

It was, so it is, and will be, for ever and ever.  Amen.

> Q7. Is this a valid N-Triples file?
> 
>  <a> <b> "foo"@en .

It was, so it is, and will be, for ever and ever.  Amen.

> Q8. Is this a valid N-Triples file?
> 
>  <a> <b> "foo"^^xsd:string .

It was, so it is, and will be, for ever and ever.  Amen. 

> Q9. Is this true in SPARQL?
> 
>  datatype("foo") == xsd:string

SPARQL?  What's that?

> Q10. Is this true in SPARQL?
> 
>  datatype("foo") == error

SPARQL?  What's that?
 
> Q11. Is this true in SPARQL?
> 
>  datatype("foo") == rdf:PlainLiteral

SPARQL?  What's that?
 
> Q12. Is this true in SPARQL?
> 
>  datatype("foo"@en) == xsd:string

SPARQL?  What's that?
 
> Q13. Is this true in SPARQL?
> 
>  datatype("foo"@en) == error

SPARQL?  What's that?
 
> Q14. Is this true in SPARQL?
> 
>  datatype("foo"@en) == rdf:PlainLiteral

SPARQL?  What's that?
 
> Q15. Is this true in SPARQL?
> 
>  datatype("foo"@en) == rdflang:en

SPARQL?  What's that?
 
> 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>

It did, so it does, and will do so, for ever and ever.  Amen.

> 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>

It didn't, so it doesn't, and will never have so, for ever and ever.  Amen.

> 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)?

What is truth? 
 
> Q18. { <a> <b> "foo" . } => { <a> <b> "foo"^^xsd:string . }

It was, so it is, and will be, for ever and ever.  Amen.

> Q19. { <a> <b> "foo"^^xsd:string . } => { <a> <b> "foo" . }

It was, so it is, and will be, for ever and ever.  Amen.

> Q20. { <a> <b> "foo" . } => { <a> <b> "foo"@en . }

It was not, so it isn't, and will never be, for ever and ever.  Amen.
 
> Q21. { <a> <b> "foo"@en . } => { <a> <b> "foo" . }

It was not, so it isn't, and will never be, for ever and ever.  Amen.
 
> Q22. { <a> <b> "foo"@en . } => { <a> <b> "foo"@en-GB . }

It was not, so it isn't, and will never be, for ever and ever.  Amen.
 
> Q23. { <a> <b> "foo"@en-GB . } => { <a> <b> "foo"@en . }

It was not, so it isn't, and will never be, for ever and ever.  Amen.
 
> Q24. { <a> <b> "foo"@fr . } => { <a> <b> "foo"@en . }

Ce n'était pas, il n'est donc pas, et ne sera jamais, pour toujours et à
jamais. Amen. 


peter

Received on Wednesday, 18 May 2011 18:50:38 UTC