~ubuntu-branches/ubuntu/utopic/codemirror-js/utopic

« back to all changes in this revision

Viewing changes to mode/sparql/index.html

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2012-04-12 12:25:28 UTC
  • Revision ID: package-import@ubuntu.com-20120412122528-8xp5a8frj4h1d3ee
Tags: upstream-2.23
ImportĀ upstreamĀ versionĀ 2.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html>
 
2
<html>
 
3
  <head>
 
4
    <title>CodeMirror: SPARQL mode</title>
 
5
    <link rel="stylesheet" href="../../lib/codemirror.css">
 
6
    <script src="../../lib/codemirror.js"></script>
 
7
    <script src="sparql.js"></script>
 
8
    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
 
9
    <link rel="stylesheet" href="../../doc/docs.css">
 
10
  </head>
 
11
  <body>
 
12
    <h1>CodeMirror: SPARQL mode</h1>
 
13
    <form><textarea id="code" name="code">
 
14
PREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>
 
15
PREFIX dc: &lt;http://purl.org/dc/elements/1.1/>
 
16
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>
 
17
 
 
18
# Comment!
 
19
 
 
20
SELECT ?given ?family
 
21
WHERE {
 
22
  ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .
 
23
  ?annot dc:creator ?c .
 
24
  OPTIONAL {?c foaf:given ?given ;
 
25
               foaf:family ?family } .
 
26
  FILTER isBlank(?c)
 
27
}
 
28
</textarea></form>
 
29
    <script>
 
30
      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
 
31
        mode: "application/x-sparql-query",
 
32
        tabMode: "indent",
 
33
        matchBrackets: true
 
34
      });
 
35
    </script>
 
36
 
 
37
    <p><strong>MIME types defined:</strong> <code>application/x-sparql-query</code>.</p>
 
38
 
 
39
  </body>
 
40
</html>