multiple import of the same module
RSRob Stapper11 Sep 2026 15:19 # Hi,
In some situations I want to import the same module but from a different role. This situation can occur in a recursive construct or in case of multiple data-streams. For clarity and transparency it would be nice of I could use multiple prefixes for one and the same imported module.
Is this something that make sense to you and feasable?
mvgr.
Rob Stapper
CGChristian Grün11 Sep 2026 20:54 # Quoted text · Rob Stapper · 1 line
> In some situations I want to import the same module but from a different role. This situation can occur in a recursive construct or in case of multiple data-streams. For clarity and transparency it would be nice of I could use multiple prefixes for one and the same imported module.
Using declare namespace should do the job:
import module namespace wow = 'wow' at 'wow.xqm';
declare namespace splendid = 'wow';
$splendid:it-works()
⚡Generated with XQuery