super(pParent, pBaseAttribute);
if (isReference()) {
this.name = pBaseAttribute.getRef();
isGlobal = pBaseAttribute.isGlobal();
} else {
XsNCName myName = pBaseAttribute.getName();
if (myName == null) {
throw new LocSAXException("Invalid attribute: Neither of its 'name' or 'ref' attributes are set.",
pBaseAttribute.getLocator());
}
XsESchema schema = pBaseAttribute.getXsESchema();
XsAnyURI namespace;
String namespacePrefix;
boolean qualified = isGlobal = pBaseAttribute.isGlobal();
if (!qualified) {
XsFormChoice form = pBaseAttribute.getForm();
if (form == null) {
form = schema.getAttributeFormDefault();
}
qualified = XsFormChoice.QUALIFIED.equals(form);
}
if (qualified) {
namespace = schema.getTargetNamespace();
namespacePrefix = schema.getTargetNamespacePrefix();
} else {
namespace = null;
namespacePrefix = null;
}
this.name = new XsQName(namespace, myName.toString(), namespacePrefix);
}
xsAnnotation = pBaseAttribute.getAnnotation();
}