use of org.whole.lang.xml.util.QName in project whole by wholeplatform.
the class XmlSpecific2XsiBuilderAdapter method attributeEntities.
protected void attributeEntities(EntityDescriptor<?> context, Attributes attributes) {
String uri = context.getLanguageKit().getURI();
boolean isAttributeFormQualified = MappingStrategyUtils.hasMappingStrategy(uri) && MappingStrategyUtils.getMappingStrategy(uri).isAttributesFormQualified();
IEntityIterator<Attribute> iterator = IteratorFactory.<Attribute>childIterator();
iterator.reset(attributes);
// add attribute features
while (iterator.hasNext()) {
Attribute attribute = iterator.next();
QName name = QName.create(ns, isAttributeFormQualified ? NamespaceUtils.getDefaultNamespace(ns) : uri, attribute.getName());
String value = attribute.getValue().getValue();
if (hasAttributeEntityMapping(context, name)) {
FeatureDescriptor fd = getAttributeFeatureMapping(context, name);
EntityDescriptor<?> ed = getAttributeEntityMapping(context, name);
attributeEntity(fd, ed, value);
iterator.remove();
}
}
// add any attributes feature
anyAttributeEntities(context, attributes);
}
Aggregations