- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Wed, 1 Feb 2006 13:01:29 -0500
- To: Kendall Clark <kendall@monkeyfist.com>, Pat Hayes <phayes@ihmc.us>
- Cc: public-rdf-dawg@w3.org
- Message-ID: <20060201180129.GN14867@w3.org>
Persuant to ACTION: EricP to provide a "SPARQL++" example query in the accessingCollections neighborhood here are some viable (and used) extensions to the SPARQL: My manifest processing code nees to walk through all the memebers of a list so I introduced functions in the graph pattern: [[ SELECT ?name ?comment ?result WHERE { ?m mf:entries members(?entry) . ?entry mf:name ?name . OPTIONAL { ?entry rdfs:comment ?comment } . OPTIONAL { ?entry mf:result ?result } } ]] For convenient data inspection, I added expresions in the SELECT: [[ SELECT DATATYPE(?x) WHERE { <stata> :height ?x } ]] These expressions can have booleans and all the other stuff in them: [[ SELECT ?name (BOUND(?employee) || BOUND(?manager)) WHERE { ?who :name ?name . OPTIONAL { ?who :worksFor ?manager } OPTIONAL { ?employee :worksFor ?who } } ]] PatH, perhaps you'd like to take this into the owl:oneOf realm? During the meeting, I proposed (as a thought exercise) flags to control processing ala: [[ SELECT * --FOLLOW_SEEALSO WHERE { ?s ?p ?o } ]] -- -eric office: +81.466.49.1170 W3C, Keio Research Institute at SFC, Shonan Fujisawa Campus, Keio University, 5322 Endo, Fujisawa, Kanagawa 252-8520 JAPAN +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA cell: +81.90.6533.3882 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution.
Received on Wednesday, 1 February 2006 18:01:33 UTC