if (theValidateChildren) {
if (profile.getComponents() > 0 && !profile.getUsage().equals("X")) {
if (Composite.class.isAssignableFrom(type.getClass())) {
Composite comp = (Composite) type;
for (int i = 1; i <= profile.getComponents(); i++) {
Component childProfile = profile.getComponent(i);
try {
Type child = comp.getComponent(i-1);
addToList(doTestComponent(child, childProfile, profileID, validateChildren), exList);
} catch (DataTypeException de) {
exList.add(new ProfileNotHL7CompliantException("More components in profile than allowed in message: " + de.getMessage()));