W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2009

Re: [AccessingRdfLists] relationship with property paths?

From: Chimezie Ogbuji <ogbujic@ccf.org>
Date: Tue, 31 Mar 2009 18:25:49 -0400
To: "Lee Feigenbaum" <lee@thefigtrees.net>, "SPARQL Working Group" <public-rdf-dawg@w3.org>
Message-ID: <C5F810AD.90E1%ogbujic@ccf.org>
During today's teleconference the issue about whether or not property path
support is sufficient for supporting access to RDF lists came up.  I happen
to think property path support is generally useful for more than just
meeting this particular requirement.  For the caveat below, assuming the
scenario where you don't know what the start of the list is (which I would
imagine is rare), wouldn't you be able to achieve a result without
duplicates with the following query?:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  UNSAID { [] rdf:rest ?list }
  ?list rdf:rest*/rdf:first ?member

I.e., so the path matching *begins* with _:b1?

Note: Sorry for the use of two feature requests, but w/out UNSAID, it would
be cumbersome to write :)

-- Chimezie

Andy wrote:
> PREFIX  rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> SELECT * { ?list rdf:rest*/rdf:first ?member }
> Because if the data is:
> ---- Data:
> ("A" "B" "C") .
> Which is in triples:
> ---- Same data:
> _:b1      rdf:first  "A" .
> _:b1      rdf:rest  _:b2 .
> _:b2      rdf:first  "B" .
> _:b2      rdf:rest  _:b3 .
> _:b3      rdf:first  "C" .
> _:b3      rdf:rest  rdf:nil .
> ----

> The results are:
> -----------------
> | list | member |
> =================
> | _:x0 | "B"    |
> | _:x0 | "C"    |
> | _:x1 | "A"    |
> | _:x1 | "B"    |
> | _:x1 | "C"    |
> | _:x2 | "C"    |
> -----------------
> If ?list is bound it would work.


P Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2008).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and

Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.
Received on Tuesday, 31 March 2009 22:26:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:56 UTC