XSElement element = getXSSchema().getElement(getName());
if (element == null) {
throw new LocSAXException("Invalid element reference: " + getName() + " is not defined.",
getLocator());
}
element.validate();
myType = element.getType();
} else {
XsTElement element = getXsTElement();
if (isInnerSimpleType()) {
myType = getXSSchema().getXSObjectFactory().newXSType(this, element.getSimpleType());