Template:SPARQL: Difference between revisions

From MiMoText
Jump to navigation Jump to search
(Created page with "<onlyinclude><!-- --><templatestyles src="SPARQL/styles.css" /><!-- --><div class="wdt-sparql-container {{#if:{{{state|}}}|wdt-sparql-container-collapsible}}"><!-- --><div {{#switch: {{{state|}}} | collapsed = class="mw-collapsible mw-collapsed" | expanded = class="mw-collapsible" }} ><!-- -->{{#tag:syntaxhighlight|{{SPARQLText|p={{{p|}}}|q={{{q|}}}|v={{{v|}}}|query={{#invoke:ConcatArgs|ConcatArgs|init=query|min=1}}|extraprefix={{{extraprefix|}}} }}|lang="...")
 
(+ rdfs prefix in QLever)
Line 14: Line 14:
     # the link label
     # the link label
     -->{{{label|{{#if: {{#invoke:SPARQLMentions|getTitle|{{{query}}}}}|{{#invoke:SPARQLMentions|getTitle|{{{query}}}}}|{{int try it}}}}}}}] <!--
     -->{{{label|{{#if: {{#invoke:SPARQLMentions|getTitle|{{{query}}}}}|{{#invoke:SPARQLMentions|getTitle|{{{query}}}}}|{{int try it}}}}}}}] <!--
      
 
     # Optional QLever link
    -->{{#if: {{{qlever|}}} | ([{{#switch:{{{project|wd}}}|wd=//qlever.cs.uni-freiburg.de/wikidata/|sdc=//https://qlever.cs.uni-freiburg.de/wikimedia-commons/}}?query={{urlencode:PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> {{SPARQLText|p={{{p|}}}|q={{{q|}}}|v={{{v|}}}|query={{#invoke:ConcatArgs|ConcatArgs|init=query|min=1}}|extraprefix={{{extraprefix|}}} }} | PATH }} QLever])}} <!--
 
     # add the short url, if any
     # add the short url, if any
     -->{{#if: {{{shortURL|}}} | (<nowiki />https://w.wiki/{{{shortURL}}}<nowiki />) }}<!--
     -->{{#if: {{{shortURL|}}} | (<nowiki />https://w.wiki/{{{shortURL}}}<nowiki />) }}<!--

Revision as of 16:37, 4 September 2023