# Changes to XQuery 1.0 support

When the type of a variable is declared in an `as` clause in the `for` or `let` clause of a FLWOR expression, the actual type of the value must now match exactly; the implicit conversions allowed when doing function calls (notably atomization and numeric promotion) are no longer permitted. This also applies to global variable declarations in the Query prolog.

The performance of FLWR expressions has been improved, by moving conditions in the `where` clause up to the innermost `let` or `for` clause on which they depend.

The `as` clause in `some` and `every` expressions has been implemented.

An `encoding` is now accepted as part of the XQuery version declaration; however, the information is ignored. Saxon assumes that the encoding of the query is the default encoding for the platform.

The rules for the use of namespaces in function names have been tightened up to align with the current language specification.

The parser now checks for duplicated declarations in the query prolog. More generally, the parser is more thorough in checking for static errors, and many more of the errors are now reported using the error codes defined in the XQuery specification. The rules for `import module` are now checked much more thoroughly: for example, module imports cannot now be cyclic.

The `inherit-namespaces` option in the query prolog is implemented. (Note, however, that this syntax is expected to change again in the next W3C working draft.)

In `import module`, a list of URIs can now be supplied. Each one is loaded separately. If the list is empty, then the effect of `import module` is to make all the modules for the relevant namespace that have previously been loaded available within the calling module; if there are no such modules, an error is reported.

Expand | Up Next