-
Notifications
You must be signed in to change notification settings - Fork 1
/
cts-list-nodes.xq
73 lines (63 loc) · 2.35 KB
/
cts-list-nodes.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
68
69
70
71
72
73
(: CroALa CTS :)
(: list CTS URNs of text nodes available in a document belonging to the the croala-cts-1 db :)
(: for the supplied edition CTS URN :)
import module namespace rest = "http://exquery.org/ns/restxq";
import module namespace croala = "http://www.ffzg.unizg.hr/klafil/croala" at "../../repo/croala.xqm";
import module namespace cts = "http://croala.ffzg.unizg.hr/cts" at "../../repo/croalacts.xqm";
import module namespace cp = "http://croala.ffzg.unizg.hr/croalapelagios" at "../../repo/croalapelagios.xqm";
import module namespace vit = "http://croala.ffzg.unizg.hr/vit" at "../../repo/vitezovic.xqm";
declare namespace page = 'http://basex.org/examples/web-page';
declare variable $title := 'Nodi editionis in CroALa';
declare variable $content := "Display text nodes of an edition available in the CroALa collection, identified by a CTS URN.";
declare variable $keywords := "Neo-Latin literature, CTS / CITE architecture, Croatiae auctores Latini, CroALa, gazetteer, literary analysis, scholarly edition, analytical exemplar, citation, quotation, machine-actionable edition";
(:~
: This function returns an XML response message.
:)
declare
%rest:path("ctseditio/{$urn}")
%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:croalactsnodes($urn)
{
(: HTML template starts here :)
<html>
{ vit:htmlheadserver($title, $content, $keywords) }
<body text="#000000">
<div class="jumbotron">
<h1><span class="glyphicon glyphicon-th" aria-hidden="true"></span>{ $title }</h1>
<div class="container-fluid">
<div class="col-md-6">
<p>Nodi editionis { $urn } in <a href="http://croala.ffzg.unizg.hr">CroALa</a> sub specie <a href="http://cite-architecture.github.io/">architecturae CITE</a>, { current-date() }.</p>
<p>Elige numerum ut accedas ad textum nodi.</p>
<p>Functio nominatur: {rest:uri()}.</p>
<p>Abi ad <a href="https://github.com/nevenjovanovic/cts-croala">Github apothecam</a>.</p>
</div>
<div class="col-md-6">
{croala:infodb('croala-cts-1')}
</div>
</div>
</div>
<div class="container-fluid">
<blockquote class="croala">
<div class="table-responsive">
{ cts:getnodes($urn) }
</div>
</blockquote>
<p/>
</div>
<hr/>
{ croala:footerserver() }
</body>
</html>
};
return