public void resolve (final LayoutProcess process,
final LayoutElement currentNode,
final StyleKey key)
{
final LayoutContext layoutContext = currentNode.getLayoutContext();
final CSSValue value = layoutContext.getValue(key);
final ListSpecification lspec =
currentNode.getLayoutContext().getListSpecification();
if (ListStyleTypeOther.NORMAL.equals(value))
{
final CounterStyle cstyle =
process.getDocumentContext().getCounterStyle ("list-item");
lspec.setCounterStyle(cstyle);
}
else
{
final CSSValue resolvedValue = resolveValue(process, currentNode, key);
if (resolvedValue == null)
{
lspec.setCounterStyle(new DecimalCounterStyle());
}
else
{
final String name = resolvedValue.getCSSText();
lspec.setCounterStyle(CounterStyleFactory.getInstance().getCounterStyle(name));
}
}
}