sparqltest.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <script src="js/codemirror.js" type="text/javascript"></script>
  4. <title>CodeMirror: Sparql demonstration</title>
  5. <link rel="stylesheet" type="text/css" href="css/docs.css"/>
  6. </head>
  7. <body style="padding: 20px;">
  8. <p>Demonstration of <a href="index.html">CodeMirror</a>'s Sparql
  9. highlighter.</p>
  10. <div class="border">
  11. <textarea id="code" cols="120" rows="30">
  12. PREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>
  13. PREFIX dc: &lt;http://purl.org/dc/elements/1.1/>
  14. PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>
  15. # Comment!
  16. SELECT ?given ?family
  17. WHERE {
  18. ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .
  19. ?annot dc:creator ?c .
  20. OPTIONAL {?c foaf:given ?given ;
  21. foaf:family ?family } .
  22. FILTER isBlank(?c)
  23. }
  24. </textarea>
  25. </div>
  26. <script type="text/javascript">
  27. var editor = CodeMirror.fromTextArea('code', {
  28. height: "250px",
  29. parserfile: "parsesparql.js",
  30. stylesheet: "css/sparqlcolors.css",
  31. path: "js/"
  32. });
  33. </script>
  34. </body>
  35. </html>