query-feef473a3034aae9333c1926060aaf93
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
SELECT *
WHERE
{
VALUES ?article
{
<https://en.wikipedia.org/wiki/Murphy's_law>
<https://it.wikipedia.org/wiki/Sócrates>
}
# Correct the encoding ...
BIND (STR(?article) AS ?str)
BIND (STRAFTER(?str, ".wikipedia.org/wiki/") AS ?title)
BIND (STRBEFORE(?str, ?title) AS ?site)
BIND (URI(CONCAT(?site, ENCODE_FOR_URI(?title))) AS ?encoded_URI)
OPTIONAL { ?encoded_URI schema:about ?item . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?article"):::projected
v5("?encoded_URI"):::projected
v6("?item"):::projected
v4("?site"):::projected
v2("?str"):::projected
v3("?title"):::projected
bind0[/VALUES ?article/]
bind0-->v1
bind00([https://en.wikipedia.org/wiki/Murphy's_law])
bind00 --> bind0
bind01([https://it.wikipedia.org/wiki/Sócrates])
bind01 --> bind0
bind1[/"str(?article)"/]
v1 --o bind1
bind1 --as--o v2
bind2[/"substring-after(?str,'.wikipedia.org/wiki/')"/]
v2 --o bind2
bind2 --as--o v3
bind3[/"substring-before(?str,?title)"/]
v2 --o bind3
v3 --o bind3
bind3 --as--o v4
bind4[/"concat(?site,encode-for-uri(?title))"/]
v4 --o bind4
v3 --o bind4
bind4 --as--o v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v6
end