final ImmutableSet<ICSSSelector> allSelectors = getAllSelectors(css);
if (isCompatibilityVersion3)
return resolveSelectorsAsFlex3Style(allSelectors);
final ICSSNamespaceDefinition defaultNamespace = css.getDefaultNamespaceDefinition();
final Builder<ICSSSelector, String> builder = new Builder<ICSSSelector, String>();
for (final ICSSSelector selector : allSelectors)
{
// Expand selector to QName and conditions.
if (isWildcardSelector(selector))
continue;
final String prefix = selector.getNamespacePrefix();
final ICSSNamespaceDefinition namespace;
if (prefix == null)
{
// Check if the selector is a type selector without explicit namespace.
if (defaultNamespace == null)
{
problems.add(new CSSUnknownDefaultNamespaceProblem((CSSSelector)selector));
continue;
}
else
{
namespace = defaultNamespace;
}
}
else
{
// Resolve namespace.
namespace = css.getNamespaceDefinition(prefix);
}
if (namespace == null)
{
problems.add(new CSSUndefinedNamespacePrefixProblem((CSSSelector)selector));
continue;
}
assert (selector.getElementName() != null) : "Null element name should be skipped as a wildcard selector.";
final XMLName xmlName = new XMLName(namespace.getURI(), selector.getElementName());
// Resolve type name.
final String qname = xmlNameResolver.resolveXMLNameToQualifiedName(xmlName, MXMLDialect.MXML_2009);
if (qname == null)
{