if (style == null)
{
final Object content = node.getMetaAttribute("#content");
if (content instanceof StyleSheet)
{
final StyleSheet styleSheet = (StyleSheet) content;
addStyleRules(styleSheet, styleRules);
addPageRules(styleSheet, pageRules);
addCounterRules(styleSheet, counterRules);
return;
}
}
final String styleText = String.valueOf(style);
try
{
final byte[] bytes = styleText.getBytes("UTF-8");
final ResourceKey rawKey = resourceManager.createKey(bytes);
final ResourceKey baseKey =
DocumentContextUtility.getBaseResource
(layoutProcess.getDocumentContext());
final StyleSheet styleSheet = parseStyleSheet(rawKey, baseKey);
if (styleSheet == null)
{
return;
}
addStyleRules(styleSheet, styleRules);