final ReportTarget target,
final ExpressionRuntime runtime)
throws DataSourceException
{
final AttributeMap attributes = collectAttributes(node, runtime);
CSSDeclarationRule rule = null;
final String[] attrNamespaces = attributes.getNameSpaces();
for (int i = 0; i < attrNamespaces.length; i++)
{
final String namespace = attrNamespaces[i];
final Map attributeMap = attributes.getAttributes(namespace);
if (attributeMap == null || attributeMap.isEmpty())
{
continue;
}
final NamespaceDefinition nsDef = target.getNamespaceByUri(namespace);
final Iterator attributeIt = attributeMap.entrySet().iterator();
while (attributeIt.hasNext())
{
final Map.Entry entry = (Map.Entry) attributeIt.next();
final String key = (String) entry.getKey();
if (isStyleAttribute(nsDef, node.getType(), key))
{
final Object styleAttributeValue = entry.getValue();
rule = processStyleAttribute(styleAttributeValue, node, runtime, rule);
}
}
}
// Just in case there was no style-attribute but there are style-expressions
if (rule == null)
{
rule = processStyleAttribute(null, node, runtime, rule);
}
if (rule != null && rule.isEmpty() == false)
{
final AttributeMap retval = new AttributeMap(attributes);
retval.setAttribute(Namespaces.LIBLAYOUT_NAMESPACE, "style", rule);
retval.makeReadOnly();
return retval;