String nsText;
if (nsList == null)
nsText = "##any";
else
nsText = nsList.getStringValue();
QNameSet wcset = QNameSet.forWildcardNamespaceString(nsText, targetNamespace);
if (baseModel != null && !extension)
{
if (baseModel.getWildcardSet() == null)
{
state.error(XmlErrorCodes.COMPLEX_TYPE_RESTRICTION$BASE_HAS_ATTR_WILDCARD, null, xsdwc);
continue; // ignore the extra wildcard
}
else if (!baseModel.getWildcardSet().containsAll(wcset))
{
state.error(XmlErrorCodes.COMPLEX_TYPE_RESTRICTION$ATTR_WILDCARD_SUBSET,
new Object[] { nsText }, xsdwc);
continue; // ignore the restriction
}
}
int wcprocess = translateWildcardProcess(xsdwc.xgetProcessContents());
if (result.getWildcardProcess() == SchemaAttributeModel.NONE)
{
result.setWildcardSet(wcset);
result.setWildcardProcess(wcprocess);
}
else
{
if (extension)
{
result.setWildcardSet(wcset.union(result.getWildcardSet()));
result.setWildcardProcess(wcprocess);
}
else
{
result.setWildcardSet(wcset.intersect(result.getWildcardSet()));
// keep old process
}
}
break;
}