This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare function app:sidebar() | |
as element(div)? | |
{ | |
let $view := $config:CONTEXT/*:view | |
return | |
if ($view = ("help","contact","terms")) | |
then () | |
else | |
<div class="sidebar" arcsize="5 5 0 0"> | |
<div class="sidebar-background" arcsize="5 0 0 5" border="rgb(222,222,222)" id="sidebar_background"> </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare function app:cluster() as element(li)* | |
{ | |
if ($config:RESPONSE/search:result) then | |
let $docs := | |
for $uri in $config:RESPONSE/search:result/@uri | |
return fn:doc($uri) | |
let $cluster-nodes := cts:cluster($docs, | |
<options xmlns="cts:cluster"> | |
<algorithm>lsi</algorithm> | |
</options>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for $speech in doc()//SPEECH | |
let $speaker := $speech/SPEAKER | |
let $lines := $speech/LINE | |
return ( | |
<h2>{$speaker/text()}</h2>, | |
<p>{for $line in $lines return $line/text()}</p> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp:set-response-content-type("text/html"), | |
('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>My first Mark Logic web page</title> | |
</head> | |
<body> | |
<p>Hello World! This application is running on MarkLogic Server version {xdmp:version()}</p> | |
</body> | |
</html>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp:set-response-content-type("text/html"), | |
('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>My first Mark Logic web page</title> | |
</head> | |
<body> | |
<p>Hello World!</p> | |
</body> | |
</html>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.2</version> | |
<executions> | |
<execution> | |
<id>clean modules</id> | |
<configuration> | |
<workingDirectory>${basedir}/../marklogic</workingDirectory> | |
<executable>./ml</executable> |