Package org.eclipse.xsd

Examples of org.eclipse.xsd.XSDSimpleTypeDefinition


                    for (XSDAttributeDeclaration attribute : (List<XSDAttributeDeclaration>) Schemas
                            .getAttributeDeclarations(xsdType, false)) {
                        if (attribute.isAttributeDeclarationReference()) {
                            attribute = attribute.getResolvedAttributeDeclaration();
                        }
                        XSDSimpleTypeDefinition type = attribute.getTypeDefinition();
                        if (type == null) {
                            // look up in global schema
                            for (XSDAttributeDeclaration ad : schema.getAttributeDeclarations()) {
                                if (Utilities.equals(ad.getTargetNamespace(),
                                        attribute.getTargetNamespace())
                                        && Utilities.equals(ad.getName(), attribute.getName())) {
                                    type = ad.getTypeDefinition();
                                    break;
                                }
                            }
                        }
                        if (type == null) {
                            throw new RuntimeException(
                                    "Could not locate type definition for attribute "
                                            + name(attribute) + " of " + getName());
                        }
                        if (type.getName() == null) {
                            // TODO: deal with anonymous attribute types
                            continue;
                        }
                        AttributeType gtType = createType(type, DUMMY_DEPTH);
                        // TODO: if attribute is required
View Full Code Here

TOP

Related Classes of org.eclipse.xsd.XSDSimpleTypeDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.