namespaces = dc.getNamespaces();
final String[] nsUri = namespaces.getNamespaces();
for (int i = 0; i < nsUri.length; i++)
{
final String uri = nsUri[i];
final NamespaceDefinition nsDef = namespaces.getDefinition(uri);
final ResourceKey rawKey = nsDef.getDefaultStyleSheetLocation();
if (rawKey == null)
{
// there is no default stylesheet for that namespace.
continue;
}
final ResourceKey baseKey =
DocumentContextUtility.getBaseResource
(layoutProcess.getDocumentContext());
StyleSheet styleSheet = parseStyleSheet(rawKey, baseKey);
if (styleSheet == null)
{
continue;
}
Log.debug("Loaded stylesheet from " + rawKey + " for namespace " + nsDef.getURI());
addStyleRules(styleSheet, styleRules);
addPageRules(styleSheet, pageRules);
addCounterRules(styleSheet, counterRules);
}