public Handler createChildHandler(QName qName) {
return getChildHandlerInternal(qName);
}
private Handler getChildHandlerInternal(QName qName) {
SchemaIndex index = parser.getSchemaIndex();
XSDElementDeclaration element = index.getChildElement(content, qName);
if (element != null) {
//TODO: determine wether the element is complex or simple, and create
ElementHandler handler = parser.getHandlerFactory()
.createElementHandler(element, this, parser);
return handler;
}
//could not find the element as a direct child of the parent, check
// for a global element, and then check its substituation group
element = index.getElementDeclaration(qName);
if (element != null) {
XSDElementDeclaration sub = element.getSubstitutionGroupAffiliation();
if (sub != null) {