Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@wolfgangmm
wolfgangmm / gist:5880377
Last active July 16, 2020 12:59
eXist-db: reinstall dashboard and shared-resources if broken. Run the following query through eXide - or if this fails: the Java admin client.
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")
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:5871157
Created June 26, 2013 20:09
Change group on all resources/collections in eXist-db root collection.
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