Page 1 of 1

MarkLogic XQuery Support

Posted: Thu Jul 31, 2014 12:40 pm
by twcook
Does the Enterprise version of oXygen support 1.0-ml XQuery? Currently I get a Saxon Error:

err:XPST0003
It is a static error if an expression is not a valid instance of the grammar defined in A.1 EBNF.

Re: MarkLogic XQuery Support

Posted: Thu Jul 31, 2014 12:56 pm
by twcook
Apologies, I copied the incorrect error:

 XQST0031: Unsupported XQuery version 1.0-ml

is the correct one.

Re: MarkLogic XQuery Support

Posted: Thu Jul 31, 2014 1:21 pm
by adrian
Hi,

Saxon XQuery in general does not support XQuery 1.0-ml (XQuery 1.0 MarkLogic) syntax. You have to run that XQuery with the MarkLogic engine (only available in the Enterprise edition of Oxygen).
Assuming you have already configured a MarkLogic data source and connection in Oxygen, you have to also configure an XQuery transformation scenario that uses the MarkLogic connection as the XQuery engine:
1. With the XQuery as the current editor, use Document > Transformation > "Configure Transformation Scenario(s)" (there's a corresponding button in the toolbar)
2. In the "Configure Transformation Scenario(s)" dialog press "New" and select "XQuery transformation" to create a new scenario.
3. Give it an appropriate name, e.g. MarkLogic XQuery
4. You can leave the XML and XQuery URL fields to the default values proposed (${currentFileURL} for the XQuery).
5. From the Transformer combo box pick the MarkLogic connection.
6. Press OK to accept the changes and Apply associated to run it.
You can reuse this generic scenario for any other 1.0-ml XQuery scripts.

Regards,
Adrian