See also: https://gist.github.com/joewiz/b53612a8b7744b8d1d24d2028770a79d
//indexer/@preserve-whitespace-mixed-content="yes"
//indexer/@suppress-whitespace="none"
//serializer/@indent="no"
//serializer/@enable-xinclude="no"
FROM existdb/existdb:latest | |
ENV EXIST_HOME /exist | |
COPY existdb/etc/conf.xml /exist/etc/ | |
COPY existdb/etc/controller.xml /exist/etc/webapp/WEB-INF | |
COPY existdb/autodeploy/*.xar /exist/autodeploy/ |
location ~ / { | |
proxy_pass https://localhost:8443; | |
rewrite ^/(view|start|query|error).html$ /exist/apps/edoc/$1.html last; | |
rewrite ^/data/(.*)$ /exist/apps/edoc/data/$1 last; | |
rewrite ^/rest/(.*)$ /exist/restxq/edoc/$1 last; | |
rewrite ^/(.shared|resources)/(.*)$ /exist/apps/edoc/resources/$2 last; | |
rewrite ^/login$ /exist/apps/edoc/login last; | |
proxy_cookie_path ~*^/.* /; | |
} |
set encoding=utf-8 nobomb | |
set sts=2 | |
set ts=2 | |
set sw=0 | |
set copyindent | |
set smarttab | |
set expandtab | |
set autoindent smartindent |
# Path for openSuSE – may be different in other distributions | |
source /usr/share/bash-completion/completions/git-prompt.sh | |
# taken from https://github.com/qupada/git-bashrc/blob/master/git-bashrc | |
_in_git_repo () { | |
# Check the current dir is actually a repository | |
git status &> /dev/null || return 2 | |
# If we are not on a branch we will get annoying errors if we don't do this check | |
git branch | grep -qE '^\* \((no branch|detached from .*)\)' && return 1 | |
return 0 |
location ~ / { | |
proxy_pass https://example.com:8443; | |
proxy_set_header Host $http_host; | |
add_header Content-Security-Policy "default-src 'none'; img-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; | |
add_header X-Content-Type-Options "nosniff"; | |
add_header X-XSS-Protection "1; mode=block"; | |
} |
else if (ends-with($exist:path, "/start.html") and not(request:get-parameter-names() = 'id')) then | |
let $ed := substring-after(substring-before($exist:path, "/start.html"), '/') | |
return | |
<dispatch xmlns="http://exist.sourceforge.net/NS/exist"> | |
<redirect url="{$exist:controller}/edoc/start.html?id={$ed}" /> | |
</dispatch> |
See also: https://gist.github.com/joewiz/b53612a8b7744b8d1d24d2028770a79d
//indexer/@preserve-whitespace-mixed-content="yes"
//indexer/@suppress-whitespace="none"
//serializer/@indent="no"
//serializer/@enable-xinclude="no"
xquery version "3.1"; | |
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; | |
let $result := transform:transform($xml, $xsl, $transformationParams) | |
let $serializazionParams := | |
<output:serialization-parameters> | |
<output:method value="xml"/> | |
<output:omit-xml-declaration value="no"/> |
<test> | |
<result>true true true</result> | |
<result type="odn1"/> | |
<result type="odn2"/> | |
<result type="odn3">true</result> | |
</test> |
xquery version "3.1"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
let $set-up-collections := | |
( | |
xmldb:create-collection('/db', 'test'), | |
xmldb:create-collection('/db/system/config/db', 'test') | |
) | |
let $in-memory-node := |