W3C home > Mailing lists > Public > semantic-web@w3.org > January 2010

Re: Requirements for a possible "RDF 2.0"

From: Danny Ayers <danny.ayers@gmail.com>
Date: Tue, 19 Jan 2010 01:04:21 +0100
Message-ID: <1f2ed5cd1001181604n1e4cb3afjcd781fc0d53b0636@mail.gmail.com>
To: Kjetil Kjernsmo <kjetil@kjernsmo.net>
Cc: semantic-web@w3.org
2010/1/18 Kjetil Kjernsmo <kjetil@kjernsmo.net>:
> On Monday 18. January 2010 18:57:37 Danny Ayers wrote:
>> and the ESW Wiki page which has unit-specific examples:
>>
>>    http://esw.w3.org/topic/InterpretationProperties
>>
>> (note in particular the "train wreck" mentioned there - an easy trap
>> to fall into)
>
> Yep, but that page is several years old, and I've seen very little uptake,
> and I tend to think it is because it is too complex. It is not sufficient
> to say that "it can be done", it has be done in a way that people can live
> with. That's why I think this needs attention in RDF 1.1 or 2.0.

I can't see how it could be much simpler.

> I'll just throw something out there:
> @prefix : <http://example.org/> .
> @prefix u: <http://example.org/units> .
>
> :foo :weighs "15"¤u:kg .
> :bar :weighs "20"¤u:lb .
>
> where the ¤ character is used to say the literal has a unit, and expect a
> query like
>
> SELECT sum(?weight) AS ?totalweight¤u:kg
> WHERE {
>  ?var :weighs ?weight .
> }
>
> and
>
> SELECT ?weight
> WHERE {
>  ?var :weighs ?weight .
>  FILTER (?weight > "10"¤u:kg)
> }
>
> and expect that to do the right thing (i.e. 24.07 kg and 15 kg).
>
> It would require some arithmetic on the query engine, but it can't be all
> that difficult, can it?

Why not -

:foo u:kg "15" .
:bar u:lb "20" .

There's still the issue of arithmetic, but something like this, maybe -

SELECT sum(?kgweight + 2.2*?lbweight)

WHERE {
   OPTIONAL {
       ?x u:kg ?kgweight .
   }
   OPTIONAL {
       ?x u:kg ?lbweight .
   }
}

surely easier?

Cheers,
Danny.
Received on Tuesday, 19 January 2010 00:04:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:48:05 UTC