<%@ page language="C#" masterpagefile="~/templates/Documentation.master" inherits="Page" pagetitle="Executing an XQuery from the Command Line" keywords="Executing an XQuery from the Command Line"%>

Executing an XQuery from the Command Line

 

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

You use the StylusXql utility to execute an XQuery from the command line. The StylusXql utility uses the Stylus Studio's built-in XQuery and XPath processors. The built-in processors are designed to aid testing and debugging and have not been optimized for performance. If you want to choose a particular processor, specify the processor in the XSLT scenario and run the scenario from within Stylus Studio.

The StylusXql utility takes the following format:

StylusXql [-in <source>] [-out<output file>] [-param name+value] [-i] [-debug host[:port]] <XQuery file>

Table 11 describes the parameters for the StylusXql command. All parameters are required.

Parameter
Description
-in <source>
The path of the XML document to be used to set the current context for the XQuery.
-out <output file>
File to which you want the XQuery result to be written. The default is stdout.
-param name=value
The name-expression pair of a variable in the XQuery specified in the XQuery file parameter.
-i
Indents the XQuery result.
-debug host[:port]
Debugs the query using the debug server specified by the host and, optionally, port parameters.
XQuery file
The path of the XQuery you want to execute against the file specified in the -in <source> parameter.
Table 11. StylusXql Command Line Parameters