XQuery mode
x
string-join((for $i in ($x, $x/following-sibling::*[name(.) = $name]) return json:print-value($i)), ","),
1
xquery version "1.0-ml";
2
(: this is
3
: a
4
"comment" :)
5
let $let := <x attr="value">"test"<func>function() $var {function()} {$var}</func></x>
6
let $joe:=1
7
return element element {
8
attribute attribute { 1 },
9
element test { 'a' },
10
attribute foo { "bar" },
11
fn:doc()[ foo/@bar eq $let ],
12
//x }
13
14
(: a more 'evil' test :)
15
(: Modified Blakeley example (: with nested comment :) ... :)
16
declare private function local:declare() {()};
17
declare private function local:private() {()};
18
declare private function local:function() {()};
19
declare private function local:local() {()};
20
let $let := <let>let $let := "let"</let>
21
return element element {
22
attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } },
23
attribute fn:doc { "bar" castable as xs:string },
24
element text { text { "text" } },
25
fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ],
26
//fn:doc
27
}
28
29
30
31
xquery version "1.0-ml";
32
33
(: Copyright 2006-2010 Mark Logic Corporation. :)
34
35
(:
36
: Licensed under the Apache License, Version 2.0 (the "License");
MIME types defined: application/xquery
.
Development of the CodeMirror XQuery mode was sponsored by MarkLogic and developed by Mike Brevoort.