-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xqy
80 lines (77 loc) · 1.73 KB
/
index.xqy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import module namespace shacl-xqy = "shacl-xqy"
at "src/shacl.xqy";
(
xdmp:set-response-content-type("text/html;charset=UTF-8"),
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SHACL-XQuery Examples</title>
</head>
<body>
<h1>SHACL-XQuery Examples</h1>
<h2>SPARQL Functions</h2>
<p>
<h3>Query</h3>
<pre>
SELECT (ex:SPARQLMultiply(3, 5) AS ?result) WHERE { }
</pre>
</p>
<p>
<h3>Results</h3>
<pre>
{shacl-xqy:sparql("SELECT (ex:SPARQLMultiply(3, 5) AS ?result) WHERE {}")}
</pre>
</p>
<p>
<h3>Query</h3>
<pre>
SELECT (ex:SPARQLGetLabel(ex:SPARQLGetLabel) AS ?result) WHERE { }
</pre>
</p>
<p>
<h3>Results</h3>
<pre>
{shacl-xqy:sparql("SELECT (ex:SPARQLGetLabel(ex:SPARQLGetLabel) AS ?result) WHERE {}")}
</pre>
</p>
<h2>XQuery Functions</h2>
<p>
<h3>Query</h3>
<pre>
SELECT (ex:XQueryMultiply(7, 11) AS ?result) WHERE { }
</pre>
</p>
<p>
<h3>Results</h3>
<pre>
{shacl-xqy:sparql("SELECT (ex:XQueryMultiply(7, 11) AS ?result) WHERE {}")}
</pre>
</p>
<h2>JS Functions</h2>
<p>
<h3>Query</h3>
<pre>
SELECT (ex:JSMultiply(ex:SPARQLMultiply(3, 5), ex:XQueryMultiply(7, 11)) AS ?result) WHERE { }
</pre>
</p>
<p>
<h3>Results</h3>
<pre>
{shacl-xqy:sparql("SELECT (ex:JSMultiply(ex:SPARQLMultiply(3, 5), ex:XQueryMultiply(7, 11)) AS ?result) WHERE {}")}
</pre>
</p>
<br />
<p>
<h3>Query</h3>
<pre>
SELECT (ex:JSGetRandom() AS ?result) WHERE { }
</pre>
</p>
<p>
<h3>Results</h3>
<pre>
{shacl-xqy:sparql("SELECT (ex:JSGetRandom() AS ?result) WHERE {}")}
</pre>
</p>
</body>
</html>
)