I seek for a way to aggregate some XQuery files to package file (like JAR file in java). I want to insert it to another project and use it as an external black-box code.
I'm using Saxon XQuery processor.
Thanks.
Saxon doesn't have this capability for XQuery. It does so only for XSLT. You can however include the source query modules in a JAR file and resolve their references to each other when compiling the query.
Do you mean to put the source XQuery modules in a JAR file and then insert the JAR to x project and call to XQuery function from the x project? if yes: I glad if you can direct how can I do it? if no: can you explain what did you mean?
I don't know enough about your circumstances. But for example if you've got a Java application that's executing the query via the s9api interface, then you can put the query files in the JAR, and reference them in your s9api calls using either the Java getResource API, or a classpath: URI.