Template:SPARQL
Usage
<templatedata> { "description": "This template displays SPARQL query with syntax highlighting, prefixes and link to WDQS site to run the query. ", "params": { "p": { "label": "p", "type": "boolean", "required": false, "suggested": false, "deprecated": false, "description": "Produce p: prefix if set" }, "q": { "label": "q", "type": "boolean", "required": false, "suggested": false, "deprecated": false, "description": "Produce q: prefix if set" }, "v": { "label": "v", "type": "boolean", "required": false, "suggested": false, "deprecated": false, "description": "Produce v: prefix if set" }, "query": { "label": "query", "type": "string", "required": true, "suggested": false, "deprecated": false, "description": "SPARQL query" }, "extraprefix": { "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Extra prefixes to be added" }, "state": { "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Either \"collapsed\" or \"expanded\", both make the query code collapsible, \"collapsed\" makes it start collapsed. In a list (\"*\" or \"#\" at beginning of line) the \"Collapse\"/\"Expand\" toggle button is displayed next to the link to the Wikidata Query Service." }, "label": { "type": "content", "required": false, "suggested": false, "deprecated": false, "description": "Text to be used as the label of the link to the Wikidata Query Service", "default": "Try it!" }, "shortURL": { "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "slug of the query's short URL, as generated by the WMF URL shortener - for example, for https://w.wiki/37j enter just 37j" }, "project": { "label": "project", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "project name: 'wd' for Wikidata (default), 'sdc' for Structured Data on Commons, or the URL of another compatible query service (e.g. 'https://database.factgrid.de/query/' – note that this must be a page with the query UI frontend, not the SPARQL endpoint itself)" }, "embedded": { "label": "Embedded", "type": "string", "required": false, "suggested": true, "deprecated": false, "description": "Shall the link direct user to the results (yes) or to the code (no, empty)" }, "highlight": { "label": "Highlight", "description": "Line(s) in the source code to be highlighted. See mediawiki:Extension:SyntaxHighlight for the supported syntax", "example": "3-7", "type": "line" }, "qlever": { "label": "QLever", "description": "Add link to QLever (only supported for project=wd or project=sdc)", "type": "boolean", "default": "false", "example": "true"
},
"scholarly": { "label": "query-scholarly", "description": "Add link to query-scholarly (only supported for project=wd)", "type": "boolean", "default": "false", "example": "true" }, "orb": { "label": "Orb Open Graph", "description": "Add link to Orb Open Graph", "example": "true", "type": "boolean", "default": "false" } }, "format": "block" } </templatedata>
Példák (hu) / Vuesiehtimmieh (sma) / Contoh (ms) / Engreifftiau (cy) / Shembuj (sq) / Eksempler (da) / Exemple (ro) / 例 (ja) / exempel (sv) / Приклади (uk) / 範例 (zh-hant) / Esimerkit (fi) / Ekzemploj (eo) / Příklady (cs) / Esempi (it) / উদাহরণসমূহ (bn) / Exemples (fr) / Прыклады (be-tarask) / Beispiele (de) / Παραδείγματα (el) / דוגמאות (he) / Exemplos (pt) / Ovdamearkkat (se) / 용례들 (ko) / Mînak (ku) / Примери (sr) / Примери (mk) / چونتوه (ms-arab) / Exemplos (pt-br) / Døme (nn) / ตัวอย่าง (th) / Mifano (sw) / Eksempler (nb) / Voorbeelden (nl) / Contoh (id) / Примеры (ru) / Ví dụ (vi) / Examples (en-gb) / Examples (en) / أمثلة (ar) / 示例 (zh-hans) / ezenpi (vec)
⧼wm-commonstrings-seealso⧽
Warning: If you use the pipe character ("|") in your query, you need to replace it with {{!}}
{{SPARQLText}}syntax highlighted query text{{SPARQL}}shows query text, links to the non-executed query (this template){{SPARQL2}}with item/property listing{{SPARQL5}}with item/property listing{{SPARQL6}}with item/property listing, indentable{{SPARQL8}}inline (no query text), links to the non-executed query{{SPARQL9}}same as SPARQL?{{SPARQL Inline}}inline (no query text), links to the non-executed query and or the results page{{SPARQL Box}}inline (no query text) styled as a centered paragraph box, links to the non-executed query{{Wdquery}}inline (no query text), links to the non-executed query, rather than to the results page{{Quickquery}}simple graph patterns, allows to set limit and defaultView{{Query page}}query stored on a dedicated wiki page, to be transcluded into other pages
| Lua error in Module:Autotranslate at line 72: No fallback page found for autotranslate (base=Template:Documentation/text, lang=⧼lang⧽). Lua error in Module:Autotranslate at line 72: No fallback page found for autotranslate (base=Template:Documentation/text, lang=⧼lang⧽). Lua error in Module:Autotranslate at line 72: No fallback page found for autotranslate (base=Template:Documentation/text, lang=⧼lang⧽). Lua error in Module:Autotranslate at line 72: No fallback page found for autotranslate (base=Template:Documentation/text, lang=⧼lang⧽). |