Moving from SYSFUN.DSN_XMLVALIDATE to SYSIBM.DSN_XMLVALIDATE

There are two versions of DSN_XMLVALIDATE: a user-defined function and a built-in function. The user-defined function is deprecated. You should use the built-in function instead.

Procedure

To move from the DSN_XMLVALIDATE user-defined function to the DSN_XMLVALIDATE built-in function:

  1. For applications that invoke DSN_XMLVALIDATE using the qualified name SYSFUN.DSN_XMLVALIDATE:
    1. Change the name to SYSIBM.DSN_XMLVALIDATE.
    2. Prepare the applications again.
  2. For applications that invoke DSN_XMLVALIDATE without using the qualified name, you do not need to modify the applications. Db2 automatically uses the SYSIBM.DSN_XMLVALIDATE built-in function.
  3. Optional: Remove the XMLPARSE function that surrounds DSN_XMLVALIDATE.

    The SYSFUN.DSN_XMLVALIDATE user-defined function must be invoked from within the XMLPARSE function. The SYSIBM.DSN_XMLVALIDATE built-in function does not need to be invoked from within the XMLPARSE function.

Example

Suppose that an application calls the SYSFUN.DSN_XMLVALIDATE user-defined function:

EXEC SQL INSERT INTO T1(C1) VALUES (XMLPARSE (DOCUMENT
  SYSFUN.DSN_XMLVALIDATE(:xmldoc, 'SYSXSR.MYXMLSCHEMA')));

Update the INSERT statement like this to call the SYSIBM.DSN_XMLVALIDATE built-in function:

EXEC SQL INSERT INTO T1(C1) VALUES (
  SYSIBM.DSN_XMLVALIDATE(:xmldoc, 'SYSXSR.MYXMLSCHEMA'));