Skip to content

Instantly share code, notes, and snippets.

@joewiz
Created June 2, 2021 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewiz/5bb8eaba9043e53045d1603db83b88f7 to your computer and use it in GitHub Desktop.
Save joewiz/5bb8eaba9043e53045d1603db83b88f7 to your computer and use it in GitHub Desktop.
Find which EXPath packages declare a particular dependency, in eXist-db
xquery version "3.1";
declare namespace pkg="http://expath.org/ns/pkg";
array {
for $app in xmldb:get-child-collections("/db/apps")
let $package-metadata := doc("/db/apps/" || $app || "/expath-pkg.xml")
where $package-metadata//pkg:dependency[@package eq "http://exist-db.org/apps/shared"]
order by $app
return
$app
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment