view software/eXist/webapp/mpdl/interface/echo/controller.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
line wrap: on
line source

xquery version "1.0";

(: Controller XQuery for the mpdl application. :)

declare namespace dcterms="http://purl.org/dc/terms";
declare namespace echo="http://www.mpiwg-berlin.mpg.de/ns/echo/1.0/";


let $mpdlDocUri := "/archimedes/it/borro_fluss_012_it_1561.xml"
(: let $echoArchivePath := mpdl-text:getEchoArchivePath($mpdlDocUri)  :)
let $echoURLDocuView := concat("http://echo.mpiwg-berlin.mpg.de/ECHOdocuView?url=", '')

return
if (starts-with($exist:path, '/docuView.xql')) 
then
  <dispatch xmlns="http://exist.sourceforge.net/NS/exist">
    <redirect url="{$echoURLDocuView}"/>
  </dispatch>
(:      <add-parameter name="url" value="{$archivePath}"/>  :)
(:    </forward>  :)
else
    (: everything else is passed through :)
    <ignore xmlns="http://exist.sourceforge.net/NS/exist">
        <cache-control cache="yes"/>
    </ignore>