XMLBeans workaround for enumeration warnings with IEPD code generation

Any enumerated type with more than ~2000 values fails in XMLBeans. The warnings generally received are:

[java] warning: SchemaType Enumeration found with too many enumeration values to create a Java enumeration. The base SchemaType T=VMACodeSimpleType@http://niem.gov/niem/fbi/2.0" will be used instead

The user must break each oversize table into parts of a size the tool can handle. These partial tables are then "Unioned" together through XML Schema. The "union" technique is essentially a work-around that requires modifying the type definition (in the reference schemas) for any enumerated type that exceeds the limit.


VMACodeSimpleType and/or VMOCodeSimpleType are usually the tables that cause these warnings to be generated in XML Beans.

Here is the technique applied to VMA:

  1. Split the VMACodeSimpleType into four even pieces.

- Four worked;

- Three will also work and;

- Two might also work.

Keep the number of parts to the absolute minimum that works.

  1. Then union the pieces in the VMACodeSimpleType definition as follow:

<xsd:simpleType name="VMACodeSimpleType">

<xsd:union memberTypes="ncic:VMA1CodeSimpleType ncic:VMA2CodeSimpleType ncic:VMA3CodeSimpleType ncic:VMA4CodeSimpleType"/>



While this technique modifies the NIEM simple type structure, it is effectively a form of constraint to accommodate tool limitations. Because the simple type name is not affected by the workaround, an IEPD using the modified code table will still validate against the NIEM and will therefore be conformant.