Page 1 of 1

XQuery Module Validation

Posted: Sat Mar 10, 2012 4:53 am
by CurtisFleming
I am interested in getting Oxygen to validate the contents of XQuery modules in real-time. Being able to catch grammar errors like bad parentheses or missing a 'then' like any other main XQuery would be a huge time saver. It is not intuitive why wrapping XQuery in a declare function statement shields it from static analysis.

The error message:
Engine name: Saxon-EE XQuery
Description: XQuery module validation/execution is not supported. Please validate/execute the main XQuery file.

I am using xDB 10.2 and I'm aware that an Oxygen-xDB connection exists but don't have the Enterprise license for it (yet). By activating the connector and switching the XQuery validation engine to the xDB connector, will real-time module validation be available, with red underlined text, etc.?


Re: XQuery Module Validation

Posted: Mon Mar 12, 2012 5:43 pm
by adrian

Saxon-EE(the default XQuery validator that Oxygen uses) cannot validate modules out of context(on their own), it needs a main XQuery file that imports them.

If you have an Enterprise license and an xDB connection configured, you will be able to transform and validate with the xDB XQuery engine.
Note however that automatic validation(validate as you type) is not available when using remote database engines such as xDB. You can use the manual validation instead: Document > Validate > Validate after configuring a transformation or a validation scenario that specified the xDB connection as the engine.