{
AngularSelectorElement selector = element.getSelector();
if (selector instanceof HasAttributeSelectorElementImpl) {
selectorAttributeName = ((HasAttributeSelectorElementImpl) selector).getName();
// resolve attribute expression
XmlAttributeNode attribute = node.getAttribute(selectorAttributeName);
if (attribute != null) {
attribute.setElement(selector);
}
}
}
//
for (AngularPropertyElement property : element.getProperties()) {
// prepare attribute name
String name = property.getName();
if (name.equals(".")) {
name = selectorAttributeName;
}
// prepare attribute
XmlAttributeNode attribute = node.getAttribute(name);
if (attribute == null) {
continue;
}
// if not resolved as the selector, resolve as a property
if (!name.equals(selectorAttributeName)) {
attribute.setElement(property);
}
// skip if attribute has no value
if (!hasValue(attribute)) {
continue;
}