Input / Output

Opt LongOpt Arguments with example Description
-f –queryFile String inputFile

“query.xq”

Specify the file of the query or plan to run
-i –inlineQuery String inputQuery

“for $i in … return … “

Specify the query to run in the command line
-p –queryPlan String planFile

“queryPlan.xml”

Specifiy the query  plan to run
-d –discardResult Discard the generated results
-o –outputFile String outputFile

“result.xml”

-

Specify where the result should be written to.

Either a file or the standard output (-).

-s –serializer See table “Serializer parameter” Specify a number of serializer parameters

Serializer

Taken from the XSLT and XQuery Serialization 3.0 working draft

Parameter Permitted values for parameter Description
byte-order-mark yes | no This parameter indicates whether the serialized sequence of octets is to be preceded by a Byte Order Mark.
cdata-section-elements name1;name2;… A list of QNames, possibly empty.
doctype-public A string of Unicode characters
doctype-system A string of Unicode characters
encoding A string printable ASCII characters
escape-uri-attributes yes | no
include-content-type yes | no
indent yes | no
media-type A string of Unicode characters
Method text | html | xhtml | xml Output method
normalization-form NFC | NFD | NFKD | fully-normalized | none Not specified yet
omit-xml-declaration yes | no
standalone yes | no | omit
suppress-indentation yes | no
undeclare-prefixes yes | no
use-character-maps (a,astring);(b,bstring),…
version A string of Unicode characters

Print Options

Opt LongOpt Arguments with example Description
-ex –explain Print the query plan in XML format
-sp –serializePlan String planFile.xml

“queryPlan.xml”

Print the execution plan in XML format
-ps –printStores Print the states of all variables at the end of execution
-t –timing Print timing information in standard

Error stream

XQuery language features

Opt LongOpt Arguments with example Description
-sa –schemaAwareness Enable XML Schema support and hence the use of the validate keyword
-fm –fulltextMode Enable XQuery Fulltext support  (default off)
-um –updateMode Enable XQuery Update Facility support (default off)
-sm –scriptingMode Enable XQuery Scripting support (default off)
? –xquery11Mode Enable XQuery 1.1 support (default off)
? –continuousMode Enable support for Continuous XQuery  (default off)
-x –updateFiles Make updates on files persistent
-b –noBackupUpdates Backup updated files by storing the  old version with a .bak extension

Input and Validation

Opt LongOpt Arguments with example Description
-dtd –dtdAwareness Enable DTD support/validation mode on input functions and external variable assignment
-val –validation [strict|lax] Enable input (schema) validation and optionally set the validation mode on input functions and external variable assignment
-str –xmlStream Treat XML input as XML node sequence, not as a single element
-xsd –schemaFiles String schemaFiles

“f1;f2;…,fn”

Loads Schema files for validation

Context

Opt LongOpt Arguments with example Description
-c –context See table “Context components” Specify a number of components of the static context
-e –externalVariable String varName

varName := literal

varName = file.xml

varName -

. := literal

. = file.xml

. -

Specify external variable or context item as literal, file or standard input

Context components

Component Default initial value Parameter Description
XPath 1.0 Compatibility Mode

Compatibility

false true | false Indicate whether rules for compatibility with XPath 1.0 are in effect. (For languages using XPath 2.0 as a subset)

This component is set fixed to false

static-namespaces

static-ns

fn, xml, xs, xsi, local (prefix1,uri1);(prefix2,uri);… Set the statically known namespaces.
Default element/type namespace

default-elem-ns

no namespace String URI | none Set the default element/type namespace
Default function namespace

default-func-ns

fn String URI | none Set the default function namespace
In-scope schema types

schema-types

built-in types in xs In-scope schema types

In-scope element declarations none

In-scope attribute declarations none

In-scope variables none (expanded QName1,type1); (expanded QName2,type2);… Set the variables that are available for reference within an expression.
Context item static type

ctx-item-type

none String type set the static type of the context item within the scope of a given expression
Function signatures

func-signatures

functions in fn namespace, constructors for built-in atomic types (expanded QName1,arity1,parameter types1); (expanded QName2,arity2,parameter types2);… Set functions that are available from within an expression.
Statically known collations

static-collations

only the default collation (uri1,collation1);(uri2;collation2);… Set collations available for use in processing queries and expressions
Default collation

default-collations

Unicode codepoint collation String URI Set one of the collation in the statically known collations as default.
Construction mode

Construction

preserve preserve | strip
Ordering mode

Ordering

ordered ordered | unordered Set the ordering mode for results of a path expression, FLOWR expression, set expression that have no order by clause.
Default order for empty sequences

default-es-order

least greatest | least Set the order-rank of the empty sequence when used as a ordering key.
Boundary-space policy

boundary-space-polizy

strip preserve | strip Set the Boundary-space policy to either preserve or strip (remove)
Copy-namespace mode

copy-ns-mode

preserve, inherit preserve | no-preserve,

inherit | no-inherit

Set the Copy-namespace mode for the in-scope namespace of the new node.

preserve: include the inscope namespaces from the original node.

inherit: include the inscope namespaces from the parent node.

Base URI

base-uri

TO BE DEFINED String URI Set the base URI used for resolving relative URIs
Statically known documents

static-documents

none uri1;uri2;… Add uri1, uri2, … to the statically known documents
Statically known collections

static-collections

none uri1;uri2;… Add uri1, uri2, … to the statically known collections
Statically known default collection type

static-default-collection-type

node()* String type Set default type of the sequence of nodes resulting from calling the fn:collection function with no arguments