return (Map<String, StructureDefinition>) applScope.get(KEY_STRUCTS_CACHE);
}
}
private XSDNode loadRootDataNode(DataControlDefinitionNode defNode) throws XSDException {
final XMLSchema schema = defNode.getSchema();
// try to find root data node as XSD Element or otherwise as XSD ComplexType
XSDNode rootDataNode = schema == null ? null : schema.getElement(schema.getSchemaTargetNS(), defNode.getRoot());
if (rootDataNode == null) {
rootDataNode = schema == null ? null : schema.getType(schema.getSchemaTargetNS(), defNode.getRoot());
}
if (rootDataNode == null) {
// both XSD Element and ComplexType not found. Reporting to the user.
if (Beans.isDesignTime()) {
MessageUtils.showErrorMessage("Element or ComplexType not Found.",