XQueries are very similar to the XSL stylesheets in the sense they both are capable of transforming an XML input into another format. You can define transformation scenarios that specify the input URL, the preview mode, XML or XHTML. The result can be saved and opened in the associated application. You can even run a FO processor on the output of an XQuery. The transformation scenarios may be shared between many XQuery files, are exported at the same time with the XSLT scenarios and can be managed in the dialog Configure Transformation Scenario or in the Scenarios view. The transformation performed can be based on the XML document specified in the Input field, or, if this field is empty, the documents referred from the query expression are used instead. The parameters of XQuery transforms must be set in the Parameters dialog. Parameters that are in a namespace must be specified using the qualified name, for example a param parameter in the http://www.oxygenxml.com/ns namespace must be set with the name {http://www.oxygenxml.com/ns}param.
The transformation uses the processor Saxon 9.2.0.6 HE, Saxon 9.2.0.6 PE and Saxon 9.2.0.6 EE or a database connection(details can be found in the Working with Databases chapter - in the XQuery transformation section) or any XQuery processor that provides an XQJ API implementation.
The Saxon 9.2.0.6 EE processor supports also XQuery 1.1 transformations. If the option Enable XQuery 1.1 support is enabled Saxon EE runs an XQuery transformation as an XQuery 1.1 one.
Any transformer that offers an XQJ API implementation can be used when validating XQuery or transforming XML documents.
Go to Preferences -> Data Sources. In the Data Sources panel click the New button.
Enter a unique name for this data source and select XQuery API for Java(XQJ) from the driver type combo box.
Press the Add button to add XQJ API specific files. Oxygen will detect any implementation of javax.xml.xquery.XQDataSource and present them in Driver class field.
You can manage the Driver Files using Add, Remove, Detect and Stop(detection) buttons.
Select the most suited Driver class.
Click OK to finish the data source configuration.
Go to Preferences -> Data Sources. In the Connections panel click the New button.
Enter a unique name for this connection and select one of the previously configured XQJ data sources from the Data Source combo box.
Fill-in the Connection Details. The properties presented in the Connection Details table are automatically detected depending on the selected Data Source.
Click OK.