Re: ISSUE-12: xs:string VS plain literals: proposed resolution

On May 6, 2011, at 7:32 AM, Alex Hall wrote:

> On Friday, May 6, 2011, Andy Seaborne <andy.seaborne@epimorphics.com> wrote:
>> 
>> 
>> On 04/05/11 20:13, Pat Hayes wrote:
>> 
>> I am confused. There seems to now be a consensus view that plain,
>> untyped literals are a Good Thing, to be preferred to clunky typed
>> literals.  But the last time I encountered this whole issue of plain
>> literals in RDF, there was a very strong consensus that plainness was
>> a problem, and everything would be better if - in fact, for some,
>> life would be possible only if - all literals had a type. Which is
>> why the rdf:PlainLiteral type was invented, to be the type of these
>> anomalous entities that had no type, in order that every literal
>> would have a type.
>> 
>> So, can anyone enlighten me? Are typed literals good or bad? Is
>> plainness beautiful, or a dire problem? And are there any actual
>> arguments either way, or is this all based on intuition and
>> aesthetics?
>> 
>> Pat
>> 
>> 
>> I can take a partial explanation of this ... hopefully we can build a complete picture.  This is only my post hoc rationalisation.
>> 
>> People writing data like to write "foo".  They don't really see the need to write "foo"^^xsd:string.  Just like writing 123 for "123"^^xsd:integer. This is the syntax and appearance side of the issue.  What is serialized by "foo"?
> 
> If that's the only reason to have untyped literals then I'd prefer to
> see all literals as typed in the abstract syntax and "a" used as a
> shortcut for "a"^^xsd:string in the concrete syntax. It would simplify
> implementation logic (no longer have to check for no datatype as a
> special case) and align better with RIF and OWL.

I entirely agree. Anything to do with 'people like to write' belongs in a discussion of how to write better GUIs, not in the RDF core syntax. THe arguments for having all literals typed seemed to me, and still seem to me, to be very strong.

> It does leave open
> the question of how to treat language tags.
> 
> I hesitate to formally propose that, however, because it would mean
> reworking a lot of legacy code, and because making such a major change
> to the RDF Concepts the week SPARQL goes to last call could jeopardize
> their work.

Would it be better to wait until after they have published the Rec? At least they can make a change after LC, if the need is pressing. And keeping RDF and SPARQL in alignment does seem to be a pretty fundamental requirement. 

Pat

> 
> -Alex
> 
>> 
>> This carries over into XML: <property>foo<property>
>> 
>> XML does not have datatypes for strings with a language; it has a separate mechanism for language and datatype.  I'd guess teh argument ran that because
>>  <property xml:lang="cy">foo<property>
>> isn't typed so why should
>>  <property>foo<property>
>> be.  Can someone from last time add some history here?
>> 
>> rdf:PlainLiteral solves another part of the problem space.  It means there is a datatype for every kind of literal, which is very helpful in RIF and OWL.  The "consensus that plainness was a problem" came from that direction.  rdf:PlainLiteral should never appear as a datatype in RDF - it's supposed to be handled at the boundary so systems wishing to handle literals always with a datatype can use this - otherwise we now have yet-another-way of writing the text "foo".
>> 
>> I wonder if most people would be happen if we emphasised that it's the value that matters.  xsd:string and simple literal have the same value, as do 00123 and +123.
>> 
>>        Andy
>> 
>> 
> 
> 

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973   
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes

Received on Friday, 6 May 2011 14:22:30 UTC