XQuery Editor - XQuery Source Tab


XQuery support is available only in Stylus Studio XML Enterprise Suite and Stylus Studio XML Professional Suite.

You can use the XQuery editor XQuery Source tab to view, edit, and compose XQuery code. You can edit the XQuery in the same way you can edit any other XML document. The usual editing tools are available to you, and Stylus Studio's Sense:X feature is supported.

To display the XQuery editor, open an XQuery file, or select File > New > XQuery File from the Stylus Studio menu bar. At the bottom of the XQuery editor window, click the XQuery Source tab.


Create Scenario

A scenario allows you to preview the results of applying an XQuery. Scenario settings include the name of an XML source document, the values of any parameters in the XQuery script, and the type of performance metrics you want Stylus Studio to capture, if any. XQuery scenarios are optional.

To create a scenario, click to the right of the scenario name field. After you create the first scenario, the name of the current scenario appears in this field.

Click the down arrow to select a previously defined scenario. Click Preview Result to apply the XQuery in the context of the selected scenario. Stylus Studio displays the results of applying the XQuery in the Preview window.


Preview Result applies the XQuery in the context of the current scenario.

Change Font changes the font of the text display in Stylus Studio. This change affects only the Stylus Studio display. Beyond personal preference, this is useful for localization. The fonts that are available are the fonts that can display the characters in your XML file.

displays the Scenario Properties dialog box. Use this dialog box to define a new scenario, update the settings for a scenario, or view information about a scenario.

For More Information

Building an XQuery Using the Mapper

Working with the XQuery collection() Function

Creating an XQuery Scenario

XQuery Editor - Mapper Tab

Free Stylus Studio XML Training:
W3C Member