Skip to content

Instantly share code, notes, and snippets.

View navigation-test.xql
xquery version "3.1";
declare variable $depth := 3;
declare variable $xml :=
document {
<div xml:id="d1">
<p>First <hi>section</hi> para 1</p>
<p>First <hi>section</hi> <hi>para</hi> 2</p>
<div xml:id="d2">
<p>First para in <hi>d2</hi></p>
@wolfgangmm
wolfgangmm / gist:5880377
Last active Jul 16, 2020
eXist-db: reinstall dashboard and shared-resources if broken. Run the following query through eXide - or if this fails: the Java admin client.
View gist:5880377
repo:remove("http://exist-db.org/apps/shared"),
repo:remove("http://exist-db.org/apps/dashboard"),
repo:install-and-deploy("http://exist-db.org/apps/shared", "http://exist-db.org/exist/apps/public-repo/find"),
repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://exist-db.org/exist/apps/public-repo/find")
@wolfgangmm
wolfgangmm / gist:5871157
Created Jun 26, 2013
Change group on all resources/collections in eXist-db root collection.
View gist:5871157
xquery version "3.0";
import module namespace dbutil="http://exist-db.org/xquery/dbutil" at "/db/apps/shared-resources/content/dbutils.xql";
let $root := "/db"
return
dbutil:scan(xs:anyURI($root), function($collection, $resource) {
if ($resource) then
sm:chgrp($resource, "biblio.users")
else