query-cc13800de148a8dacd94fe440eea3910
HughLillygcmlimit=maxprop=revisionsLIMIT 10rvslots=mainhttps://www.w3schools.com/xml/xpath_intro.asp
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT * WHERE {
BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file)
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator";
wikibase:endpoint "commons.wikimedia.org";
mwapi:gcmtitle "Category:1930s photographs in Auckland Museum";
mwapi:generator "categorymembers";
mwapi:gcmtype "file";
mwapi:gcmlimit "10";
mwapi:prop "revisions";
mwapi:rvslots "main";
mwapi:rvprop "content";
wikibase:limit "once".
?title wikibase:apiOutput mwapi:title.
?pageid wikibase:apiOutput mwapi:pageid.
?contentmodel wikibase:apiOutput 'revisions/rev/slots/slot/@contentmodel'.
?contentformat wikibase:apiOutput 'revisions/rev/slots/slot/@contentformat'.
?content wikibase:apiOutput 'revisions/rev/slots/slot/text()'.
}
}
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?content"):::projected
v5("?contentformat"):::projected
v4("?contentmodel"):::projected
v1("?file"):::projected
v3("?pageid"):::projected
v2("?title"):::projected
c25(["mwapi:pageid"]):::iri
c18(["main"]):::literal
c20(["content"]):::literal
c2(["bd:serviceParam"]):::iri
c12(["file"]):::literal
c26(["revisions/rev/slots/slot/@contentmodel"]):::literal
c16(["revisions"]):::literal
c6(["commons.wikimedia.org"]):::literal
c14(["10"]):::literal
c8(["Category:1930s photographs in Auckland Museum"]):::literal
c10(["categorymembers"]):::literal
c22(["once"]):::literal
c27(["revisions/rev/slots/slot/@contentformat"]):::literal
c24(["mwapi:title"]):::iri
c28(["revisions/rev/slots/slot/text()"]):::literal
c4(["Generator"]):::literal
bind0[/"concat('https://commons.wikimedia.org/entity/M',?pageid)"/]
v3 --o bind0
bind0 --as--o v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:api"--> c4
c2 --"mwapi:endpoint"--> c6
c2 --"mwapi:gcmtitle"--> c8
c2 --"mwapi:generator"--> c10
c2 --"mwapi:gcmtype"--> c12
c2 --"mwapi:gcmlimit"--> c14
c2 --"mwapi:prop"--> c16
c2 --"mwapi:rvslots"--> c18
c2 --"mwapi:rvprop"--> c20
c2 --"mwapi:limit"--> c22
v2 --"mwapi:apiOutput"--> c24
v3 --"mwapi:apiOutput"--> c25
v4 --"mwapi:apiOutput"--> c26
v5 --"mwapi:apiOutput"--> c27
v6 --"mwapi:apiOutput"--> c28
end