- From: Kjetil Kjernsmo <kjetil@kjernsmo.net>
- Date: Mon, 18 Jan 2010 23:43:03 +0100
- To: semantic-web@w3.org
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'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? Cheers, Kjetil -- Kjetil Kjernsmo kjetil@kjernsmo.net http://www.kjetil.kjernsmo.net/
Received on Monday, 18 January 2010 22:43:54 UTC