if (styleValue instanceof String)
{
final String styleText = (String) styleValue;
final ResourceManager resourceManager = getDocumentContext().getResourceManager();
final CSSDeclarationRule rule = StyleSheetParserUtil.getInstance().parseStyleRule
(null, styleText, null, null, resourceManager, StyleKeyRegistry.getRegistry());
if (rule != null)
{
copyStyleInformation(node.getLayoutStyle(), rule, node);
}
}
else if (styleValue instanceof CSSDeclarationRule)
{
final CSSDeclarationRule rule = (CSSDeclarationRule) styleValue;
copyStyleInformation(node.getLayoutStyle(), rule, node);
}
}