incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Story <>
Subject Re: Should strings be plain literals or xsd:Strings by default?
Date Mon, 20 Jun 2011 10:32:59 GMT

On 20 Jun 2011, at 12:15, Reto Bachmann-Gmuer wrote:

> Currently the literal factory returns xsd:String-literals for strings (the
> literal factory only produces typed literals). By contrast EasyGraph (which
> is imported by default on the shell converts to Plain Literals as the
> following Tests shows:
> @Test
>    def useStringAsObject {
>        val t = new TripleImpl(new UriRef(("")),
> new UriRef(("")), "a value")
>        Assert.assertEquals(new PlainLiteralImpl("a value"), t.getObject)
>    }
> I think for strings that are not natural language it is better to use
> xsd:String, so I suggest only to convert literals with a specified language
> implicitly to plain literals and use xsd:String otherwise.
> Any other opinion on this?

Is there a semantic difference between "hello" and "hello"^^xsd:string ?

I think there is not, and I'd hope that in the RDF DBs all sss^^xsd:string get converted
to pure sss strings . In the syntax I can see that there is a difference, in that if in rdfa
puts the language tag somewhere, then, when someone writes "hello" it will be parsed as
"hello"@en, which is different. But then that would be an issue for parsers.

I suppose one should be consistent, but I am not sure which way one should be consistent in.
I doubt we have very good reason either way, so whatever is chosen I'd flag it as arbitrary,
we have a good reason for why we think a choice is necessary.


> Cheers,
> Reto

Social Web Architect

View raw message