Altova StyleVision 2024 Enterprise Edition

The XQuery 3.1 Engine of StyleVision conforms to the World Wide Web Consortium's (W3C's) XQuery 3.1 Recommendation of 21 March 2017 and includes support for XPath and XQuery Functions 3.1. The XQuery 3.1 specification is a superset of the 3.0 specification. The XQuery 3.1 engine therefore supports XQuery 3.0 features.



Your XQuery 3.1 document should declare the following namespaces in order for you to be able to use all the type constructors and functions available in XQuery 3.1. The prefixes given below are conventionally used; you could use alternative prefixes if you wish.


Namespace Name


Namespace URI

XML Schema types


XPath/XQuery 3.1 functions


Math functions


Map functions


Array functions


XQuery, XSLT, and XPath Error Codes


Serialization functions



The following points should be noted:


The XQuery 3.1 Engine recognizes the prefixes listed above as being bound to the corresponding namespaces.

Since the built-in functions namespace listed above (see fn:) is the default functions namespace in XQuery, the fn: prefix does not need to be used when built-in functions are invoked (for example, string("Hello") will call the fn:string function). However, the prefix fn: can be used to call a built-in function without having to declare the namespace in the query prolog (for example: fn:string("Hello")).

You can change the default functions namespace by declaring the default function namespace expression in the query prolog.

When using types from the XML Schema namespace, the prefix xs: may be used without having to explicitly declare the namespaces and bind these prefixes to them in the query prolog. (Example: xs:date and xs:yearMonthDuration.) If you wish to use some other prefix for the XML Schema namespace, this must be explicitly declared in the query prolog. (Example: declare namespace alt = ""; alt:date("2004-10-04").)


If namespaces for functions, type constructors, node tests, etc are wrongly assigned, an error is reported. Note, however, that some functions have the same name as schema datatypes, e.g. fn:string and fn:boolean. (Both xs:string and xs:boolean are defined.) The namespace prefix determines whether the function or type constructor is used.


Implementation-specific behavior

Implementation-specific characteristics are the same as for XQuery 1.0.


Additionally, the Altova-specific encoding x-base64tobinary can be used to create a binary result document, such as an image.


© 2018-2024 Altova GmbH