Whoops. Never mind. It works to use a path relative to the xquery file:
doc(‘hella.xsl’). That was not working earlier, presumably because of some
unrelated problem.
Kendall
From: on behalf of Kendall Shaw
Date: Thursday, September 22, 2016 at 1:28 PM
To: BaseX
Subject: [basex-talk] Accessing file within repository or package
I have a module packaged as a XAR and installed in the repo. In xquery I want
to load xslt. This did not work:
http://example.com/hellaworld";
abbrev="hella"
version="1.0.0"
spec="1.0"
xmlns="http://expath.org/ns/pkg";>
Hella world functions
http://example.com/hellaworld/hella.xsl
hella.xsl
http://example.com/hellaworld
hella.xq
Then using the import-uri with doc, e.g.:
(: within hella.xq in the package :)
xslt:transform($some, doc(‘http://example.com/hellaworld/hella.xsl’))
It does work, to use a path relative to the root of tomcat which I’m running
basex in:
doc(‘webapps/basex/repo/http-example.com-hellaworld-1.0.0/hella/hella.xsl’)
but, I hope there is another way. How can I reference another file that is
within the XAR package?
Kendall