Mercurial > kallithea
diff rhodecode/public/js/mode/xquery/index.html @ 4029:c9bcfe2d2ade
codecleaner
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 21 Jun 2013 01:11:16 +0200 |
parents | a60a0e9092c6 |
children |
line wrap: on
line diff
--- a/rhodecode/public/js/mode/xquery/index.html Fri Jun 21 00:36:01 2013 +0200 +++ b/rhodecode/public/js/mode/xquery/index.html Fri Jun 21 01:11:16 2013 +0200 @@ -1,5 +1,5 @@ -<!doctype html> -<html> +<!doctype html> +<html> <!-- /* Copyright (C) 2011 by MarkLogic Corporation @@ -24,39 +24,39 @@ THE SOFTWARE. */ --> - <head> + <head> <meta charset="utf-8"> - <title>CodeMirror: XQuery mode</title> - <link rel="stylesheet" href="../../lib/codemirror.css"> - <script src="../../lib/codemirror.js"></script> - <script src="xquery.js"></script> - <link rel="stylesheet" href="../../doc/docs.css"> - <link rel="stylesheet" href="../../theme/xq-dark.css"> + <title>CodeMirror: XQuery mode</title> + <link rel="stylesheet" href="../../lib/codemirror.css"> + <script src="../../lib/codemirror.js"></script> + <script src="xquery.js"></script> + <link rel="stylesheet" href="../../doc/docs.css"> + <link rel="stylesheet" href="../../theme/xq-dark.css"> <style type="text/css"> - .CodeMirror { - border-top: 1px solid black; border-bottom: 1px solid black; - height:400px; - } - </style> - </head> - <body> - <h1>CodeMirror: XQuery mode</h1> - -<div class="cm-s-default"> - <textarea id="code" name="code"> + .CodeMirror { + border-top: 1px solid black; border-bottom: 1px solid black; + height:400px; + } + </style> + </head> + <body> + <h1>CodeMirror: XQuery mode</h1> + +<div class="cm-s-default"> + <textarea id="code" name="code"> xquery version "1.0-ml"; (: this is - : a + : a "comment" :) let $let := <x attr="value">"test"<func>function() $var {function()} {$var}</func></x> let $joe:=1 return element element { - attribute attribute { 1 }, - element test { 'a' }, - attribute foo { "bar" }, - fn:doc()[ foo/@bar eq $let ], - //x } - + attribute attribute { 1 }, + element test { 'a' }, + attribute foo { "bar" }, + fn:doc()[ foo/@bar eq $let ], + //x } + (: a more 'evil' test :) (: Modified Blakeley example (: with nested comment :) ... :) declare private function local:declare() {()}; @@ -65,11 +65,11 @@ declare private function local:local() {()}; let $let := <let>let $let := "let"</let> return element element { - attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } }, - attribute fn:doc { "bar" castable as xs:string }, - element text { text { "text" } }, - fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ], - //fn:doc + attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } }, + attribute fn:doc { "bar" castable as xs:string }, + element text { text { "text" } }, + fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ], + //fn:doc } @@ -193,29 +193,29 @@ @author Jason Hunter @version 1.0.1 - + Ported to xquery 1.0-ml; double escaped backslashes in json:escape :) declare function json:serialize($x as element()) as xs:string { string-join(('{', json:print-name-value($x), '}'), "") }; - </textarea> -</div> - - <script> + </textarea> +</div> + + <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { lineNumbers: true, matchBrackets: true, theme: "xq-dark" }); - </script> - - <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> - - <p>Development of the CodeMirror XQuery mode was sponsored by - <a href="http://marklogic.com">MarkLogic</a> and developed by + </script> + + <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> + + <p>Development of the CodeMirror XQuery mode was sponsored by + <a href="http://marklogic.com">MarkLogic</a> and developed by <a href="https://twitter.com/mbrevoort">Mike Brevoort</a>. </p> - - </body> + + </body> </html>