-
Notifications
You must be signed in to change notification settings - Fork 4
/
qauct1.xq
69 lines (53 loc) · 1.57 KB
/
qauct1.xq
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
(: CroALaBro quaere vocabula in singulo auctore :)
import module namespace croalabro = "http://croala.ffzg.unizg.hr/croalabro" at "../../repo/croalabro.xqm";
import module namespace croalabro-html = "http://croala.ffzg.unizg.hr/croalabro-html" at "../../repo/croalabro-html.xqm";
declare namespace page = 'http://basex.org/examples/web-page';
declare variable $title := 'Croatiae auctores Latini: quaere vocabula in singulo auctore';
declare variable $subtitle := 'Inventa chronologico ordine afferuntur';
declare variable $content := "Search in CroALa texts from a single author.";
declare variable $keywords := "Neo-Latin, Croatia, text corpus, search, author, all words";
(:~
: This function returns an XML response message.
:)
declare
%rest:path("auctor-q/{$author}/qauct1")
%rest:query-param("qaverbum", "{$qaverbum}")
%output:method(
"xhtml"
)
%output:omit-xml-declaration(
"no"
)
%output:doctype-public(
"-//W3C//DTD XHTML 1.0 Transitional//EN"
)
%output:doctype-system(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
)
function page:croalabroquaeresinguloauctore($qaverbum, $author)
{
(: HTML template starts here :)
<html>
{ croalabro-html:htmlheadserver($title, $content, $keywords) }
<body>
<div class="container">
<div class="row">
<div class="col">
<h1 class="text-center">{ $title }</h1>
</div>
</div>
<div class="row">
<div class="col">
<p class="text-center">{ $subtitle }</p>
</div>
</div>
<!-- function here -->
{
croalabro:author1found($qaverbum, $author)
}
{ croalabro-html:footerserver() }
</div>
</body>
</html>
};
return