Lace2 icon indicating copy to clipboard operation
Lace2 copied to clipboard

refactor code pertaining to package identification

Open brobertson opened this issue 5 years ago • 2 comments

dc:identifier is not a good key, since it isn't present in other packages, requiring a non-optimized search through them. Instead, use code like:

xquery version "3.1";
import module namespace apputil="http://exist-db.org/xquery/apps";
import module namespace repo="http://exist-db.org/xquery/repo";
let $root := repo:get-root()
let $uri := "http://heml.mta.ca/Lace/Images/actaphilippietac00bonnuoft"
return $root || apputil:resolve($uri)

brobertson avatar Feb 01 '20 20:02 brobertson

apputil:scan-repo($callback as function(*)) as item()* looks promising. Scan all repos for those that have a meta.xml file, that in turn has dc:identifier, etc.

brobertson avatar Feb 01 '20 20:02 brobertson

Doing a TRACE level logging in eXist really shows what's what.

brobertson avatar Feb 08 '20 13:02 brobertson