Search for lists with multiple required values
, , . ? S, ? List, , , . values .
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns
select ?s {
?s <http://foo.org/name> ?list .
filter not exists {
values ?word { "new" "york" }
filter not exists {
?list rdf:rest*/rdf:first ?word
}
}
}
--------------------------
| s |
==========================
| <http://foo.org/test2> |
--------------------------
, , , . , "" "york" . "" "york" . (? T = "new" ||? T = "york" ) : (? t in ( "", "" )). :
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns
select ?s ?t {
?s <http://foo.org/name>/rdf:rest*/rdf:first ?t .
filter(?t in ("new","york"))
}
-----------------------------------
| s | t |
===================================
| <http://foo.org/test2> | "new" |
| <http://foo.org/test2> | "york" |
| <http://foo.org/test> | "new" |
-----------------------------------