List result = new ArrayList(values.size());
for (Iterator i = values.iterator(); i.hasNext();) {
PropertyValue value = (PropertyValue) i.next();
ContentFunction contentFunction = null;
FSFunction function = null;
String content = null;
short type = value.getPrimitiveType();
if (type == CSSPrimitiveValue.CSS_STRING) {
content = value.getStringValue();
} else if (value.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
if (mode == CONTENT_LIST_DOCUMENT && isAttrFunction(value.getFunction())) {
content = getAttributeValue(value.getFunction(), element);
} else {
CounterFunction cFunc = null;
if (mode == CONTENT_LIST_DOCUMENT) {
cFunc = makeCounterFunction(value.getFunction(), c, style);
}
if (cFunc != null) {
//TODO: counter functions may be called with non-ordered list-style-types, e.g. disc
content = cFunc.evaluate();
contentFunction = null;
function = null;
} else if (mode == CONTENT_LIST_MARGIN_BOX && isElementFunction(value.getFunction())) {
BlockBox target = getRunningBlock(c, value);
if (target != null) {
result.add(target.copyOf());
info.setContainsBlockLevelContent(true);
}
} else {
contentFunction =
c.getContentFunctionFactory().lookupFunction(c, value.getFunction());
if (contentFunction != null) {
function = value.getFunction();
if (contentFunction.isStatic()) {
content = contentFunction.calculate(c, function);
contentFunction = null;
function = null;
} else {
content = contentFunction.getLayoutReplacementText();
}
}
}
}
} else if (type == CSSPrimitiveValue.CSS_IDENT) {