else if (resolvedToken instanceof ResolvedCounterToken)
{
final ResolvedCounterToken ct = (ResolvedCounterToken) resolvedToken;
final CounterToken parent = ct.getParent();
final String name = parent.getName();
final CounterStyle style = parent.getStyle();
final CSSValue counterPolicy = documentContext.getCounterPolicy(name);
final Integer counterValue = pageContext.getCounter(name, counterPolicy);
return style.getCounterValue(counterValue.intValue());
}
return resolvedToken.getText();
}