Is it ignored only if used in a module?  Is this why I didn't get this problem while declaring in the main xquery?
 
 
  Also, I am getting this same error for external variables that don't have defaults.
 
declare variable $mymod:prefixListMinSequence as xs:string external;
 
Thanks,
Greg

-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Michael Kay
Sent: Wednesday, April 26, 2006 1:09 PM
To: saxon-help@lists.sourceforge.net
Subject: RE: [saxon] External var in xquery module

You're using the old syntax for pragmas. For the current syntax, see:
 
http://www.saxonica.com/documentation/using-xquery/extensions.html
 
Your "pragmas" will be interpreted as comments, and ignored.
 
Michael Kay
Saxonica Limited


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Gee, Gregory
Sent: 26 April 2006 17:27
To: saxon-help@lists.sourceforge.net
Subject: [saxon] External var in xquery module


  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