openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

index.html (1773B)


      1 <!doctype html>
      2 
      3 <title>CodeMirror: SPARQL mode</title>
      4 <meta charset="utf-8"/>
      5 <link rel=stylesheet href="../../doc/docs.css">
      6 
      7 <link rel="stylesheet" href="../../lib/codemirror.css">
      8 <script src="../../lib/codemirror.js"></script>
      9 <script src="../../addon/edit/matchbrackets.js"></script>
     10 <script src="sparql.js"></script>
     11 <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
     12 <div id=nav>
     13   <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
     14 
     15   <ul>
     16     <li><a href="../../index.html">Home</a>
     17     <li><a href="../../doc/manual.html">Manual</a>
     18     <li><a href="https://github.com/codemirror/codemirror">Code</a>
     19   </ul>
     20   <ul>
     21     <li><a href="../index.html">Language modes</a>
     22     <li><a class=active href="#">SPARQL</a>
     23   </ul>
     24 </div>
     25 
     26 <article>
     27 <h2>SPARQL mode</h2>
     28 <form><textarea id="code" name="code">
     29 PREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>
     30 PREFIX dc: &lt;http://purl.org/dc/elements/1.1/>
     31 PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>
     32 PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#>
     33 
     34 # Comment!
     35 
     36 SELECT ?given ?family
     37 WHERE {
     38   {
     39     ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .
     40     ?annot dc:creator ?c .
     41     OPTIONAL {?c foaf:givenName ?given ;
     42                  foaf:familyName ?family }
     43   } UNION {
     44     ?c !foaf:knows/foaf:knows? ?thing.
     45     ?thing rdfs
     46   } MINUS {
     47     ?thing rdfs:label "剛柔流"@jp
     48   }
     49   FILTER isBlank(?c)
     50 }
     51 </textarea></form>
     52     <script>
     53       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
     54         mode: "application/sparql-query",
     55         matchBrackets: true
     56       });
     57     </script>
     58 
     59     <p><strong>MIME types defined:</strong> <code>application/sparql-query</code>.</p>
     60 
     61   </article>