Trying to figure out if it is possible and if so, how to do it.    In my main xquery, I had the following.  I am using SaxonB 8.7.1.

declare variable $last_model as xs:string external; (::pragma saxon:default "last"::)

  When I move it into a module and the module is imported in my main xquery.

declare variable $mymod:last_model as xs:string external; (::pragma saxon:default "last"::)

  Once I do that,

     [java] XTDE0050: No value supplied for required parameter $last_model
     [java] net.sf.saxon.trans.DynamicError: No value supplied for required parameter $last_model
     [java] at net.sf.saxon.instruct.GlobalParam.evaluateVariable(GlobalParam.java:44)
     [java] at net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:237)
     [java] at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:226)
     [java] at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:109)
     [java] at net.sf.saxon.expr.ComputedExpression.evaluateItem(ComputedExpression.java:519)
     [java] at net.sf.saxon.expr.ExpressionTool.eagerEvaluate(ExpressionTool.java:297)
     [java] at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:245)
     [java] at net.sf.saxon.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:180)
     [java] at net.sf.saxon.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:204)
     [java] at net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:237)
     [java] at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:226)
     [java] at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:109)
     [java] at net.sf.saxon.expr.ComputedExpression.evaluateItem(ComputedExpression.java:519)
     [java] at net.sf.saxon.expr.ExpressionTool.eagerEvaluate(ExpressionTool.java:297)
     [java] at net.sf.saxon.expr.ExpressionTool.lazyEvaluate(ExpressionTool.java:245)
     [java] at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:164)
     [java] at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:147)
     [java] at net.sf.saxon.expr.ForExpression$MappingAction.map(ForExpression.java:609)
     [java] at net.sf.saxon.expr.MappingIterator.next(MappingIterator.java:55)
     [java] at net.sf.saxon.expr.MappingIterator.next(MappingIterator.java:70)
     [java] at net.sf.saxon.expr.ItemMappingIterator.next(ItemMappingIterator.java:39)
     [java] at net.sf.saxon.instruct.Block$BlockIterator.next(Block.java:411)
     [java] at net.sf.saxon.instruct.Block$BlockIterator.next(Block.java:411)
     [java] at net.sf.saxon.query.XQueryExpression$ErrorReportingIterator.next(XQueryExpression.java:521)
     [java] at net.sf.saxon.query.QueryResult.serializeSequence(QueryResult.java:126)



Thanks,
Greg