Re: Comments on this afternoon session on Turtle (ISSUE-12)

On 2011-04-18, at 11:24, Andy Seaborne wrote:
> 
> On 16/04/11 18:32, Lee Feigenbaum wrote:
>> On 4/16/2011 11:26 AM, Richard Cyganiak wrote:
>>> (Tagging this as ISSUE-12)
>>> 
>>> On 14 Apr 2011, at 14:50, Antoine Zimmermann wrote:
>>>> I don't want xs:string to be marked as archaic because if it is,
>>>> then it means that I am not welcome to write something like:
>>>> 
>>>> :passportNumber rdfs:range xs:string .
>>> 
>>> Personally I don't mind xsd:string being used in range declarations
>>> to indicate that the value has to be a plain literal without language
>>> tag.
>> 
>> What do you think should be the return of datatype("foo")? I'd like it
>> to be xs:string.
>> 
>>> The problem with xsd:string typed literals is that for authors, the
>>> choice between "foo" and "foo"^^xsd:string is arbitrary, but those
>>> who want to query the data or access it in an API need to know what
>>> choice the author made. This is a constant source of usability
>>> issues. Hence the desire to normalize both forms internally.
>> 
>> Agreed. Note that either approach (normalizing to plain literals or to
>> xs:string literals) would accomplish this.
>> 
>> [snip]
>> 
>>>> Still, I am in favour of simplifying things, so instead of doing
>>>> nothing, I would rather have plain literals without language tag
>>>> removed altogether and replaced by typed literals of type
>>>> xs:string.
>>> 
>>> I think it's important that the canonical form is "foo" rather than
>>> "foo"^^xsd:string because writing the latter is awkward in all
>>> syntaxes.
>> 
>> I agree, but I don't think the syntax issue is a big deal. What I would
>> propose is something like:
>> 
>> + Eliminate (or make archaic or what not) plain literals from RDF
>> abstract syntax.
>> 
>> + Note that all plain literals ought to be interpreted as xs:string
>> literals, in all syntaxes. In Turtle, this would mean that "foo" is a
>> syntactic shortcut for "foo"^^xs:string, the same way that 14 is a
>> shortcut for "14"^^xsd:integer.
>> 
>> Basically, I'm motivated by:
>> 
>> * datatype("foo") = xs:string
> 
> Just so we get the details sorted out:
> 
> datatype(simple literal) is already xsd:string in SPARQL 1.0
> 
> and
> 
> lang(typed literal) = ""
> 
> (I can't remember why it's not an error - Eric?)

Just guessing, but SPARQL 1.0 didn't have COALESCE, so it would have required some hoop-jumping to find the literals without a language tag.

>> * ...retaining the ability to have properties with rdfs:range xs:string
>> * ...retaining the ability to write "foo" in Turtle and Turtle-like
>> syntaxes
> 
> This to me is as important as anything else.  "foo", "foo"^^xsd:string being the same (not just as an entailment as per xsd 1a/1b).

Yes.

- Steve

>> * ...having "foo" match "foo"^^xs:string in SPARQL basic graph pattern
>> matching
> 
> at the simple entailment level.  Canonicalizing on input is possible.
> 
> 	Andy
> 
>> 
>> Lee
>> 
>>> Best, Richard
>>> 
>> 
> 

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

Received on Monday, 18 April 2011 11:18:05 UTC