Go to Preferences->XML->XSLT/FO/XQuery->XQuery and set the Berkeley DBXML connection
for XQuery validation.

5. Validate XQuery.

After step 4, you will benefit from the automatic validation feature and you can use
the Validate button to get a list of validation errors.

6. Execute XQuery.

Go to associated scenario configuration and select the Berkeley DBXML connection as
the transformation engine. The collections from your XQuery are automatically opened if
they are available in the environment home directory you set. For example, in the
following Query: