Registering and enabling XML schemas for decomposition
Once an annotated schema has been successfully registered and enabled for decomposition, you can use it to decompose XML documents.
Before you begin
- Ensure that at least one element or attribute declaration in the XML schema is annotated with an XML decomposition annotation. This annotated element or attribute must be a descendant of, or itself be, a global element of complex type.
- Ensure all tables and columns referenced in the set of annotated schema documents that compose the XML schema exist in the database. A dependency is created between each table referenced in the schema and the XSR object that corresponds to this schema.
- Ensure that the applheapsz configuration parameter is set to at least 1024.
Procedure
Choose one of the following methods to register and enable XML schemas for decomposition:1
What to do next
When an XML schema is enabled for decomposition, a dependency is created between each table referenced in the schema and the XSR object that corresponds to this schema. This dependency prevents any table referenced in the schema from being renamed. The XSR object for the XML schema must be disabled for decomposition in order for a referenced table to be renamed. The tables referenced by XSR objects can be found in the SYSCAT.XSROBJECTDEP catalog view.
1 If the XML schema was previously
registered using any of these methods, but not enabled for decomposition,
you can enable the schema for decomposition by issuing the ALTER XSROBJECT
SQL statement with the ENABLE DECOMPOSITION option.
2 This method exists in two forms:
one form for XML schema documents that are input from an
InputStream
object,
and one form for XML schema documents that are in a String
.