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

Re: Can you query rdf:List easily? (WAS Re: update on vCard edits and The Compromise)

From: Danny Ayers <danny.ayers@gmail.com>
Date: Mon, 30 Jul 2007 11:49:10 +0100
Message-ID: <1f2ed5cd0707300349p375fe1d5pfafcde492a64fd0f@mail.gmail.com>
To: andy.seaborne@hp.com
Cc: bnowack@appmosphere.com, "Garret Wilson" <garret@globalmentor.com>, "Harry Halpin" <hhalpin@ibiblio.org>, "Semantic Web" <semantic-web@w3.org>

I'm late to the thread, so apologies if this has been covered already:

Harry's data, reworked to use literals, would look something like:

_:lola
 vCard:additionalNames  ( "Edward" "Reeves"  ) .

- the object here is a list, so the plural-named property seems reasonable.

Similar information could be conveyed as:

_:lola vCard:additionalName "Edward" ;
         vCard:additionalName "Reeves" .

(or similar, intermediated with an rdf:Bag)

What I'm wondering is, is there any reason (beyond saving space) for
not using both forms simultaneously? Have the benefits of rdf:List
along with SPARQL-friendliness..?

btw, here's a fun way of querying lists (not *that* ugly a beast):

SELECT ?w ?x ?y ?z
{
   OPTIONAL {
     ?person vCard:additionalNames ( ?w ) .
   }
   OPTIONAL {
     ?person vCard:additionalNames ( ?w ?x ) .
   }
   OPTIONAL {
     ?person vCard:additionalNames ( ?w ?x ?y ) .
   }
   OPTIONAL {
     ?person vCard:additionalNames ( ?w ?x ?y ?z ) .
   }
}

Cheers,
Danny.

-- 

http://dannyayers.com
Received on Monday, 30 July 2007 10:49:13 UTC

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