You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current packaging mechanism detects either XQuery modules or Java archives. In many cases, the entry points of a Java archive are defined via an XQuery module, and it would be nice if both of them could be packaged and installed.
After installation, both Hello.jar and Hello.xqm will be in the repository. If the module is imported, the .xqm file takes precedence:
importmodulenamespace m = 'http://basex.org/modules/Hello';
m:hello("Universe")
The JAR file still needs to be imported from the XQuery module in the repository. This can be enforced by using the java: prefix:
(:~ Hello.xqm :)modulenamespace m = 'http://basex.org/modules/Hello';
(: Import JAR file :)importmodulenamespace jar = 'java:org.basex.modules.Hello';
(:~ : Creates a greetings strings. : @param $guy guy to greet. : @return greetings :)declarefunctionm:hello($guy as xs:string) as xs:string {
jar:hello($guy)
};
Todos:
REPO INSTALL: Extract .xqm file
REPO DELETE: Delete both .jar and .xqm files
The text was updated successfully, but these errors were encountered:
Our current packaging mechanism detects either XQuery modules or Java archives. In many cases, the entry points of a Java archive are defined via an XQuery module, and it would be nice if both of them could be packaged and installed.
Idea (built on top of http://docs.basex.org/wiki/Repository#Java):
MANIFEST.MF
file:.xqm
file with this name exists additionally to the.class
file in the installed JAR file, it will be extracted and used as the entry point:Hello.jar
andHello.xqm
will be in the repository. If the module is imported, the.xqm
file takes precedence:java:
prefix:Todos:
.xqm
file.jar
and.xqm
filesThe text was updated successfully, but these errors were encountered: