Exactly, I am refering to "import module". In my experience with xml-related technologies and java, library usually supports customizable class for import resource lookup based on namespaces, paths etc, I can recall 2 examples:
Saxon has class ModuleURIResolver that does just this: http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/s9api/XQuery...
Similar class URIResolver and mechanism is in java core for xsl:import/xsl:include lookup: http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/TransformerFact...
Thanks, Karel
On 09/04/2015 15:41, Christian Grün wrote:
I would like to load xquery files that are on classpath of my java application, not only filesystem. Does this mean, it is not possible with BaseX?
Do you refer to the "import module" when talking about loading xquery files?
The classpath is not considered when importing modules. As multiple directories can be specified in the classpath, it could even happen that different modules would be import candidates, so we'd need additional precedence rules. -- Is this possibly supported by any other query processor you have tried?
Best, Christian
Karel
On 08/04/2015 18:01, Christian Grün wrote:
Hi Karel,
In BaseX, modules either need to be located in the module repository, or the relative path needs to be specified in the import module statement. Some more information on locating modules can be found in our Wiki [1].
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Repository
On Wed, Apr 8, 2015 at 5:56 PM, Karel Hovorka Karel.Hovorka@semantico.com wrote:
Hi,
I am trying to run xquery file on basex, but it depends on xquery module located in classpath. I have found parameter "org.basex.QUERYPATH", that configures module lookup on filesystem. Is there way to lookup modules in classpath?
Thanks,
Karel Hovorka, Semantico LTD