Difference between revisions of "Template:SPARQL"

From sportsdamkg
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<!--
<languages/>
</noinclude><!--
-->{{#tag:syntaxhighlight|{{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|lang="sparql"}}
-->{{#tag:syntaxhighlight|{{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|lang="sparql"}}
[{{{endpoint|http://sportsdamkg.slis.ua.edu/}}}#{{urlencode: {{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|PATH}}{{#if:{{{namespace|}}}|%20#namespace={{{namespace}}}|}} Try it!<!--
[{{{endpoint|https://sportsdamkg.slis.ua.edu/sparql}}}#{{urlencode: {{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|PATH}}{{#if:{{{namespace|}}}|%20#namespace={{{namespace}}}|}} Try it!]<!--
--><noinclude>
--><noinclude>
{{documentation|content=
{{documentation|content=

Latest revision as of 17:02, 23 September 2021

{{{query}}}

Try it!

Template documentation

This template displays SPARQL query with syntax highlighting, prefixes and link to WDQS beta site to run the query.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
queryquery

SPARQL query

Example
SELECT * WHERE { ?x wdt:P31 wd:Q5 } LIMIT 1
Stringrequired
extraprefixextraprefix

Extra prefixes to be added

Example
PREFIX wikibase: <http://wikiba.se/ontology#>
Stringoptional
namespacenamespace

Namespace for query

Example
categories
Unknownoptional
endpointendpoint

Endpoint for query, if different from the default wikidata one

Example
https://dcatap.wmflabs.org/
URLoptional

[[Category:Template documentation pages{{#translation:}}]]