Re: Action-48 text: a New Plan for plain literals

On 2011-05-24, at 10:01, Andy Seaborne wrote:
>> More concerning is code like:
>> 
>> Literal(String lexicalValue, Resource lang_or_dt)
>> {
>> 	if (typeof(lang_or_dt) == Literal) {
>> 		/* it has a language tag */
>> 	} else if (typeof(lang_or_dt) == URI) {
>> 		/* it has a datatype */
>> 	} else {
>> 		/* it has neither */
>> 	}
>> }
>> 
>> We have a lot of such code.
>> 
>> It /might/ all come out in the wash, but it's going to need some care.
> 
> now swap the test and the situation is the same (RDF 1.0) and misses the language (RDF 1.1):
> 
> 	if (typeof(lang_or_dt) == URI) {
> 		/* it has a datatype */
> 	} else if (typeof(lang_or_dt) == Literal) {
> 		/* it has a language tag */
> 
> 
> 
> Of course, we might now end up with a new abstraction - the post-parse abstract graph.

Well, if the "correct" concrete syntax is given to be the "foo"@en form, then pre-2011 RDF systems will continue as before, and post 2011 systems can choose to represent internally as a datatype, or as a lang tag.

The difference would/could be in DATATYPE("foo"@en) in SPARQL.

If people write "foo"^^lang:en, then there will be some issues with pre-2011 systems.

The things I'm keen to avoid are e.g. in SPARQL Results, not having to emit:

   <binding><literal datatype="http://www.w3.org/2001/XMLSchema#string">foo</literal></binding>

For each plain literal result.

- Steve

-- 
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 Tuesday, 24 May 2011 09:39:36 UTC