W3C home > Mailing lists > Public > semantic-web@w3.org > July 2007

Re: update on vCard edits and The Compromise

From: Benjamin Nowack <bnowack@appmosphere.com>
Date: Thu, 26 Jul 2007 17:06:47 +0200
To: Harry Halpin <hhalpin@ibiblio.org>
Cc: Garret Wilson <garret@globalmentor.com>, Semantic Web <semantic-web@w3.org>, "Bruce D'Arcus" <bdarcus@gmail.com>
Message-ID: <PM-GA.20070726170647.8702A.2.1D@mailout.appmosphere.com>


(sorry, accidentally sent an incomplete reply, not to the semweb list,
though)

On 26.07.2007 09:39:28, Harry Halpin wrote:
>Bruce D'Arcus wrote:
>> Everyone I have talked to has discouraged use of rdf:Seq. 
Yes, I think that's a reasonable general suggestion, which should cover
both collections and containers (i.e. if you can model your domain
w/o explicit ordering, great.). But when it comes to seq vs. list,
I found seq to be more efficient.

>>AFAIK, you
>> cannot really query it (rdf:Seq) reliably with SPARQL either, though 
>>am not sure of that.
>Is that true? Oh dear. Anyone have more info?
You should be able to do (pseudo-sparql):

[[
   SELECT ?pos ?name WHERE {
       <#card4711> vcard:additional-names [ ?pos ?name ] .
   }
   ORDER BY ?pos .
]]

or (expanded):

[[
   SELECT ?pos ?name WHERE {
       <#card4711> vcard:additional-names ?seq .
       ?seq       ?pos ?name .
   }
   ORDER BY ?pos .
]]

Something like this at least lets you retrieve the names in one 
query, most stores should even get the sorting right (at least 
for i<10). SPARQLing rdf:List/rest/nil is more complicated or 
not possible at all if you don't know the list length.

(The query above will include the rdf:type=rdf:Seq triple, but
you could get rid of the non-rdf:li information via a FILTER 
or simple custom code.)


best,
benjamin

--
Benjamin Nowack
http://bnode.org/
Received on Thursday, 26 July 2007 15:07:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:58 UTC