Debian Codegraph @

examples/prism-xquery.html

raw symbols SCIP
1 <h2>Comments</h2>
2 <pre><code>(::)
3 (: Comment :)
4 (: Multi-line
5 comment :)
6 (:~
7 : The &lt;b>functx:substring-after-last&lt;/b> function returns the part
8 : of &lt;b>$string&lt;/b> that appears after the last occurrence of
9 : &lt;b>$delim&lt;/b>. If &lt;b>$string&lt;/b> does not contain
10 : &lt;b>$delim&lt;/b>, the entire string is returned.
11 :
12 : @param $string the string to substring
13 : @param $delim the delimiter
14 : @return the substring
15 :)</code></pre>
16
17 <h2>Variables</h2>
18 <pre><code>$myProduct
19 $foo-bar
20 $strings:LetterA</code></pre>
21
22 <h2>Functions</h2>
23 <pre><code>document-node(schema-element(catalog))
24 strings:trim($arg as xs:string?)
25 false()</code></pre>
26
27 <h2>Keywords</h2>
28 <pre><code>xquery version "1.0";
29 declare default element namespace "http://datypic.com/cat";
30 declare boundary-space preserve;
31 declare default collation "http://datypic.com/collation/custom";</code></pre>
32
33 <h2>Types</h2>
34 <pre><code>xs:anyAtomicType
35 element
36 xs:double</code></pre>
37
38 <h2>Full example</h2>
39 <pre><code>&lt;report xmlns="http://datypic.com/report"
40 xmlns:cat="http://datypic.com/cat"
41 xmlns:prod="http://datypic.com/prod"> {
42 for $product in doc("prod_ns.xml")/prod:product
43 return &lt;lineItem>
44 {$product/prod:number}
45 {$product/prod:name}
46 &lt;/lineItem>
47 } &lt;/report></code></pre>