@@ -591,7 +591,7 @@ public Optional<ExistRepository> getRepository() {
591
591
}
592
592
593
593
// build a module object from the source
594
- final ExternalModule module = compileOrBorrowModule (prefix , namespace , location , src );
594
+ final ExternalModule module = compileOrBorrowModule (namespace , prefix , location , src );
595
595
return module ;
596
596
597
597
} catch (final PermissionDeniedException e ) {
@@ -2522,7 +2522,7 @@ public boolean tailRecursiveCall(final FunctionSignature signature) {
2522
2522
}
2523
2523
2524
2524
final Source moduleSource = new DBSource (getBroker ().getBrokerPool (), (BinaryDocument ) sourceDoc , true );
2525
- return compileOrBorrowModule (prefix , namespaceURI , location , moduleSource );
2525
+ return compileOrBorrowModule (namespaceURI , prefix , location , moduleSource );
2526
2526
2527
2527
} catch (final PermissionDeniedException e ) {
2528
2528
throw moduleLoadException ("Permission denied to read module source from location hint URI '" + location + "." , location , e );
@@ -2559,7 +2559,7 @@ public boolean tailRecursiveCall(final FunctionSignature signature) {
2559
2559
throw moduleLoadException ("Permission denied to read module source from location hint URI '" + location + "." , location , e );
2560
2560
}
2561
2561
2562
- return compileOrBorrowModule (prefix , namespaceURI , location , moduleSource );
2562
+ return compileOrBorrowModule (namespaceURI , prefix , location , moduleSource );
2563
2563
}
2564
2564
2565
2565
protected XPathException moduleLoadException (final String message , final String moduleLocation )
@@ -2591,18 +2591,18 @@ public Iterator<String> getMappedModuleURIs() {
2591
2591
/**
2592
2592
* Compile of borrow an already compile module from the cache.
2593
2593
*
2594
- * @param prefix the module namespace prefix
2595
2594
* @param namespaceURI the module namespace URI
2595
+ * @param prefix the module namespace prefix
2596
2596
* @param location the location hint
2597
2597
* @param source the source for the module
2598
2598
*
2599
2599
* @return the module or null
2600
2600
*
2601
2601
* @throws XPathException if the module could not be loaded (XQST0059) or compiled (XPST0003)
2602
2602
*/
2603
- private ExternalModule compileOrBorrowModule (final String prefix , final String namespaceURI , final String location ,
2603
+ private ExternalModule compileOrBorrowModule (final String namespaceURI , final String prefix , final String location ,
2604
2604
final Source source ) throws XPathException {
2605
- final ExternalModule module = compileModule (prefix , namespaceURI , location , source );
2605
+ final ExternalModule module = compileModule (namespaceURI , prefix , location , source );
2606
2606
if (module != null ) {
2607
2607
addModule (module .getNamespaceURI (), module );
2608
2608
declareModuleVars (module );
@@ -2613,14 +2613,14 @@ private ExternalModule compileOrBorrowModule(final String prefix, final String n
2613
2613
/**
2614
2614
* Compile an XQuery Module
2615
2615
*
2616
- * @param prefix the namespace prefix of the module.
2617
2616
* @param namespaceURI the namespace URI of the module.
2617
+ * @param prefix the namespace prefix of the module.
2618
2618
* @param location the location of the module
2619
2619
* @param source the source of the module.
2620
2620
* @return The compiled module, or null if the source is not a module
2621
2621
* @throws XPathException if the module could not be loaded (XQST0059) or compiled (XPST0003)
2622
2622
*/
2623
- private @ Nullable ExternalModule compileModule (final String prefix , String namespaceURI , final String location ,
2623
+ private @ Nullable ExternalModule compileModule (String namespaceURI , final String prefix , final String location ,
2624
2624
final Source source ) throws XPathException {
2625
2625
if (LOG .isDebugEnabled ()) {
2626
2626
LOG .debug ("Loading module from {}" , location );
@@ -2641,7 +2641,7 @@ private ExternalModule compileOrBorrowModule(final String prefix, final String n
2641
2641
}
2642
2642
2643
2643
final ExternalModuleImpl modExternal = new ExternalModuleImpl (namespaceURI , prefix );
2644
- final XQueryContext modContext = new ModuleContext (this , prefix , namespaceURI , location );
2644
+ final XQueryContext modContext = new ModuleContext (this , namespaceURI , prefix , location );
2645
2645
modExternal .setContext (modContext );
2646
2646
final XQueryLexer lexer = new XQueryLexer (modContext , reader );
2647
2647
final XQueryParser parser = new XQueryParser (lexer );
0 commit comments