Certain limits and restrictions apply to annotated XML schema decomposition.
Condition | Limit value |
---|---|
Maximum size of document to be decomposed | 2 GB |
Maximum number of tables referred to in a single annotated XML schema | 100 |
Maximum number of $DECOMP_CONTENT or $DECOMP_ELEMENTID instances in an db2-xdb:expression annotation | 10 |
Maximum number of steps in db2-xdb:locationPath | 100 |
Maximum number of namespaces explicitly listed in the "namespace" attribute of <xs:any> or <xs:anyAttribute> (if the list contains the special values ##targetNamespace or ##local, then these also count towards the limit) | 25 |
Maximum string length of the value of db2-xdb:name (table name), db2-xdb:column, db2-xdb:defaultSQLSchema, or db2-xdb:SQLSchema | Same as the limit for the corresponding DB2® object |
Maximum string length of the value of db2-xdb:rowSet | Same as the limit for db2-xdb:name |
Maximum string length for value of $DECOMP_CONTENT | 4096 bytes |
If, however, these elements or attributes are children of elements that are decomposed with db2-xdb:contentHandling set to "serializeSubtree" or "stringValue", then the contents of the wildcard elements or attributes will be decomposed as part of the serialized subtree or string value. These wildcard element or attributes must satisfy the namespace constraints specified in the corresponding <xs:any> or <xs:anyAttribute> declaration, however, in order to be part of the serialization.
<xs:element name="head" type="BaseType" />
<xs:element name="member1" type="derived1FromBaseType" substitutionGroup="head"/>
<xs:element name="member2" type="derived2FromBaseType" substitutionGroup="head"/>
<xs:element name="member3" type="derived3FromBaseType" substitutionGroup="head"/>
can
be changed to an equivalent named model group: <xs:group name="mysubstitutiongrp">
<xs:choice>
<xs:element name="head" type="BaseType"/>
<xs:element name="member1" type="derived1FromBaseType"/>
<xs:element name="member2" type="derived2FromBaseType"/>
<xs:element name="member3" type="derived3FromBaseType"/>
</xs:choice>
</xs:group>
Occurrences of the <head> element can then be replaced with the newly defined named model group in the XML document.
Ensure that the type of an element specified with xsi:type in the XML document matches the type specified for that element in the context. If the content of the element or its descendants does not need to be decomposed individually, then the type of the element can be changed to xs:anyType in the XML schema. With this change, the XML documents do not need to be modified.