xquery version "3.0"; import module namespace ldap = "http://exist-db.org/ldap" at "ldap1.xqm"; declare option exist:serialize "method=xhtml media-type=text/html"; (:~ : Test form :) Login LDAP

{ if(ldap:isLoggedIn()) then ( ldap:logout() ) else ( ldap:connection() ) }