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

Re: The RDF 1.1 Literal Quiz

From: Gavin Carothers <gavin@topquadrant.com>
Date: Wed, 18 May 2011 13:09:30 -0700
Message-ID: <BANLkTikijwreK1DZ2oURufpQPPO82oKX7A@mail.gmail.com>
To: Richard Cyganiak <richard@cyganiak.de>
Cc: RDF Working Group WG <public-rdf-wg@w3.org>
On Wed, May 18, 2011 at 11:22 AM, Richard Cyganiak <richard@cyganiak.de> wrote:
> The RDF 1.1 Literal Quiz
> ------------------------
>
> 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.

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

Yes, but may not mean what you think it does. Trying to limit what
kind of datatypes are allowed in Turtle seems like a bad idea.
>
> Q4. Is a parser allowed to unify "foo" and "foo"^^xsd:string into a single form while parsing?

Yes.

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

No, 'cause <a>, <b> aren't IRIs </pedantic> Otherwise Yes.

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

Yes. ... and again MAY not mean what you think it does

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

Prefer no. Others at TQ may disagree.

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

Wish it were so.

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

No.

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

I hope not.

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

I fear trying to put language tags into an RDF ontology, the combing
nature fills me with dread.

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

Ship has sailed, yes.

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

Oh god... yes?

>
> 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, but some other operator/function should say yes.

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

No, but some other operator/function should say yes.

>
> Q22. { <a> <b> "foo"@en . } => { <a> <b> "foo"@en-GB . }

No... but some other operator/function should say yes.

>
> Q23. { <a> <b> "foo"@en-GB . } => { <a> <b> "foo"@en . }

No... but some other operator/function should say yes.
>
> Q24. { <a> <b> "foo"@fr . } => { <a> <b> "foo"@en . }

NO. Would be very annoyed to discover I was suddenly speaking French.
Received on Wednesday, 18 May 2011 20:09:59 GMT

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