XQuery provides declare option as a mechanism to specify options that affects the behaviour of a
particular implementation. This page documents the options available in XQSharp.
The W3C XSLT 2.0 and XQuery 1.0 Serialization specification provides a set of parameters for XML serialization of the results of an XQuery or a stylesheet. XQSharp supports all the serialization settings specified by the W3C, along with several extension parameters, including support for serializing Canonical XML, however the XQuery language has no standard way of setting these parameters. XQSharp allows these parameters to be specified from within the query using the following syntax:
declare namespace serialization="http://www.xqsharp.com/serialization";
declare option serialization:parameter "value";
The serialization parameters are discussed in depth in the documentation.