Mercurial > hg > mpdl-group
diff software/eXist/webapp/mpdl/interface/echo/echoDocuView.xql @ 7:5589d865af7a
Erstellung XQL/XSL Applikation
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 08 Feb 2011 15:16:46 +0100 |
parents | |
children | d6f528ad5d96 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/software/eXist/webapp/mpdl/interface/echo/echoDocuView.xql Tue Feb 08 15:16:46 2011 +0100 @@ -0,0 +1,35 @@ +xquery version "1.0"; + +import module namespace request="http://exist-db.org/xquery/request"; + +import module namespace mpdl-text = "http://www.mpiwg-berlin.mpg.de/ns/mpdl/text" at "../..//text/all.xql"; + +let $mpdlDocUri := request:get-parameter("document", ()) +let $echoArchivePath := mpdl-text:getEchoArchivePath($mpdlDocUri) +let $echoURLDocuView := concat("http://mpdl-dev.mpiwg-berlin.mpg.de/ECHOdocuView?url=", $echoArchivePath) +let $urlDocuViewer := <a href="{$echoURLDocuView}">redirect to Echo</a> +let $diglibAvailable := + if ($echoArchivePath = "XXXXDigilibNotAvailableXXXX") + then false() + else true() +let $metaRefresh := + if ($diglibAvailable) + then <meta http-equiv="Refresh" content="0; url={$echoURLDocuView}"/> + else () +let $message := + if ($diglibAvailable) + then <span><b>Url:</b> {$urlDocuViewer}</span> + else <span><b>Could not open Echo Docu Viewer:</b> nausikaa2.rz-berlin.mpg.de does not answer for {$mpdlDocUri}: please try again later</span> + +return +<html> +<head> + <title>Redirector Echo Docu Viewer</title> + {$metaRefresh} +</head> +<body> + <h1>Redirector Echo Docu Viewer</h1> + {$message} + +</body> +</html>