www.altova.com
Previous  Top  Next

XQuery 1.0 Executions


Syntax

The syntax to invoke XQuery 1.0 executions is:

 

AltovaXML -xquery xqueryfile [-in inputXMLfile -out outputfile] [options]

 

where

 

AltovaXML

Calls the application.

-xquery (or -xq)

Specifies that the Altova XQuery 1.0 Engine is to be used for an XQuery execution of the file xqueryfile.

-in

Specifies the input XML file.

-out

Specifies the output file and its location. If this option is omitted, output is written to the standard output.

 

The following options are available:

 

-var

Specifies an external variable and its value. Takes the form name=value. Any number of external variables can be submitted, but each must be preceded by the -var keyword. Variable values must be strings that conform to the lexical form of the datatype as which the variable has been declared.

-xparam

Specifies an XQuery parameter name and the parameter's value. Takes the form name=XPathExpression. Use double quotes to enclose the XPath expression if the expression contains spaces. Use single quotes to delimit string literals in the XPath expression. Any number of parameters can be submitted, but each must be preceded by the -xparam keyword.

-outputMethod

(or -om)

Serialization option to specify the type of output. Valid values are xml, html, xhtml, and text. Default is xml.

-omitXMLDeclaration

(or -od)

Serialization option to specify whether the XML declaration should be omitted from the output or not. Valid values are yes and no. Default is yes.

-outputIndent

(or -oi)

Serialization option to specify whether the output should be indented or not. Valid values are yes and no. Default is no.

-outputEncoding

(or -oe)

Serialization option to specify the character set of the output. Valid values are names in the IANA character set registry. Default is UTF-8.

 

Note: If the -out parameter is omitted, output is written to the standard output.

 

 

Examples

 

AltovaXML -xquery testquery.xq -out testout.xml
AltovaXML -xquery testquery.xq -in products.xml -out testout.xml

-var company=Altova -var date=2006-01-01

AltovaXML -xquery testquery.xq -out testout.xml
-xparam source = " doc( 'c:\test\books.xml' )//book "
AltovaXML -xquery testquery.xq -in products.xml -out testout.xml

-var company=Altova -omitXMLDeclaration no -oe ASCII

 


Previous  Top  Next

© 2008 Altova