Each module should have a unique namespace.

----
Ron Hitchens r...@overstory.co.uk, +44 7879 358212


On March 19, 2018 at 2:46:42 PM, Evgeny Degtyarev (
evgeny.degtya...@lambdawerk.com) wrote:

I have three files:

-------- module.application1.xqy --------
xquery version "1.0-ml";
module namespace ns = "http://ns";;
import module "http://ns"; at "module .xqy";
declare variable $var1 := 'variable1';

-------- module.xqy --------
xquery version "1.0-ml";
module namespace ns = "http://ns";;
declare variable $var2 := 'variable2';

-------- script.xqy --------
xquery version "1.0-ml";
import module namespace ns = "http://ns"; at "module.application1.xqy";
(: echo :)
$ns:var1, $ns:var2

----------------------------------------------------------------------------------

When I run the  script.xqy, I'm getting the following error:
*XDMP-UNDVAR: (err:XPST0008) Undefined variable $ns:var2*

Why it's not possible to access  $ns:var2 from the script this way?
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to