SPARQL support is the addon of the CodeMirror to support editing SPARQL queries in a textarea.
Auto-Completion : "Ctrl+Space" or "Tab", Submit : "Ctrl+Enter"

Set endpoint

## endpoint                                                   * 1st line only

Or sparql-doc format (refer to the following 'Beta' section)


Complement indents, variable names and prefixes with the "Ctrl+Space" or "Tab" key.

?h|             -->   ?hoge|
r|              -->   rdf:|                                                       * lower case
F|              -->   FILTER (|)                                                  * upper case
PREFIX obo:|    -->   PREFIX obo: <>|              * 1
<id>|           -->   <>|                                  * 2

*1 Prefix URIs will be taken from
*2 Private abridgement of URIs. Default has only this example. User is able to add in the comment line.(format : # id:<>)

Copy code and prefixes in other query.

e.g.) copy the 2nd query prefixes
PREFIX #2|    -->   PREFIX rdf: <>     * 3
                    PREFIX rdfs: <>
                    PREFIX dct: <>
e.g.) copy the 1st query
COPY #1|      -->   omit

*3 run in the 1st line of textarea.

Other completion

##|  ->   ## endpoint|                                 * 1st line only (recently used endpoints)
Def|  ->   DEFINE sql:select-option "order"|                                       * (for Virtuoso)

Tabbed Interface

Available multiple queries management by the '+' and the '-' button in the upper right corner. Queries are retained when the browser is restarted.
"Ctrl+Shift" : move to neighbor tab ("Ctrl+Alt+Shift", "Ctrl+[1-9]")
"Ctrl+[+/-]" : add/remove tab(w/o Shift)


Change the mode to click the 'i' button in the upper right corner.
Output results in new element in the current window.
Complement variable names start with '$'.(by the tab key)

$p|             -->   rdf:type
                -->   rdfs:subClassOf
                -->   piero:inRpairInSideA
                -->   piero:inRpairInSideB


Submit with "Ctrl+Enter"

- SPANG like shortcut.

# spang -S tax:9606 -L 100;|    -->   # spang -S tax:9606 -L 100;                 *4, 5
                                      SELECT *
                                      WHERE {
				        tax:9606 ?p ?o .
		                      LIMIT 100|

*4 supported options: -S (subject), -P (predicate), -O (object), -L (limit), -N (count), -G (graph list), -F (from a graph)
*5 rewrite under the command line.

- Font

# font-size: 20px;
# font-family: Courier;

- Clear all queries

# clear_sparql_queries;                                 * 1st line only

- Proxy SSL mixed content (permanent)

# mixed-content-proxy: true;                            * true (default), false

Access to endpoints which are not https via '' server from SPARQL support on https.


Multi-line comments for debug
- skip through from '=begin' to '=end' (available '=b' and '=e', support in the innerMode only)

=b multi-line
   comments =e

sparql-doc format

# @title example
# @endpoint
# @param city=Tokyo
# @param hoge=fuga

PREFIX dbpedia: <>
PREFIX dbo: <>
  dbpedia:{{city}} ?p ?o .

Proxy SSL mixed content and CORS blocking (temporary)
- via ''. sparql-doc format in comment.

# @temp-proxy true

Predicate search
- show predicates and sample of objects: "?subject ??" (reverse search: "?subject ^??", support in the innerMode only)

## endpoint
PREFIX dbpedia: <>
PREFIX dbo: <>
  dbpedia:Tokyo dbo:isPartOf ?parent .
  ?parent ??

----- results bindings -----
??	        sample
dbo:utcOffset	"+9"
dbo:timeZone	dbpedia:Japan_Standard_Time
dbo:length	1.3e+06
rdfs:label	"Honshu"
dbo:country	dbpedia:Japan

SPARQList support

SPARQList support is a markdown editor for SPARQList

How to Use


Abailable in SPARQL support.


Available in the textarea of any site such as virtuoso web interface, by using UserScript manager.

Set target URLs in "// @include" line
(or DL modified js)

require: userscript manager


Available in user own site by embedding code.

require: CodeMirror

	|   +---lib/
 	|       +---codemirror.js
	|       +---codemirror.css
	+---sparql.js # colors mod. & fixed indent


    <script type="text/javascript" src="./js/codemirror/lib/codemirror.js"></script>
    <script type="text/javascript" src="./js/codemirror/addon/edit/matchbrackets.js"></script>
    <script type="text/javascript" src="./js/codemirror/addon/edit/closebrackets.js"></script>
    <link rel="stylesheet" type="text/css" href="./js/codemirror/lib/codemirror.css">
    <script type="text/javascript" src="./js/sparql-support.js"></script>
    <script type="text/javascript" src="./js/sparql.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/base.css">
      <form action="http://endpoint" method="get">
	<textarea id="query" cols="100" rows="15">
      <input type="submit" value="Run Query" id="submit_button">
   <script type="text/javascript">
    var id = "query";
    var editor = CodeMirror.fromTextArea(document.getElementsByName(id), {
       mode: "application/sparql-query",
       matchBrackets: true,
       autoCloseBrackets: true,
       lineNumbers: true,
       sparqlSupportAutoComp: true,      // Auto completion
       sparqlSupportQueries: true,       // Tabbed interface
       sparqlSupportInnerMode: true,     // Inner mode
       extraKeys: {"Tab": function(instance) { return false; },
                   "Ctrl-Space": function(instance) { return false; }}


SPARQL support

SPARQList support