Transforming Data Using XQuery Mapper

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Upgrading XQuery Code

This section describes the procedure for upgrading inline XQuery code and stand alone XQuery files from XQuery 2002 to 2004.

This section contains the following topics:


Upgrading Inline XQuery Code

When you upgrade a WLI 8.x project to 10g Release 3 (10.1.3), by default, inline XQuery 2002 code (embedded in JPD files) is not converted to XQuery 2004. You can convert the inline XQuery code to XQuery 2004, by performing the following steps in the Source Upgrade screen of the upgrade wizard.

Figure A-1 Source Upgrade Screen of the Upgrade Wizard

Source Upgrade Screen of the Upgrade Wizard

  1. Expand JPD Document Upgrader options.
  2. Select the Upgrade XQ2002 to XQ2004 check box, as shown in the following figure.
  3. Figure A-2 Upgrade XQ2002 to XQ2004

    Upgrade XQ2002 to XQ2004

  4. Continue with the application upgrade process.
  5. When the upgrade process is completed, XQuery 2002-compliant code that is embedded in JPD files (inline XQuery code) is converted to XQuery 2004.


Upgrading XQuery Files

XQuery 2002-compliant XQuery files (unlike inline XQuery code) are not converted automatically to XQuery 2004 during the application upgrade process.

You can upgrade XQuery 2002-compliant XQuery files to XQuery 2004 by right-clicking the XQuery file in the Navigator view in Workshop and choosing Upgrade to XQuery 2004. However, the following XQuery constructs and functions are not converted to XQuery 2004:

During the upgrade process, XQuery 2002 constructs and functions that are not supported by XQuery 2004 are flagged with comment entries indicated by “: Warning :” in the code. In addition, a warning message is displayed during the upgrade process, informing you that unsupported constructs and functions were encountered.

After the upgrade process, you can identify the constructs and functions that are not upgraded to XQuery 2004 by looking for the “: Warning :” comments. You must then manually change the unsupported constructs and functions to make them comply with the XQuery 2004 standard.

  Back to Top       Previous  Next