addToList(testType(type, profile, null, profileID), exList);
//test children
if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && hasContent(type)) {
if (Composite.class.isAssignableFrom(type.getClass())) {
Composite comp = (Composite) type;
if (theValidateChildren) {
for (int i = 1; i <= profile.getSubComponents(); i++) {
SubComponent childProfile = profile.getSubComponent(i);
try {
Type child = comp.getComponent(i-1);
addToList(testType(child, childProfile, null, profileID), exList);
} catch (DataTypeException de) {
exList.add(new ProfileNotHL7CompliantException("More subcomponents in profile than allowed in message: " + de.getMessage()));
}
}