Page 1 of 1

Question about debugging an Xquery that imports a modu

Posted: Fri May 29, 2009 12:43 am
by thungp
Is that actually supported?


I am basically trying to move some functions into a separate file
to not clutter up my main xquery which I'm using to try and translate
one xml instance to another.
I keep getting this error.
SystemID: C:\data\temp\issues.xquery
Severity: info
Description: XQuery module validation/execution is not supported. Please validate/execute the main XQuery file.


If it is supported could some one post an example syntax of how this is supposed to be done?
In my example,
in my main xquery file I have this defined.
import module namespace local = "http://example.org/module1" at "issues-module-1.xquery";

Then in the module file I have something like this.

module namespace local = "http://example.org/module1";

define function local:lookupIdentifiedBy($name as xs:string)
as xs:string
{
return "test"
}

Am I supposed to use the key word define vice declare in modules?
I couldn't find a workign example anywhere.

Re: Question about debugging an Xquery that imports a modu

Posted: Fri May 29, 2009 12:07 pm
by sorin_ristache
Hello,

Yes, debugging an XQuery that imports a module is supported but the modules can be opened in the editor during the debugging session only by stepping in repeatedly until reaching the module. This limitation is specified in the section about XQuery debugging in the User Manual. Also you can find in that section a recommended procedure for debugging an XQuery that imports modules.

From the error message it seems you want to validate an XQuery module. In that case you should define a validation scenario that specifies the main XQuery file as the starting point of the validation and associate the scenario with the module file.


Regards,
Sorin